summaryrefslogtreecommitdiffstats
path: root/dom
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2020-01-03 22:20:36 -0500
committerGaming4JC <g4jc@hyperbola.info>2020-01-26 15:50:12 -0500
commit16cd53bd8d53441cd0829298ddf43b15ba5fa3a8 (patch)
tree76603d14bb498647e2c95510f1bb584292a5b40a /dom
parent25a33c7123d457a59ecb4b15a2466cfc8507406b (diff)
downloadUXP-16cd53bd8d53441cd0829298ddf43b15ba5fa3a8.tar
UXP-16cd53bd8d53441cd0829298ddf43b15ba5fa3a8.tar.gz
UXP-16cd53bd8d53441cd0829298ddf43b15ba5fa3a8.tar.lz
UXP-16cd53bd8d53441cd0829298ddf43b15ba5fa3a8.tar.xz
UXP-16cd53bd8d53441cd0829298ddf43b15ba5fa3a8.zip
Bug 1351979 - Change CustomElementRegistry::Define code to properly propagate out JS exceptions;
Tag UXP Issue #1344
Diffstat (limited to 'dom')
-rw-r--r--dom/base/CustomElementRegistry.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/dom/base/CustomElementRegistry.cpp b/dom/base/CustomElementRegistry.cpp
index 1ab566e1d..d8ca7ade2 100644
--- a/dom/base/CustomElementRegistry.cpp
+++ b/dom/base/CustomElementRegistry.cpp
@@ -745,7 +745,7 @@ CustomElementRegistry::Define(const nsAString& aName,
// here.
JS::RootedValue rootedv(cx, JS::ObjectValue(*constructorProtoUnwrapped));
if (!JS_WrapValue(cx, &rootedv) || !callbacksHolder->Init(cx, rootedv)) {
- aRv.Throw(NS_ERROR_FAILURE);
+ aRv.StealExceptionFromJSContext(cx);
return;
}
} // Leave constructorProtoUnwrapped's compartment.