lib,test: handle new Iterator global

Refs: https://github.com/v8/v8/commit/80fb7673eb2ddd2494edf6a491b943e574743d2c
PR-URL: https://github.com/nodejs/node/pull/51362
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
This commit is contained in:
Michaël Zasso committed 2024-03-31 15:37:38 +02:00
1 parent cdc4437b87
commit 351495e938
3 files changed
+4

No files matched your search

+2
View File
@@ -65,6 +65,8 @@ rules:
# disabled with --without-intl build flag.
- name: Intl
message: Use `const { Intl } = globalThis;` instead of the global.
- name: Iterator
message: Use `const { Iterator } = globalThis;` instead of the global.
- name: MessageChannel
message: Use `const { MessageChannel } = require('internal/worker/io');` instead of the global.
- name: MessageEvent
+1
View File
@@ -63,6 +63,7 @@ const intrinsics = new Set([
'SharedArrayBuffer',
'Atomics',
'WebAssembly',
'Iterator',
]);
if (global.gc) {
+1
View File
@@ -632,6 +632,7 @@ const builtins = [
'Int32Array',
'Int8Array',
...(common.hasIntl ? ['Intl'] : []),
'Iterator',
'inspector',
'isFinite',
'isNaN',