From aa0e4f5c76ceed459e3d53df47802ba9b388d913 Mon Sep 17 00:00:00 2001 From: marmeladema Date: Sun, 21 Jul 2019 01:01:22 +0100 Subject: GetPerInterfaceObject methods now takes a SafeJSContext instead of a JSContext as first argument. --- components/script/dom/bindings/htmlconstructor.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'components/script/dom/bindings/htmlconstructor.rs') diff --git a/components/script/dom/bindings/htmlconstructor.rs b/components/script/dom/bindings/htmlconstructor.rs index 7e122ef6e29..f976a09ee91 100644 --- a/components/script/dom/bindings/htmlconstructor.rs +++ b/components/script/dom/bindings/htmlconstructor.rs @@ -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 }) ); -- cgit v1.2.3