From 18ce4884011bc3a6703a92ee95a29d1574d4ebd1 Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Tue, 11 Feb 2025 15:13:19 -0800 Subject: [PATCH] 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. --- harness/wellKnownIntrinsicObjects.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/harness/wellKnownIntrinsicObjects.js b/harness/wellKnownIntrinsicObjects.js index 173f4c194e..ecc86bb447 100644 --- a/harness/wellKnownIntrinsicObjects.js +++ b/harness/wellKnownIntrinsicObjects.js @@ -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%',