mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-30 19:17:31 +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);
|
RootedObject self(cx, this);
|
||||||
|
|
||||||
|
Shape* existingShape = self->ensureShape(cx);
|
||||||
|
if (!existingShape)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (isNative() && as<NativeObject>().inDictionaryMode()) {
|
if (isNative() && as<NativeObject>().inDictionaryMode()) {
|
||||||
if (generateShape == GENERATE_SHAPE && !as<NativeObject>().generateOwnShape(cx))
|
if (generateShape == GENERATE_SHAPE && !as<NativeObject>().generateOwnShape(cx))
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -1227,10 +1231,6 @@ JSObject::setFlags(ExclusiveContext* cx, BaseShape::Flag flags, GenerateShape ge
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Shape* existingShape = self->ensureShape(cx);
|
|
||||||
if (!existingShape)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
Shape* newShape = Shape::setObjectFlags(cx, flags, self->taggedProto(), existingShape);
|
Shape* newShape = Shape::setObjectFlags(cx, flags, self->taggedProto(), existingShape);
|
||||||
if (!newShape)
|
if (!newShape)
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue