diff --git a/glue.rs b/glue.rs index 4c7a0c23d..275a50551 100644 --- a/glue.rs +++ b/glue.rs @@ -174,4 +174,5 @@ pub fn IsProxyHandlerFamily(obj: *JSObject) -> bool; pub fn GetProxyHandlerExtra(obj: *JSObject) -> *libc::c_void; pub fn GetProxyHandler(obj: *JSObject) -> *libc::c_void; pub fn InvokeGetOwnPropertyDescriptor(handler: *libc::c_void, cx: *JSContext, proxy: *JSObject, id: jsid, set: JSBool, desc: *mut JSPropertyDescriptor) -> JSBool; +pub fn GetGlobalForObjectCrossCompartment(obj: *JSObject) -> *JSObject; } diff --git a/jsapi.rs b/jsapi.rs index 01cbd0117..2288435b9 100644 --- a/jsapi.rs +++ b/jsapi.rs @@ -256,7 +256,7 @@ pub type moz_static_assert6 = c_int; // JSVal was originally type of u64. // now this become {u64} because of the union abi issue on ARM arch. See #398. -#[deriving(Eq)] +#[deriving(Eq,Clone)] pub struct JSVal { v: u64 } diff --git a/jsglue.cpp b/jsglue.cpp index 6b31aa13a..b9d9b3bae 100644 --- a/jsglue.cpp +++ b/jsglue.cpp @@ -616,4 +616,10 @@ GetProxyHandler(JSObject* obj) return handler; } +JSObject* +GetGlobalForObjectCrossCompartment(JSObject* obj) +{ + return js::GetGlobalForObjectCrossCompartment(obj); +} + } // extern "C"