Remove global_root_from_reflector

This commit is contained in:
Anthony Ramine 2016-10-05 01:01:22 +02:00
parent 1fed45e393
commit 26455b8a67
4 changed files with 5 additions and 11 deletions

View file

@ -5,7 +5,7 @@
//! Base classes to work with IDL callbacks.
use dom::bindings::error::{Error, Fallible, report_pending_exception};
use dom::bindings::global::global_root_from_object;
use dom::bindings::global::global_scope_from_object;
use dom::bindings::reflector::Reflectable;
use js::jsapi::{Heap, MutableHandleObject, RootedObject};
use js::jsapi::{IsCallable, JSContext, JSObject, JS_WrapObject};
@ -165,8 +165,8 @@ impl<'a> CallSetup<'a> {
callback: &T,
handling: ExceptionHandling)
-> CallSetup<'a> {
let global = unsafe { global_root_from_object(callback.callback()) };
let cx = global.r().get_cx();
let global = unsafe { global_scope_from_object(callback.callback()) };
let cx = global.get_cx();
exception_compartment.ptr = unsafe {
GetGlobalForObjectCrossCompartment(callback.callback())