mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-11-04 13:37:32 +09:00
1320408 - Part 9: Change JSObject::setFlags and depending methods to static method.
This commit is contained in:
parent
7e0b20a7bf
commit
7f856ff769
14 changed files with 61 additions and 55 deletions
|
|
@ -278,8 +278,11 @@ JSObject::splicePrototype(JSContext* cx, HandleObject obj, const Class* clasp,
|
|||
// Windows may not appear on prototype chains.
|
||||
MOZ_ASSERT_IF(proto.isObject(), !IsWindow(proto.toObject()));
|
||||
|
||||
if (proto.isObject() && !proto.toObject()->setDelegate(cx))
|
||||
return false;
|
||||
if (proto.isObject()) {
|
||||
RootedObject protoObj(cx, proto.toObject());
|
||||
if (!JSObject::setDelegate(cx, protoObj))
|
||||
return false;
|
||||
}
|
||||
|
||||
// Force type instantiation when splicing lazy group.
|
||||
RootedObjectGroup group(cx, JSObject::getGroup(cx, obj));
|
||||
|
|
@ -346,7 +349,7 @@ JSObject::makeLazyGroup(JSContext* cx, HandleObject obj)
|
|||
JSObject::setNewGroupUnknown(JSContext* cx, const js::Class* clasp, JS::HandleObject obj)
|
||||
{
|
||||
ObjectGroup::setDefaultNewGroupUnknown(cx, clasp, obj);
|
||||
return obj->setFlags(cx, BaseShape::NEW_GROUP_UNKNOWN);
|
||||
return JSObject::setFlags(cx, obj, BaseShape::NEW_GROUP_UNKNOWN);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -508,7 +511,7 @@ ObjectGroup::defaultNewGroup(ExclusiveContext* cx, const Class* clasp,
|
|||
|
||||
if (proto.isObject() && !proto.toObject()->isDelegate()) {
|
||||
RootedObject protoObj(cx, proto.toObject());
|
||||
if (!protoObj->setDelegate(cx))
|
||||
if (!JSObject::setDelegate(cx, protoObj))
|
||||
return nullptr;
|
||||
|
||||
// Objects which are prototypes of one another should be singletons, so
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue