aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/callback.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/bindings/callback.rs')
-rw-r--r--components/script/dom/bindings/callback.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/bindings/callback.rs b/components/script/dom/bindings/callback.rs
index 1b067c5c596..182af6656b8 100644
--- a/components/script/dom/bindings/callback.rs
+++ b/components/script/dom/bindings/callback.rs
@@ -5,7 +5,7 @@
//! Base classes to work with IDL callbacks.
use dom::bindings::error::{Error, Fallible};
-use dom::bindings::global::global_object_for_js_object;
+use dom::bindings::global::global_root_from_object;
use dom::bindings::reflector::Reflectable;
use js::jsapi::GetGlobalForObjectCrossCompartment;
use js::jsapi::{Heap, MutableHandleObject, RootedObject, RootedValue};
@@ -170,7 +170,7 @@ impl CallSetup {
/// Performs the setup needed to make a call.
#[allow(unrooted_must_root)]
pub fn new<T: CallbackContainer>(callback: &T, handling: ExceptionHandling) -> CallSetup {
- let global = global_object_for_js_object(callback.callback());
+ let global = global_root_from_object(callback.callback());
let cx = global.r().get_cx();
unsafe { JS_BeginRequest(cx); }