Address bug 694561 review comments, r=luke.

This commit is contained in:
Brian Hackett
2011-11-18 16:22:52 -08:00
parent 942a8fd9b1
commit 13318e693a
14 changed files with 84 additions and 71 deletions

View File

@@ -118,6 +118,8 @@ Class js::IteratorClass = {
}
};
static const gc::AllocKind ITERATOR_FINALIZE_KIND = gc::FINALIZE_OBJECT2;
void
NativeIterator::mark(JSTracer *trc)
{
@@ -415,12 +417,13 @@ NewIteratorObject(JSContext *cx, uintN flags)
if (!type)
return NULL;
Shape *emptyEnumeratorShape = EmptyShape::lookupInitialShape(cx, &IteratorClass, NULL, NULL,
FINALIZE_OBJECT2);
Shape *emptyEnumeratorShape = EmptyShape::getInitialShape(cx, &IteratorClass, NULL, NULL,
ITERATOR_FINALIZE_KIND);
if (!emptyEnumeratorShape)
return NULL;
JSObject *obj = JSObject::create(cx, FINALIZE_OBJECT2, emptyEnumeratorShape, type, NULL);
JSObject *obj = JSObject::create(cx, ITERATOR_FINALIZE_KIND,
emptyEnumeratorShape, type, NULL);
if (!obj)
return NULL;