mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-30 02:57:29 +09:00
1320408 - Part 14: Change some GlobalObject methods to static method.
This commit is contained in:
parent
b237ae6437
commit
cc8cb910dd
37 changed files with 287 additions and 259 deletions
|
|
@ -1985,7 +1985,8 @@ js::GetObjectFromIncumbentGlobal(JSContext* cx, MutableHandleObject obj)
|
|||
|
||||
{
|
||||
AutoCompartment ac(cx, globalObj);
|
||||
obj.set(globalObj->as<GlobalObject>().getOrCreateObjectPrototype(cx));
|
||||
Handle<GlobalObject*> global = globalObj.as<GlobalObject>();
|
||||
obj.set(GlobalObject::getOrCreateObjectPrototype(cx, global));
|
||||
if (!obj)
|
||||
return false;
|
||||
}
|
||||
|
|
@ -2548,7 +2549,7 @@ js::SetPrototype(JSContext* cx, HandleObject obj, HandleObject proto, JS::Object
|
|||
// [[Prototype]] chain is always properly immutable, even in the presence
|
||||
// of lazy standard classes.
|
||||
if (obj->is<GlobalObject>()) {
|
||||
Rooted<GlobalObject*> global(cx, &obj->as<GlobalObject>());
|
||||
Handle<GlobalObject*> global = obj.as<GlobalObject>();
|
||||
if (!GlobalObject::ensureConstructor(cx, global, JSProto_Object))
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue