mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Pass a MutableHandleObject to create_global_object
This commit is contained in:
parent
5f59bb2e0c
commit
0729000b56
2 changed files with 21 additions and 22 deletions
|
@ -2513,12 +2513,13 @@ class CGWrapGlobalMethod(CGAbstractMethod):
|
|||
let raw = Box::into_raw(object);
|
||||
let _rt = RootedTraceable::new(&*raw);
|
||||
|
||||
rooted!(in(cx) let obj =
|
||||
create_global_object(
|
||||
cx,
|
||||
&*(&Class.base as *const js::jsapi::Class as *const _),
|
||||
raw as *const libc::c_void,
|
||||
_trace));
|
||||
rooted!(in(cx) let mut obj = ptr::null_mut());
|
||||
create_global_object(
|
||||
cx,
|
||||
&*(&Class.base as *const js::jsapi::Class as *const _),
|
||||
raw as *const libc::c_void,
|
||||
_trace,
|
||||
obj.handle_mut());
|
||||
assert!(!obj.is_null());
|
||||
|
||||
(*raw).init_reflector(obj.get());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue