Bug 923836 - Set aside the first 3 reserved slots of global objects for application use. r=Waldo.

This commit is contained in:
Jason Orendorff
2013-10-14 15:24:11 -05:00
parent 4f0d27c2c4
commit ad3e3749f1
13 changed files with 152 additions and 129 deletions

View File

@@ -1949,8 +1949,8 @@ GlobalObject::initIteratorClasses(JSContext *cx, Handle<GlobalObject *> global)
return false;
global->setSlot(STAR_GENERATOR_OBJECT_PROTO, ObjectValue(*genObjectProto));
global->setSlot(JSProto_GeneratorFunction, ObjectValue(*genFunction));
global->setSlot(JSProto_GeneratorFunction + JSProto_LIMIT, ObjectValue(*genFunctionProto));
global->setConstructor(JSProto_GeneratorFunction, ObjectValue(*genFunction));
global->setPrototype(JSProto_GeneratorFunction, ObjectValue(*genFunctionProto));
}
if (global->getPrototype(JSProto_StopIteration).isUndefined()) {
@@ -1962,7 +1962,7 @@ GlobalObject::initIteratorClasses(JSContext *cx, Handle<GlobalObject *> global)
if (!DefineConstructorAndPrototype(cx, global, JSProto_StopIteration, proto, proto))
return false;
MarkStandardClassInitializedNoProto(global, &StopIterationObject::class_);
global->markStandardClassInitializedNoProto(&StopIterationObject::class_);
}
return true;