diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2015-10-25 11:11:23 +0100 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2015-11-11 14:19:30 +0100 |
commit | b290a3161d8ac85c7bcc3f9d7c0ae5a6fa379607 (patch) | |
tree | da710987c0be55080eb995b986d12c5a03a32049 /components/script/dom/bindings/callback.rs | |
parent | aa105d89b4031d98376ac804e31e287f3bf21bb8 (diff) | |
download | servo-b290a3161d8ac85c7bcc3f9d7c0ae5a6fa379607.tar.gz servo-b290a3161d8ac85c7bcc3f9d7c0ae5a6fa379607.zip |
Clean up the conversion routines
Functions returning `Root<T>` are prefixed by "root_" and the ones returning
`*const T` by "native_".
Functions taking `*mut JSObject` are now suffixed by "_from_object" and the ones
taking `&T` by "_from_reflector".
Diffstat (limited to 'components/script/dom/bindings/callback.rs')
-rw-r--r-- | components/script/dom/bindings/callback.rs | 4 |
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); } |