mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Update SpiderMonkey
This commit is contained in:
parent
813be91926
commit
5a4f8cf93f
34 changed files with 279 additions and 230 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue