bug 517199 - typed GC free lsists - newborn refactoring. r=brendan

This commit is contained in:
Igor Bukanov
2009-10-01 08:13:04 +04:00
parent 325423b2fb
commit bf9a0f2d25
10 changed files with 86 additions and 78 deletions

View File

@@ -3391,7 +3391,7 @@ js_NewEmptyArray(JSContext* cx, JSObject* proto)
{
JS_ASSERT(OBJ_IS_ARRAY(cx, proto));
JSObject* obj = js_NewGCObject(cx, GCX_OBJECT);
JSObject* obj = js_NewGCObject(cx);
if (!obj)
return NULL;
@@ -3463,7 +3463,7 @@ js_NewArrayObject(JSContext *cx, jsuint length, jsval *vector, JSBool holey)
JS_POP_TEMP_ROOT(cx, &tvr);
/* Set/clear newborn root, in case we lost it. */
cx->weakRoots.newborn[GCX_OBJECT] = obj;
cx->weakRoots.newbornObject = obj;
return obj;
}