mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
fix(script): apply some of the changes requested in the review comments of #16501
This commit is contained in:
parent
2f3a14b491
commit
e786627199
2 changed files with 3 additions and 3 deletions
|
@ -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(
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue