aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/bindings')
-rw-r--r--components/script/dom/bindings/error.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/components/script/dom/bindings/error.rs b/components/script/dom/bindings/error.rs
index da460ad94b6..5953a013d6d 100644
--- a/components/script/dom/bindings/error.rs
+++ b/components/script/dom/bindings/error.rs
@@ -303,7 +303,10 @@ impl Error {
global: &GlobalScope,
rval: MutableHandleValue,
) {
- assert!(!JS_IsExceptionPending(cx));
+ match self {
+ Error::JSFailed => (),
+ _ => assert!(!JS_IsExceptionPending(cx)),
+ }
throw_dom_exception(cx, global, self);
assert!(JS_IsExceptionPending(cx));
assert!(JS_GetPendingException(cx, rval));