diff options
author | Julien Tregoat <jules@jules.nyc> | 2019-06-28 00:34:56 -0400 |
---|---|---|
committer | Julien Tregoat <jules@jules.nyc> | 2019-07-03 13:48:48 -0400 |
commit | 28fcde9e10ba19bfd96bc758f2de3ca1c3688b7a (patch) | |
tree | 71e4e267f6e918bce59cf9ee4ff095e4578ab879 /components/script/dom/bindings/error.rs | |
parent | fb7aa7ba7c2ab35a80be764f67703f6aca8b9186 (diff) | |
download | servo-28fcde9e10ba19bfd96bc758f2de3ca1c3688b7a.tar.gz servo-28fcde9e10ba19bfd96bc758f2de3ca1c3688b7a.zip |
Propagate JSFailed error & conditionally execute initial assertion when converting error to JS value.
Diffstat (limited to 'components/script/dom/bindings/error.rs')
-rw-r--r-- | components/script/dom/bindings/error.rs | 5 |
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)); |