diff --git a/servo/src/components/script/dom/bindings/codegen/CodegenRust.py b/servo/src/components/script/dom/bindings/codegen/CodegenRust.py index a14358d99c68..0a6b241a5439 100644 --- a/servo/src/components/script/dom/bindings/codegen/CodegenRust.py +++ b/servo/src/components/script/dom/bindings/codegen/CodegenRust.py @@ -2065,7 +2065,7 @@ def CreateBindingJSObject(descriptor, parent=None): let handler = js_info.get().get_ref().dom_static.proxy_handlers.get(&(PrototypeList::id::%s as uint)); """ % descriptor.name create += handler + """ let obj = NewProxyObject(aCx, *handler, - &PrivateValue(squirrel_away_unboxed(aObject) as *libc::c_void), + &PrivateValue(squirrel_away_unique(aObject) as *libc::c_void), proto, %s, ptr::null(), ptr::null()); assert!(obj.is_not_null()); @@ -2079,7 +2079,7 @@ def CreateBindingJSObject(descriptor, parent=None): create += """ assert!(obj.is_not_null()); JS_SetReservedSlot(obj, DOM_OBJECT_SLOT as u32, - PrivateValue(squirrel_away_unboxed(aObject) as *libc::c_void)); + PrivateValue(squirrel_away_unique(aObject) as *libc::c_void)); """ return create @@ -4790,7 +4790,7 @@ class CGBindingRoot(CGThing): 'dom::bindings::utils::{NativePropertyHooks}', 'dom::bindings::utils::global_object_for_js_object', 'dom::bindings::utils::{Reflectable}', - 'dom::bindings::utils::{squirrel_away_unboxed}', + 'dom::bindings::utils::{squirrel_away_unique}', 'dom::bindings::utils::{ThrowingConstructor, unwrap, unwrap_jsmanaged}', 'dom::bindings::utils::{unwrap_object, VoidVal, with_gc_disabled}', 'dom::bindings::utils::{with_gc_enabled, XrayResolveProperty}', diff --git a/servo/src/components/script/dom/bindings/utils.rs b/servo/src/components/script/dom/bindings/utils.rs index 04a0ddf5d0a3..eab336de15c1 100644 --- a/servo/src/components/script/dom/bindings/utils.rs +++ b/servo/src/components/script/dom/bindings/utils.rs @@ -135,7 +135,7 @@ pub fn unwrap_value(val: *JSVal, proto_id: PrototypeList::id::ID, proto_depth } } -pub unsafe fn squirrel_away_unboxed(x: ~T) -> *T { +pub unsafe fn squirrel_away_unique(x: ~T) -> *T { cast::transmute(x) } @@ -409,7 +409,7 @@ pub extern fn ThrowingConstructor(_cx: *JSContext, _argc: c_uint, _vp: *mut JSVa pub fn initialize_global(global: *JSObject) { let protoArray = ~([0 as *JSObject, ..PrototypeList::id::IDCount as uint]); unsafe { - let box_ = squirrel_away_unboxed(protoArray); + let box_ = squirrel_away_unique(protoArray); JS_SetReservedSlot(global, DOM_PROTOTYPE_SLOT, PrivateValue(box_ as *libc::c_void));