GetPerInterfaceObject methods now takes a SafeJSContext instead of a JSContext

as first argument.
This commit is contained in:
marmeladema 2019-07-21 01:01:22 +01:00
parent 0a5a9bc7bc
commit aa0e4f5c76
2 changed files with 11 additions and 10 deletions

View file

@ -76,6 +76,7 @@ use crate::dom::customelementregistry::{ConstructionStackEntry, CustomElementSta
use crate::dom::element::{Element, ElementCreator};
use crate::dom::htmlelement::HTMLElement;
use crate::dom::window::Window;
use crate::script_runtime::JSContext as SafeJSContext;
use crate::script_thread::ScriptThread;
use html5ever::interface::QualName;
use html5ever::LocalName;
@ -125,7 +126,7 @@ where
// Retrieve the constructor object for HTMLElement
HTMLElementBinding::GetConstructorObject(
window.get_cx(),
SafeJSContext::from_ptr(window.get_cx()),
global_object.handle(),
constructor.handle_mut(),
);
@ -201,7 +202,7 @@ pub fn get_constructor_object_from_local_name(
) -> bool {
macro_rules! get_constructor(
($binding:ident) => ({
unsafe { $binding::GetConstructorObject(cx, global, rval); }
unsafe { $binding::GetConstructorObject(SafeJSContext::from_ptr(cx), global, rval); }
true
})
);