From 1dc3609ff22e6a7be4d86d2ba983f81dfd8c1fd4 Mon Sep 17 00:00:00 2001 From: Kenta Moriuchi Date: Sun, 15 Jan 2023 13:26:05 +0900 Subject: fix(core): Add `Generator` and `AsyncGenerator` to promordials (#17241) --- ext/web/06_streams.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ext/web/06_streams.js') diff --git a/ext/web/06_streams.js b/ext/web/06_streams.js index 22baa1234..5b1c0141d 100644 --- a/ext/web/06_streams.js +++ b/ext/web/06_streams.js @@ -19,6 +19,7 @@ ArrayPrototypeMap, ArrayPrototypePush, ArrayPrototypeShift, + AsyncGeneratorPrototype, BigInt64ArrayPrototype, BigUint64ArrayPrototype, DataView, @@ -4439,9 +4440,7 @@ } /** @type {AsyncIterator} */ - const asyncIteratorPrototype = ObjectGetPrototypeOf( - ObjectGetPrototypeOf(async function* () {}).prototype, - ); + const asyncIteratorPrototype = ObjectGetPrototypeOf(AsyncGeneratorPrototype); const _iteratorNext = Symbol("[[iteratorNext]]"); const _iteratorFinished = Symbol("[[iteratorFinished]]"); -- cgit v1.2.3