diff options
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r-- | components/script/script_thread.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index 4fbaec2b465..cc0500805aa 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -99,7 +99,7 @@ use hyper_serde::Serde; use ipc_channel::ipc::{self, IpcSender}; use ipc_channel::router::ROUTER; use js::glue::GetWindowProxyClass; -use js::jsapi::{JSAutoCompartment, JSContext, JS_SetWrapObjectCallbacks}; +use js::jsapi::{JSAutoRealm, JSContext, JS_SetWrapObjectCallbacks}; use js::jsapi::{JSTracer, SetWindowProxyClass}; use js::jsval::UndefinedValue; use js::rust::ParentRuntime; @@ -1971,7 +1971,7 @@ impl ScriptThread { fn handle_exit_fullscreen(&self, id: PipelineId) { let document = self.documents.borrow().find_document(id); if let Some(document) = document { - let _ac = JSAutoCompartment::new( + let _ac = JSAutoRealm::new( document.global().get_cx(), document.reflector().get_jsobject().get(), ); @@ -3278,7 +3278,7 @@ impl ScriptThread { let script_source = percent_decode(encoded.as_bytes()).decode_utf8_lossy(); // Script source is ready to be evaluated (11.) - let _ac = JSAutoCompartment::new( + let _ac = JSAutoRealm::new( global_scope.get_cx(), global_scope.reflector().get_jsobject().get(), ); |