Bug 948188 - Handle OOM in NewPropertyIteratorObject. r=njn
This commit is contained in:
@@ -396,7 +396,11 @@ NewPropertyIteratorObject(JSContext *cx, unsigned flags)
|
||||
return &obj->as<PropertyIteratorObject>();
|
||||
}
|
||||
|
||||
return &NewBuiltinClassInstance(cx, &PropertyIteratorObject::class_)->as<PropertyIteratorObject>();
|
||||
JSObject *obj = NewBuiltinClassInstance(cx, &PropertyIteratorObject::class_);
|
||||
if (!obj)
|
||||
return nullptr;
|
||||
|
||||
return &obj->as<PropertyIteratorObject>();
|
||||
}
|
||||
|
||||
NativeIterator *
|
||||
|
||||
Reference in New Issue
Block a user