Bug 841801 - Keep finalizable objects out of the nursery r=billm

This commit is contained in:
Jon Coppeard
2013-02-21 18:51:14 +00:00
parent 538efaa0d6
commit 93c1e5f559
7 changed files with 20 additions and 12 deletions

View File

@@ -385,12 +385,14 @@ NewPropertyIteratorObject(JSContext *cx, unsigned flags)
if (!type)
return NULL;
RootedShape shape(cx, EmptyShape::getInitialShape(cx, &PropertyIteratorObject::class_,
NULL, NULL, ITERATOR_FINALIZE_KIND));
Class *clasp = &PropertyIteratorObject::class_;
RootedShape shape(cx, EmptyShape::getInitialShape(cx, clasp, NULL, NULL,
ITERATOR_FINALIZE_KIND));
if (!shape)
return NULL;
RawObject obj = JSObject::create(cx, ITERATOR_FINALIZE_KIND, gc::DefaultHeap, shape, type, NULL);
RawObject obj = JSObject::create(cx, ITERATOR_FINALIZE_KIND,
GetInitialHeap(GenericObject, clasp), shape, type, NULL);
if (!obj)
return NULL;