mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 523670 - Add assertion to detect proto-less dense arrays. r=brendan.
This commit is contained in:
parent
c4cfe74c33
commit
f218f71497
@ -3457,6 +3457,12 @@ js_NewArrayObject(JSContext *cx, jsuint length, jsval *vector, JSBool holey)
|
||||
if (!obj)
|
||||
return NULL;
|
||||
|
||||
/*
|
||||
* If this fails, the global object was not initialized and its class does
|
||||
* not have JSCLASS_IS_GLOBAL.
|
||||
*/
|
||||
JS_ASSERT(obj->getProto());
|
||||
|
||||
JS_PUSH_TEMP_ROOT_OBJECT(cx, obj, &tvr);
|
||||
if (!InitArrayObject(cx, obj, length, vector, holey))
|
||||
obj = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user