mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 16:28:38 +09:00
Bug 1437507 - Fix JSObject::setFlags to call ensureShape before checking for dictionary mode. r=jandem, a=RyanVM
--HG-- extra : source : ca6b74831ec3db204e024b07f200b0d1ce93557e extra : intermediate-source : 9d7c295d9570e294851908465f56ec0779547d2a
This commit is contained in:
parent
da6d38c5ee
commit
95d507d246
1 changed files with 4 additions and 4 deletions
|
|
@ -1214,6 +1214,10 @@ JSObject::setFlags(ExclusiveContext* cx, BaseShape::Flag flags, GenerateShape ge
|
|||
|
||||
RootedObject self(cx, this);
|
||||
|
||||
Shape* existingShape = self->ensureShape(cx);
|
||||
if (!existingShape)
|
||||
return false;
|
||||
|
||||
if (isNative() && as<NativeObject>().inDictionaryMode()) {
|
||||
if (generateShape == GENERATE_SHAPE && !as<NativeObject>().generateOwnShape(cx))
|
||||
return false;
|
||||
|
|
@ -1227,10 +1231,6 @@ JSObject::setFlags(ExclusiveContext* cx, BaseShape::Flag flags, GenerateShape ge
|
|||
return true;
|
||||
}
|
||||
|
||||
Shape* existingShape = self->ensureShape(cx);
|
||||
if (!existingShape)
|
||||
return false;
|
||||
|
||||
Shape* newShape = Shape::setObjectFlags(cx, flags, self->taggedProto(), existingShape);
|
||||
if (!newShape)
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue