diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-05-10 23:51:12 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-10 23:51:12 -0400 |
commit | d9559499b22bb4724f9b6108919f8d24bdbc83d9 (patch) | |
tree | 692e26002cd8afe36e8ab6679d929be11e58a0af /components/script/dom/bindings/callback.rs | |
parent | 887f43b65bacad5490365f14d54bf25af4d3234b (diff) | |
parent | 7c1c1d9af4735ae86968d65d78b981b7c14585f3 (diff) | |
download | servo-d9559499b22bb4724f9b6108919f8d24bdbc83d9.tar.gz servo-d9559499b22bb4724f9b6108919f8d24bdbc83d9.zip |
Auto merge of #23163 - jdm:smup66, r=asajeffrey
Upgrade to SpiderMonkey 66
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23163)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/bindings/callback.rs')
-rw-r--r-- | components/script/dom/bindings/callback.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/components/script/dom/bindings/callback.rs b/components/script/dom/bindings/callback.rs index 88bb02ce44e..fd33be86546 100644 --- a/components/script/dom/bindings/callback.rs +++ b/components/script/dom/bindings/callback.rs @@ -14,9 +14,9 @@ use crate::dom::bindings::utils::AsCCharPtrPtr; use crate::dom::globalscope::GlobalScope; use crate::dom::window::Window; use js::jsapi::Heap; -use js::jsapi::JSAutoCompartment; +use js::jsapi::JSAutoRealm; use js::jsapi::{AddRawValueRoot, IsCallable, JSContext, JSObject}; -use js::jsapi::{JSCompartment, JS_EnterCompartment, JS_LeaveCompartment, RemoveRawValueRoot}; +use js::jsapi::{EnterRealm, LeaveRealm, Realm, RemoveRawValueRoot}; use js::jsval::{JSVal, ObjectValue, UndefinedValue}; use js::rust::wrappers::{JS_GetProperty, JS_WrapObject}; use js::rust::{MutableHandleObject, Runtime}; @@ -229,7 +229,7 @@ pub struct CallSetup { /// The `JSContext` used for the call. cx: *mut JSContext, /// The compartment we were in before the call. - old_compartment: *mut JSCompartment, + old_realm: *mut Realm, /// The exception handling used for the call. handling: ExceptionHandling, /// <https://heycam.github.io/webidl/#es-invoking-callback-functions> @@ -255,7 +255,7 @@ impl CallSetup { CallSetup { exception_global: global, cx: cx, - old_compartment: unsafe { JS_EnterCompartment(cx, callback.callback()) }, + old_realm: unsafe { EnterRealm(cx, callback.callback()) }, handling: handling, entry_script: Some(aes), incumbent_script: ais, @@ -271,9 +271,9 @@ impl CallSetup { impl Drop for CallSetup { fn drop(&mut self) { unsafe { - JS_LeaveCompartment(self.cx, self.old_compartment); + LeaveRealm(self.cx, self.old_realm); if self.handling == ExceptionHandling::Report { - let _ac = JSAutoCompartment::new( + let _ac = JSAutoRealm::new( self.cx, self.exception_global.reflector().get_jsobject().get(), ); |