mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 18:26:15 +00:00
Bug 1211949 - check for allocation failure. r=nbp
This commit is contained in:
parent
7a28d6ab43
commit
1f22d82796
@ -1335,7 +1335,7 @@ ObjectGroup::newPlainObject(ExclusiveContext* cx, IdValuePair* properties, size_
|
||||
RootedPlainObject obj(cx, NewObjectWithGroup<PlainObject>(cx, group, allocKind,
|
||||
newKind));
|
||||
|
||||
if (!obj->setLastProperty(cx, shape))
|
||||
if (!obj || !obj->setLastProperty(cx, shape))
|
||||
return nullptr;
|
||||
|
||||
for (size_t i = 0; i < nproperties; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user