diff options
author | marmeladema <xademax@gmail.com> | 2019-07-21 01:01:22 +0100 |
---|---|---|
committer | marmeladema <xademax@gmail.com> | 2019-07-24 08:18:22 +0100 |
commit | aa0e4f5c76ceed459e3d53df47802ba9b388d913 (patch) | |
tree | 72fabd6e23ca090bf1b4f99a17ad195488385b90 /components/script/dom/bindings/htmlconstructor.rs | |
parent | 0a5a9bc7bca487cb2712b6b77a1936be276cd1e1 (diff) | |
download | servo-aa0e4f5c76ceed459e3d53df47802ba9b388d913.tar.gz servo-aa0e4f5c76ceed459e3d53df47802ba9b388d913.zip |
GetPerInterfaceObject methods now takes a SafeJSContext instead of a JSContext
as first argument.
Diffstat (limited to 'components/script/dom/bindings/htmlconstructor.rs')
-rw-r--r-- | components/script/dom/bindings/htmlconstructor.rs | 5 |
1 files changed, 3 insertions, 2 deletions
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 }) ); |