harness: Correct sources of %{Async,}GeneratorFunction%

As far as I can tell these are wrong, giving %GeneratorFunction.prototype%
and %AsyncGeneratorFunction.prototype% instead. These new expressions are
how MDN claims you can get the intrinsics.
This commit is contained in:
Philip Chimento 2025-02-11 15:13:19 -08:00 committed by Philip Chimento
parent a4536dc65f
commit 18ce488401
1 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ const WellKnownIntrinsicObjects = [
},
{
name: '%AsyncGeneratorFunction%',
source: 'Object.getPrototypeOf(async function * () {})',
source: '(async function* () {}).constructor',
},
{
name: '%AsyncIteratorPrototype%',
@ -119,7 +119,7 @@ const WellKnownIntrinsicObjects = [
},
{
name: '%GeneratorFunction%',
source: 'Object.getPrototypeOf(function * () {})',
source: '(function* () {}).constructor',
},
{
name: '%Int8Array%',