[INFER] Miscellaneous fixes to get inference passing jstests.

This commit is contained in:
Brian Hackett
2011-03-04 07:50:32 -08:00
parent 08c135b748
commit c0ea6c7526
18 changed files with 114 additions and 71 deletions

View File

@@ -445,7 +445,12 @@ NewIteratorObject(JSContext *cx, uintN flags)
JSObject *obj = js_NewGCObject(cx, FINALIZE_OBJECT0);
if (!obj)
return false;
obj->init(cx, &js_IteratorClass, cx->emptyTypeObject(), NULL, NULL, false);
TypeObject *type = cx->getTypeEmpty();
if (!type)
return false;
obj->init(cx, &js_IteratorClass, type, NULL, NULL, false);
obj->setMap(cx->compartment->emptyEnumeratorShape);
return obj;
}