Merge from Tracemonkey.

This commit is contained in:
David Mandelin
2010-08-19 11:11:36 -07:00
1092 changed files with 46905 additions and 24855 deletions

View File

@@ -3051,12 +3051,7 @@ js_NewArrayObject(JSContext *cx, jsuint length, const Value *vector)
*/
JS_ASSERT(obj->getProto());
if (!InitArrayObject(cx, obj, length, vector))
obj = NULL;
/* Set/clear newborn root, in case we lost it. */
cx->weakRoots.finalizableNewborns[FINALIZE_OBJECT] = obj;
return obj;
return InitArrayObject(cx, obj, length, vector) ? obj : NULL;
}
JSObject *