aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/browsercontext.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2015-10-25 11:11:23 +0100
committerAnthony Ramine <n.oxyde@gmail.com>2015-11-11 14:19:30 +0100
commitb290a3161d8ac85c7bcc3f9d7c0ae5a6fa379607 (patch)
treeda710987c0be55080eb995b986d12c5a03a32049 /components/script/dom/browsercontext.rs
parentaa105d89b4031d98376ac804e31e287f3bf21bb8 (diff)
downloadservo-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/browsercontext.rs')
-rw-r--r--components/script/dom/browsercontext.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/components/script/dom/browsercontext.rs b/components/script/dom/browsercontext.rs
index 72d48d51d45..af32ac270dd 100644
--- a/components/script/dom/browsercontext.rs
+++ b/components/script/dom/browsercontext.rs
@@ -2,8 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::conversions::native_from_handleobject;
-use dom::bindings::conversions::{ToJSValConvertible};
+use dom::bindings::conversions::{ToJSValConvertible, root_from_handleobject};
use dom::bindings::js::{JS, Root};
use dom::bindings::proxyhandler::{fill_property_descriptor, get_property_descriptor};
use dom::bindings::reflector::{Reflectable, Reflector};
@@ -113,7 +112,7 @@ unsafe fn GetSubframeWindow(cx: *mut JSContext, proxy: HandleObject, id: HandleI
let index = get_array_index_from_id(cx, id);
if let Some(index) = index {
let target = RootedObject::new(cx, GetProxyPrivate(*proxy.ptr).to_object());
- let win: Root<Window> = native_from_handleobject(target.handle()).unwrap();
+ let win = root_from_handleobject::<Window>(target.handle()).unwrap();
let mut found = false;
return win.IndexedGetter(index, &mut found);
}