Address bug 684507 review comments, r=luke.

This commit is contained in:
Brian Hackett
2011-11-18 14:59:31 -08:00
parent b6dffe3f24
commit 7e0b5036e7
7 changed files with 59 additions and 57 deletions

View File

@@ -3905,12 +3905,10 @@ NewArray(JSContext *cx, jsuint length, JSObject *proto)
if (!shape)
return NULL;
JSObject* obj = js_NewGCObject(cx, kind);
JSObject* obj = JSObject::createDenseArray(cx, kind, shape, type, length);
if (!obj)
return NULL;
obj->initializeDenseArray(shape, type, length);
if (entry != -1)
cache.fillGlobal(entry, &ArrayClass, parent, kind, obj);