mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1055472 - Part 11: Make the WeakMap constructor properly subclassable. (r=Waldo)
This commit is contained in:
parent
96a1ca32c3
commit
824d320ee0
@ -316,7 +316,8 @@ WeakMap_construct(JSContext* cx, unsigned argc, Value* vp)
|
||||
if (!ThrowIfNotConstructing(cx, args, "WeakMap"))
|
||||
return false;
|
||||
|
||||
RootedObject obj(cx, NewBuiltinClassInstance(cx, &WeakMapObject::class_));
|
||||
RootedObject newTarget(cx, &args.newTarget().toObject());
|
||||
RootedObject obj(cx, CreateThis(cx, &WeakMapObject::class_, newTarget));
|
||||
if (!obj)
|
||||
return false;
|
||||
|
||||
|
@ -34,6 +34,7 @@ testBuiltin(RegExp, /Regexp Argument/);
|
||||
testBuiltin(RegExp, "String Argument");
|
||||
testBuiltin(Map);
|
||||
testBuiltin(Set);
|
||||
testBuiltin(WeakMap);
|
||||
|
||||
`;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user