Bug 1131877 - Part 2: Handlify the proto arg to NewObject functions; r=sfink

This commit is contained in:
Terrence Cole
2015-02-13 09:36:40 -08:00
parent af7987d82d
commit 7870a76e56
29 changed files with 87 additions and 89 deletions

View File

@@ -1410,7 +1410,7 @@ GlobalObject::initIteratorClasses(JSContext *cx, Handle<GlobalObject *> global)
RootedObject proto(cx);
if (global->getSlot(ARRAY_ITERATOR_PROTO).isUndefined()) {
const Class *cls = &ArrayIteratorPrototypeClass;
proto = global->createBlankPrototypeInheriting(cx, cls, *iteratorProto);
proto = global->createBlankPrototypeInheriting(cx, cls, iteratorProto);
if (!proto || !DefinePropertiesAndFunctions(cx, proto, nullptr, array_iterator_methods))
return false;
global->setReservedSlot(ARRAY_ITERATOR_PROTO, ObjectValue(*proto));