mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 14:45:29 +00:00
Bug 1222675 - Handle OOM properly in ObjectGroup::addDefiniteProperties. r=bhackett
--HG-- extra : rebase_source : 856e14caf6e46226423be2ab5ccb967b68728c9a
This commit is contained in:
parent
1c3e9791a8
commit
b68da81498
@ -2679,7 +2679,11 @@ ObjectGroup::addDefiniteProperties(ExclusiveContext* cx, Shape* shape)
|
|||||||
MOZ_ASSERT_IF(shape->slot() >= shape->numFixedSlots(),
|
MOZ_ASSERT_IF(shape->slot() >= shape->numFixedSlots(),
|
||||||
shape->numFixedSlots() == NativeObject::MAX_FIXED_SLOTS);
|
shape->numFixedSlots() == NativeObject::MAX_FIXED_SLOTS);
|
||||||
TypeSet* types = getProperty(cx, nullptr, id);
|
TypeSet* types = getProperty(cx, nullptr, id);
|
||||||
if (types && types->canSetDefinite(shape->slot()))
|
if (!types) {
|
||||||
|
MOZ_ASSERT(unknownProperties());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (types->canSetDefinite(shape->slot()))
|
||||||
types->setDefinite(shape->slot());
|
types->setDefinite(shape->slot());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user