mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Use safe JSContext as first argument for throw_dom_exception
This commit is contained in:
parent
6c26518f61
commit
0703a1ad6d
6 changed files with 29 additions and 25 deletions
|
@ -18,6 +18,7 @@ use crate::dom::document::Document;
|
|||
use crate::dom::element::Element;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::dom::window::Window;
|
||||
use crate::script_runtime::JSContext as SafeJSContext;
|
||||
use crate::script_thread::ScriptThread;
|
||||
use dom_struct::dom_struct;
|
||||
use embedder_traits::EmbedderMsg;
|
||||
|
@ -959,7 +960,7 @@ pub fn new_window_proxy_handler() -> WindowProxyHandler {
|
|||
unsafe fn throw_security_error(cx: *mut JSContext) -> bool {
|
||||
if !JS_IsExceptionPending(cx) {
|
||||
let global = GlobalScope::from_context(cx);
|
||||
throw_dom_exception(cx, &*global, Error::Security);
|
||||
throw_dom_exception(SafeJSContext::from_ptr(cx), &*global, Error::Security);
|
||||
}
|
||||
false
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue