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(

View file

@ -98,8 +98,8 @@ unsafe extern "C" fn principals_is_system_or_addon_principal(_: *mut JSPrincipal
//TODO is same_origin_domain equivalent to subsumes for our purposes
pub unsafe extern "C" fn subsumes(obj: *mut JSPrincipals, other: *mut JSPrincipals) -> bool {
let obj = &ServoJSPrincipal(obj);
let other = &ServoJSPrincipal(other);
let obj = ServoJSPrincipal(obj);
let other = ServoJSPrincipal(other);
let obj_origin = obj.origin();
let other_origin = other.origin();
obj_origin.same_origin_domain(&other_origin)