Update SpiderMonkey

This commit is contained in:
Anthony Ramine 2020-03-02 11:16:46 +01:00
parent 813be91926
commit 5a4f8cf93f
34 changed files with 279 additions and 230 deletions

View file

@ -19,6 +19,7 @@ use crate::script_runtime::JSContext as SafeJSContext;
#[cfg(feature = "js_backtrace")]
use backtrace::Backtrace;
use js::error::{throw_range_error, throw_type_error};
use js::jsapi::ExceptionStackBehavior;
use js::jsapi::JSContext;
use js::jsapi::JS_ClearPendingException;
use js::jsapi::JS_IsExceptionPending;
@ -161,7 +162,7 @@ pub fn throw_dom_exception(cx: SafeJSContext, global: &GlobalScope, result: Erro
let exception = DOMException::new(global, code);
rooted!(in(*cx) let mut thrown = UndefinedValue());
exception.to_jsval(*cx, thrown.handle_mut());
JS_SetPendingException(*cx, thrown.handle());
JS_SetPendingException(*cx, thrown.handle(), ExceptionStackBehavior::Capture);
}
}