Make create_global_object take a &'static Class

This commit is contained in:
Anthony Ramine 2016-08-24 20:37:19 +02:00
parent a4f2159e36
commit 5f59bb2e0c
2 changed files with 2 additions and 2 deletions

View file

@ -2516,7 +2516,7 @@ let _rt = RootedTraceable::new(&*raw);
rooted!(in(cx) let obj =
create_global_object(
cx,
&Class.base as *const js::jsapi::Class as *const _,
&*(&Class.base as *const js::jsapi::Class as *const _),
raw as *const libc::c_void,
_trace));
assert!(!obj.is_null());

View file

@ -216,7 +216,7 @@ pub type TraceHook =
/// Create a global object with the given class.
pub unsafe fn create_global_object(
cx: *mut JSContext,
class: *const JSClass,
class: &'static JSClass,
private: *const libc::c_void,
trace: TraceHook)
-> *mut JSObject {