GeezerVison is showing github.com — lib: prefer AsyncIteratorPrototype primordial · nodejs/node@5b2363b
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: lib/events.js +1-3Lines changed: 1 addition & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -28,6 +28,7 @@ const { | 28 | 28 | ArrayPrototypeSlice, | 29 | 29 | ArrayPrototypeSplice, | 30 | 30 | ArrayPrototypeUnshift, | | 31 | + AsyncIteratorPrototype, | 31 | 32 | Boolean, | 32 | 33 | Error, | 33 | 34 | ErrorCaptureStackTrace, | @@ -1000,9 +1001,6 @@ async function once(emitter, name, options = kEmptyObject) { | 1000 | 1001 | }); | 1001 | 1002 | } | 1002 | 1003 |
| 1003 | | -const AsyncIteratorPrototype = ObjectGetPrototypeOf( | 1004 | | - ObjectGetPrototypeOf(async function* () {}).prototype); | 1005 | | - | 1006 | 1004 | function createIterResult(value, done) { | 1007 | 1005 | return { value, done }; | 1008 | 1006 | } | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/freeze_intrinsics.js +2-4Lines changed: 2 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -31,6 +31,7 @@ const { | 31 | 31 | ArrayPrototype, | 32 | 32 | ArrayPrototypeForEach, | 33 | 33 | ArrayPrototypePush, | | 34 | + AsyncIteratorPrototype, | 34 | 35 | Atomics, | 35 | 36 | BigInt, | 36 | 37 | BigInt64Array, | @@ -212,10 +213,7 @@ module.exports = function() { | 212 | 213 | // 27 Control Abstraction Objects | 213 | 214 | // 27.1 Iteration | 214 | 215 | IteratorPrototype, // 27.1.2 IteratorPrototype | 215 | | - // 27.1.3 AsyncIteratorPrototype | 216 | | - ObjectGetPrototypeOf(ObjectGetPrototypeOf(ObjectGetPrototypeOf( | 217 | | - (async function*() {})(), | 218 | | - ))), | | 216 | + AsyncIteratorPrototype, // 27.1.3 AsyncIteratorPrototype | 219 | 217 | PromisePrototype, // 27.2 | 220 | 218 |
| 221 | 219 | // Other APIs / Web Compatibility | |
|