mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1232229 - Ensure generator object prototype is a singleton and tenured. r=jonco
This commit is contained in:
parent
f4e4ca445e
commit
b3214af7bf
@ -299,7 +299,9 @@ GlobalObject::initStarGenerators(JSContext* cx, Handle<GlobalObject*> global)
|
||||
if (!iteratorProto)
|
||||
return false;
|
||||
|
||||
RootedPlainObject genObjectProto(cx, NewObjectWithGivenProto<PlainObject>(cx, iteratorProto));
|
||||
RootedObject genObjectProto(cx, global->createBlankPrototypeInheriting(cx,
|
||||
&PlainObject::class_,
|
||||
iteratorProto));
|
||||
if (!genObjectProto)
|
||||
return false;
|
||||
if (!DefinePropertiesAndFunctions(cx, genObjectProto, nullptr, star_generator_methods))
|
||||
|
Loading…
Reference in New Issue
Block a user