Bug 572057 - TM: remove weak roots (pigeon hole) r=igor

This commit is contained in:
Gregor Wagner
2010-08-18 12:46:47 -07:00
parent d63937be45
commit 225dda9ef3
10 changed files with 21 additions and 136 deletions

View File

@@ -3050,12 +3050,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 *