fix(script): apply some of the changes requested in the review comments of #16501

This commit is contained in:
yvt 2021-07-12 01:13:16 +09:00
parent 2f3a14b491
commit e786627199
2 changed files with 3 additions and 3 deletions

View file

@ -2911,8 +2911,8 @@ class CGWrapGlobalMethod(CGAbstractMethod):
values["members"] = "\n".join(members)
return CGGeneric("""\
let origin = object.origin().clone();
let raw = Root::new(MaybeUnreflectedDom::from_box(object));
let origin = (*raw.as_ptr()).origin(); // `MutableOrigin` or `&MutableOrigin`
rooted!(in(*cx) let mut obj = ptr::null_mut::<JSObject>());
create_global_object(