Move JSObject::newType to a hashtable, bug 684410.

This commit is contained in:
Brian Hackett
2011-10-07 20:09:09 -07:00
parent 3757bb2b33
commit 43a6a0454e
19 changed files with 187 additions and 139 deletions

View File

@@ -409,10 +409,15 @@ NewIteratorObject(JSContext *cx, uintN flags)
if (!obj)
return NULL;
types::TypeObject *type = cx->compartment->getEmptyType(cx);
if (!type)
return NULL;
EmptyShape *emptyEnumeratorShape = EmptyShape::getEmptyEnumeratorShape(cx);
if (!emptyEnumeratorShape)
return NULL;
obj->init(cx, &types::emptyTypeObject, NULL, NULL, false);
obj->init(cx, type, NULL, NULL, false);
obj->setMap(emptyEnumeratorShape);
return obj;
}