mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Initialise reflector earlier for globals
This allows us to use global_root_from_object in the context of a Condition.
This commit is contained in:
parent
fb8934a138
commit
3cc7b575fb
1 changed files with 1 additions and 1 deletions
|
@ -2390,6 +2390,7 @@ Root::from_ref(&*raw)""" % {'copyUnforgeable': unforgeable, 'createObject': crea
|
|||
create = CreateBindingJSObject(self.descriptor)
|
||||
return CGGeneric("""\
|
||||
%(createObject)s
|
||||
(*raw).init_reflector(obj.ptr);
|
||||
|
||||
let _ac = JSAutoCompartment::new(cx, obj.ptr);
|
||||
let mut proto = RootedObject::new(cx, ptr::null_mut());
|
||||
|
@ -2397,7 +2398,6 @@ GetProtoObject(cx, obj.handle(), proto.handle_mut());
|
|||
JS_SetPrototype(cx, obj.handle(), proto.handle());
|
||||
|
||||
%(copyUnforgeable)s
|
||||
(*raw).init_reflector(obj.ptr);
|
||||
|
||||
Root::from_ref(&*raw)\
|
||||
""" % {'copyUnforgeable': unforgeable, 'createObject': create})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue