mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1185106 - Part 14: Add AsyncFunction.prototype[@@toStringTag]. r=till
This commit is contained in:
parent
8f486dc57c
commit
98f3030623
@ -149,4 +149,7 @@ testDefault(function* () {}().__proto__.__proto__, "Generator");
|
||||
// ES6 25.4.5.4 Promise.prototype [ @@toStringTag ]
|
||||
testDefault(Promise.prototype, "Promise");
|
||||
|
||||
// AsyncFunction.prototype [ @@toStringTag ]
|
||||
testDefault(async function() {}.constructor.prototype, "AsyncFunction");
|
||||
|
||||
reportCompare(true, true);
|
||||
|
@ -25,6 +25,9 @@ GlobalObject::initAsyncFunction(JSContext* cx, Handle<GlobalObject*> global)
|
||||
if (!asyncFunctionProto)
|
||||
return false;
|
||||
|
||||
if (!DefineToStringTag(cx, asyncFunctionProto, cx->names().AsyncFunction))
|
||||
return false;
|
||||
|
||||
RootedValue function(cx, global->getConstructor(JSProto_Function));
|
||||
if (!function.toObjectOrNull())
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user