aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/window.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/window.rs')
-rw-r--r--components/script/dom/window.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index e57e27fd8c4..1a8b5e68c8b 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -76,10 +76,10 @@ use embedder_traits::EmbedderMsg;
use euclid::{Point2D, Rect, Size2D, TypedPoint2D, TypedScale, TypedSize2D, Vector2D};
use ipc_channel::ipc::{channel, IpcSender};
use ipc_channel::router::ROUTER;
-use js::jsapi::JSAutoCompartment;
+use js::jsapi::JSAutoRealm;
use js::jsapi::JSContext;
use js::jsapi::JSPROP_ENUMERATE;
-use js::jsapi::JS_GC;
+use js::jsapi::{GCReason, JS_GC};
use js::jsval::JSVal;
use js::jsval::UndefinedValue;
use js::rust::wrappers::JS_DefineProperty;
@@ -901,7 +901,7 @@ impl WindowMethods for Window {
#[allow(unsafe_code)]
fn Gc(&self) {
unsafe {
- JS_GC(self.get_cx());
+ JS_GC(self.get_cx(), GCReason::API);
}
}
@@ -2213,7 +2213,7 @@ impl Window {
// Steps 7.2.-7.5.
let cx = this.get_cx();
let obj = this.reflector().get_jsobject();
- let _ac = JSAutoCompartment::new(cx, obj.get());
+ let _ac = JSAutoRealm::new(cx, obj.get());
rooted!(in(cx) let mut message_clone = UndefinedValue());
serialize_with_transfer_result.read(
this.upcast(),