mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Propagate JSFailed error & conditionally execute initial assertion when converting error to JS value.
This commit is contained in:
parent
fb7aa7ba7c
commit
28fcde9e10
4 changed files with 13 additions and 10 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue