From eac3f0adc46c3af0e94d70bb8635440382df7d7f Mon Sep 17 00:00:00 2001 From: Sebastien Ahkrin Date: Sat, 30 Nov 2019 16:55:29 +0100 Subject: lib: replace Symbol global by the primordials Symbol MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/30737 Reviewed-By: Michaƫl Zasso Reviewed-By: Trivikram Kamat Reviewed-By: Colin Ihrig Reviewed-By: Ruben Bridgewater Reviewed-By: Luigi Pinca --- lib/.eslintrc.yaml | 2 ++ lib/_http_agent.js | 1 + lib/_http_common.js | 1 + lib/_http_outgoing.js | 1 + lib/_http_server.js | 1 + lib/_stream_readable.js | 1 + lib/_stream_writable.js | 1 + lib/_tls_wrap.js | 1 + lib/async_hooks.js | 1 + lib/buffer.js | 1 + lib/domain.js | 1 + lib/events.js | 1 + lib/inspector.js | 1 + lib/internal/async_hooks.js | 1 + lib/internal/child_process.js | 1 + lib/internal/child_process/serialization.js | 1 + lib/internal/console/constructor.js | 1 + lib/internal/crypto/hash.js | 1 + lib/internal/crypto/keys.js | 1 + lib/internal/crypto/util.js | 4 ++++ lib/internal/dgram.js | 5 +++++ lib/internal/encoding.js | 1 + lib/internal/errors.js | 1 + lib/internal/freeze_intrinsics.js | 2 +- lib/internal/fs/dir.js | 1 + lib/internal/fs/promises.js | 1 + lib/internal/fs/utils.js | 1 + lib/internal/fs/watchers.js | 1 + lib/internal/http.js | 4 ++++ lib/internal/http2/compat.js | 1 + lib/internal/http2/core.js | 1 + lib/internal/http2/util.js | 1 + lib/internal/js_stream_socket.js | 4 ++++ lib/internal/net.js | 4 ++++ lib/internal/priority_queue.js | 1 + lib/internal/repl/utils.js | 4 ++++ lib/internal/stream_base_commons.js | 1 + lib/internal/streams/async_iterator.js | 1 + lib/internal/streams/buffer_list.js | 4 ++++ lib/internal/streams/duplexpair.js | 5 +++++ lib/internal/streams/from.js | 4 ++++ lib/internal/timers.js | 1 + lib/internal/trace_events_async_hooks.js | 1 + lib/internal/url.js | 1 + lib/internal/util.js | 2 ++ lib/internal/util/comparisons.js | 1 + lib/internal/vm/module.js | 2 +- lib/internal/worker.js | 1 + lib/internal/worker/io.js | 1 + lib/net.js | 1 + lib/os.js | 1 + lib/perf_hooks.js | 1 + lib/readline.js | 1 + lib/repl.js | 1 + lib/string_decoder.js | 1 + lib/trace_events.js | 1 + lib/v8.js | 1 + lib/vm.js | 1 + lib/wasi.js | 4 +++- lib/zlib.js | 1 + 60 files changed, 93 insertions(+), 3 deletions(-) diff --git a/lib/.eslintrc.yaml b/lib/.eslintrc.yaml index ff9a0f595d..0a5197e882 100644 --- a/lib/.eslintrc.yaml +++ b/lib/.eslintrc.yaml @@ -23,6 +23,8 @@ rules: message: "Use `const { Object } = primordials;` instead of the global." - name: Reflect message: "Use `const { Reflect } = primordials;` instead of the global." + - name: Symbol + message: "Use `const { Symbol } = primordials;` instead of the global." no-restricted-syntax: # Config copied from .eslintrc.js - error diff --git a/lib/_http_agent.js b/lib/_http_agent.js index af25b2bba7..69fdb819a3 100644 --- a/lib/_http_agent.js +++ b/lib/_http_agent.js @@ -25,6 +25,7 @@ const { ObjectKeys, ObjectSetPrototypeOf, ObjectValues, + Symbol, } = primordials; const net = require('net'); diff --git a/lib/_http_common.js b/lib/_http_common.js index d0f07d3b69..dc6eba6333 100644 --- a/lib/_http_common.js +++ b/lib/_http_common.js @@ -23,6 +23,7 @@ const { MathMin, + Symbol, } = primordials; const { setImmediate } = require('timers'); diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index c3bfbd09bf..f40cf923f9 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -28,6 +28,7 @@ const { ObjectKeys, ObjectPrototypeHasOwnProperty, ObjectSetPrototypeOf, + Symbol, } = primordials; const { getDefaultHighWaterMark } = require('internal/streams/state'); diff --git a/lib/_http_server.js b/lib/_http_server.js index b967cac3ae..192d0ddfb7 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -24,6 +24,7 @@ const { ObjectKeys, ObjectSetPrototypeOf, + Symbol, } = primordials; const net = require('net'); diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index 8f5f66b391..6226bbf5eb 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -27,6 +27,7 @@ const { NumberIsNaN, ObjectDefineProperty, ObjectSetPrototypeOf, + Symbol, } = primordials; module.exports = Readable; diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js index a9f7164dc7..0e0d87ae1d 100644 --- a/lib/_stream_writable.js +++ b/lib/_stream_writable.js @@ -29,6 +29,7 @@ const { Array, ObjectDefineProperty, ObjectSetPrototypeOf, + Symbol, } = primordials; module.exports = Writable; diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js index 4379287cc4..2a53469456 100644 --- a/lib/_tls_wrap.js +++ b/lib/_tls_wrap.js @@ -25,6 +25,7 @@ const { ObjectAssign, ObjectDefineProperty, ObjectSetPrototypeOf, + Symbol, } = primordials; const { diff --git a/lib/async_hooks.js b/lib/async_hooks.js index a7ca5af7ef..be32f6d110 100644 --- a/lib/async_hooks.js +++ b/lib/async_hooks.js @@ -3,6 +3,7 @@ const { NumberIsSafeInteger, ReflectApply, + Symbol, } = primordials; const { diff --git a/lib/buffer.js b/lib/buffer.js index 8cbc0af538..e318efc654 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -34,6 +34,7 @@ const { ObjectDefineProperties, ObjectDefineProperty, ObjectSetPrototypeOf, + Symbol, } = primordials; const { diff --git a/lib/domain.js b/lib/domain.js index 322e7eb958..4f340f20ec 100644 --- a/lib/domain.js +++ b/lib/domain.js @@ -30,6 +30,7 @@ const { Array, ObjectDefineProperty, ReflectApply, + Symbol, } = primordials; const EventEmitter = require('events'); diff --git a/lib/events.js b/lib/events.js index ce93cd9f9b..203a20ed80 100644 --- a/lib/events.js +++ b/lib/events.js @@ -32,6 +32,7 @@ const { ObjectKeys, ReflectApply, ReflectOwnKeys, + Symbol, } = primordials; const kRejection = Symbol.for('nodejs.rejection'); diff --git a/lib/inspector.js b/lib/inspector.js index b2bad040ce..203cd739a7 100644 --- a/lib/inspector.js +++ b/lib/inspector.js @@ -3,6 +3,7 @@ const { JSONParse, JSONStringify, + Symbol, } = primordials; const { diff --git a/lib/internal/async_hooks.js b/lib/internal/async_hooks.js index b17406c782..bf5456a858 100644 --- a/lib/internal/async_hooks.js +++ b/lib/internal/async_hooks.js @@ -4,6 +4,7 @@ const { FunctionPrototypeBind, NumberIsSafeInteger, ObjectDefineProperty, + Symbol, } = primordials; const { diff --git a/lib/internal/child_process.js b/lib/internal/child_process.js index 3836ee8e3d..b07a38d6f6 100644 --- a/lib/internal/child_process.js +++ b/lib/internal/child_process.js @@ -4,6 +4,7 @@ const { ArrayIsArray, ObjectDefineProperty, ObjectSetPrototypeOf, + Symbol, } = primordials; const { diff --git a/lib/internal/child_process/serialization.js b/lib/internal/child_process/serialization.js index 48b6d7ffe0..9f03a8e844 100644 --- a/lib/internal/child_process/serialization.js +++ b/lib/internal/child_process/serialization.js @@ -3,6 +3,7 @@ const { JSONParse, JSONStringify, + Symbol, } = primordials; const { Buffer } = require('buffer'); const { StringDecoder } = require('string_decoder'); diff --git a/lib/internal/console/constructor.js b/lib/internal/console/constructor.js index 76b2066e9b..85b88a72ea 100644 --- a/lib/internal/console/constructor.js +++ b/lib/internal/console/constructor.js @@ -15,6 +15,7 @@ const { ObjectPrototypeHasOwnProperty, ObjectValues, ReflectOwnKeys, + Symbol, } = primordials; const { trace } = internalBinding('trace_events'); diff --git a/lib/internal/crypto/hash.js b/lib/internal/crypto/hash.js index 56784275f9..dca0ba767f 100644 --- a/lib/internal/crypto/hash.js +++ b/lib/internal/crypto/hash.js @@ -2,6 +2,7 @@ const { ObjectSetPrototypeOf, + Symbol, } = primordials; const { diff --git a/lib/internal/crypto/keys.js b/lib/internal/crypto/keys.js index 25ef888495..087cef014f 100644 --- a/lib/internal/crypto/keys.js +++ b/lib/internal/crypto/keys.js @@ -2,6 +2,7 @@ const { ObjectDefineProperty, + Symbol, } = primordials; const { diff --git a/lib/internal/crypto/util.js b/lib/internal/crypto/util.js index 8bf66e9cdf..286efc39a6 100644 --- a/lib/internal/crypto/util.js +++ b/lib/internal/crypto/util.js @@ -1,5 +1,9 @@ 'use strict'; +const { + Symbol, +} = primordials; + const { getCiphers: _getCiphers, getCurves: _getCurves, diff --git a/lib/internal/dgram.js b/lib/internal/dgram.js index 0c0fefa27c..8a8d9ba8c0 100644 --- a/lib/internal/dgram.js +++ b/lib/internal/dgram.js @@ -1,4 +1,9 @@ 'use strict'; + +const { + Symbol, +} = primordials; + const { codes } = require('internal/errors'); const { UDP } = internalBinding('udp_wrap'); const { guessHandleType } = internalBinding('util'); diff --git a/lib/internal/encoding.js b/lib/internal/encoding.js index fe940f6e86..c053a3cfa3 100644 --- a/lib/internal/encoding.js +++ b/lib/internal/encoding.js @@ -7,6 +7,7 @@ const { ObjectCreate, ObjectDefineProperties, ObjectGetOwnPropertyDescriptors, + Symbol, } = primordials; const { diff --git a/lib/internal/errors.js b/lib/internal/errors.js index 8e6962e256..f76fe328c2 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -16,6 +16,7 @@ const { NumberIsInteger, ObjectDefineProperty, ObjectKeys, + Symbol, } = primordials; const messages = new Map(); diff --git a/lib/internal/freeze_intrinsics.js b/lib/internal/freeze_intrinsics.js index 6135c3090d..60fff67f2e 100644 --- a/lib/internal/freeze_intrinsics.js +++ b/lib/internal/freeze_intrinsics.js @@ -31,7 +31,7 @@ module.exports = function() { getOwnPropertyDescriptors, getOwnPropertyNames, getOwnPropertySymbols, - getPrototypeOf + getPrototypeOf, } = Object; const objectHasOwnProperty = Object.prototype.hasOwnProperty; const { ownKeys } = Reflect; diff --git a/lib/internal/fs/dir.js b/lib/internal/fs/dir.js index c4e0a3746c..749e22ee69 100644 --- a/lib/internal/fs/dir.js +++ b/lib/internal/fs/dir.js @@ -2,6 +2,7 @@ const { ObjectDefineProperty, + Symbol, } = primordials; const pathModule = require('path'); diff --git a/lib/internal/fs/promises.js b/lib/internal/fs/promises.js index daf18e19d1..cc3f98268c 100644 --- a/lib/internal/fs/promises.js +++ b/lib/internal/fs/promises.js @@ -4,6 +4,7 @@ const { MathMax, MathMin, NumberIsSafeInteger, + Symbol, } = primordials; const { diff --git a/lib/internal/fs/utils.js b/lib/internal/fs/utils.js index 951030c5a5..ac258bdb11 100644 --- a/lib/internal/fs/utils.js +++ b/lib/internal/fs/utils.js @@ -7,6 +7,7 @@ const { NumberIsFinite, ObjectSetPrototypeOf, ReflectOwnKeys, + Symbol, } = primordials; const { Buffer } = require('buffer'); diff --git a/lib/internal/fs/watchers.js b/lib/internal/fs/watchers.js index c94739d718..59f8bfcebc 100644 --- a/lib/internal/fs/watchers.js +++ b/lib/internal/fs/watchers.js @@ -3,6 +3,7 @@ const { ObjectDefineProperty, ObjectSetPrototypeOf, + Symbol, } = primordials; const errors = require('internal/errors'); diff --git a/lib/internal/http.js b/lib/internal/http.js index 09294888be..aab4170a2f 100644 --- a/lib/internal/http.js +++ b/lib/internal/http.js @@ -1,5 +1,9 @@ 'use strict'; +const { + Symbol, +} = primordials; + const { setUnrefTimeout } = require('internal/timers'); const { PerformanceEntry, notify } = internalBinding('performance'); diff --git a/lib/internal/http2/compat.js b/lib/internal/http2/compat.js index 6a55b4edd1..94282cc4bb 100644 --- a/lib/internal/http2/compat.js +++ b/lib/internal/http2/compat.js @@ -8,6 +8,7 @@ const { ObjectKeys, ObjectPrototypeHasOwnProperty, ReflectGetPrototypeOf, + Symbol, } = primordials; const assert = require('internal/assert'); diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js index 167044f840..b48e405b8d 100644 --- a/lib/internal/http2/core.js +++ b/lib/internal/http2/core.js @@ -11,6 +11,7 @@ const { ObjectDefineProperty, ObjectPrototypeHasOwnProperty, ReflectGetPrototypeOf, + Symbol, } = primordials; const { diff --git a/lib/internal/http2/util.js b/lib/internal/http2/util.js index d97ce2f13f..3bf3a8fdd5 100644 --- a/lib/internal/http2/util.js +++ b/lib/internal/http2/util.js @@ -6,6 +6,7 @@ const { Number, ObjectCreate, ObjectKeys, + Symbol, } = primordials; const binding = internalBinding('http2'); diff --git a/lib/internal/js_stream_socket.js b/lib/internal/js_stream_socket.js index 7c35a55b1c..1a805ae830 100644 --- a/lib/internal/js_stream_socket.js +++ b/lib/internal/js_stream_socket.js @@ -1,5 +1,9 @@ 'use strict'; +const { + Symbol, +} = primordials; + const { setImmediate } = require('timers'); const assert = require('internal/assert'); const { Socket } = require('net'); diff --git a/lib/internal/net.js b/lib/internal/net.js index bbdc9bf843..5f6e476b58 100644 --- a/lib/internal/net.js +++ b/lib/internal/net.js @@ -1,5 +1,9 @@ 'use strict'; +const { + Symbol, +} = primordials; + const Buffer = require('buffer').Buffer; const { writeBuffer } = internalBinding('fs'); const errors = require('internal/errors'); diff --git a/lib/internal/priority_queue.js b/lib/internal/priority_queue.js index afd2cef643..c31c1eea38 100644 --- a/lib/internal/priority_queue.js +++ b/lib/internal/priority_queue.js @@ -2,6 +2,7 @@ const { Array, + Symbol, } = primordials; const kCompare = Symbol('compare'); diff --git a/lib/internal/repl/utils.js b/lib/internal/repl/utils.js index d60b332088..6c011e8533 100644 --- a/lib/internal/repl/utils.js +++ b/lib/internal/repl/utils.js @@ -1,5 +1,9 @@ 'use strict'; +const { + Symbol, +} = primordials; + const acorn = require('internal/deps/acorn/acorn/dist/acorn'); const privateMethods = require('internal/deps/acorn-plugins/acorn-private-methods/index'); diff --git a/lib/internal/stream_base_commons.js b/lib/internal/stream_base_commons.js index 504de5fc57..800ba4cefd 100644 --- a/lib/internal/stream_base_commons.js +++ b/lib/internal/stream_base_commons.js @@ -2,6 +2,7 @@ const { Array, + Symbol, } = primordials; const { Buffer } = require('buffer'); diff --git a/lib/internal/streams/async_iterator.js b/lib/internal/streams/async_iterator.js index e05813e5df..a6b8bd9d18 100644 --- a/lib/internal/streams/async_iterator.js +++ b/lib/internal/streams/async_iterator.js @@ -4,6 +4,7 @@ const { ObjectCreate, ObjectGetPrototypeOf, ObjectSetPrototypeOf, + Symbol, } = primordials; const finished = require('internal/streams/end-of-stream'); diff --git a/lib/internal/streams/buffer_list.js b/lib/internal/streams/buffer_list.js index 5e23f2cf46..c7adc5b073 100644 --- a/lib/internal/streams/buffer_list.js +++ b/lib/internal/streams/buffer_list.js @@ -1,5 +1,9 @@ 'use strict'; +const { + Symbol, +} = primordials; + const { Buffer } = require('buffer'); const { inspect } = require('internal/util/inspect'); diff --git a/lib/internal/streams/duplexpair.js b/lib/internal/streams/duplexpair.js index 6735bcb2b9..ec92cbe871 100644 --- a/lib/internal/streams/duplexpair.js +++ b/lib/internal/streams/duplexpair.js @@ -1,4 +1,9 @@ 'use strict'; + +const { + Symbol, +} = primordials; + const { Duplex } = require('stream'); const kCallback = Symbol('Callback'); diff --git a/lib/internal/streams/from.js b/lib/internal/streams/from.js index e809f2658d..7e1c2fbb19 100644 --- a/lib/internal/streams/from.js +++ b/lib/internal/streams/from.js @@ -1,5 +1,9 @@ 'use strict'; +const { + Symbol, +} = primordials; + const { ERR_INVALID_ARG_TYPE } = require('internal/errors').codes; diff --git a/lib/internal/timers.js b/lib/internal/timers.js index 84b3c34d87..1b6422f41e 100644 --- a/lib/internal/timers.js +++ b/lib/internal/timers.js @@ -77,6 +77,7 @@ const { MathTrunc, NumberMIN_SAFE_INTEGER, ObjectCreate, + Symbol, } = primordials; const { diff --git a/lib/internal/trace_events_async_hooks.js b/lib/internal/trace_events_async_hooks.js index 87ee63d8ba..84c7745e47 100644 --- a/lib/internal/trace_events_async_hooks.js +++ b/lib/internal/trace_events_async_hooks.js @@ -4,6 +4,7 @@ const { ObjectKeys, SafeMap, SafeSet, + Symbol, } = primordials; const { trace } = internalBinding('trace_events'); diff --git a/lib/internal/url.js b/lib/internal/url.js index 3c75baf27b..54b9a18caf 100644 --- a/lib/internal/url.js +++ b/lib/internal/url.js @@ -11,6 +11,7 @@ const { ObjectKeys, ReflectGetOwnPropertyDescriptor, ReflectOwnKeys, + Symbol, } = primordials; const { inspect } = require('internal/util/inspect'); diff --git a/lib/internal/util.js b/lib/internal/util.js index 0a31973918..526d2504ea 100644 --- a/lib/internal/util.js +++ b/lib/internal/util.js @@ -11,7 +11,9 @@ const { ObjectGetPrototypeOf, ObjectSetPrototypeOf, ReflectConstruct, + Symbol, } = primordials; + const { codes: { ERR_INVALID_ARG_TYPE, diff --git a/lib/internal/util/comparisons.js b/lib/internal/util/comparisons.js index b26012923c..b27b0bf7ce 100644 --- a/lib/internal/util/comparisons.js +++ b/lib/internal/util/comparisons.js @@ -15,6 +15,7 @@ const { ObjectPrototypePropertyIsEnumerable, ObjectPrototypeToString, StringPrototypeValueOf, + Symbol, SymbolPrototypeValueOf, } = primordials; diff --git a/lib/internal/vm/module.js b/lib/internal/vm/module.js index ee2fec2e43..9e6aa6b6b8 100644 --- a/lib/internal/vm/module.js +++ b/lib/internal/vm/module.js @@ -5,8 +5,8 @@ const { ArrayIsArray, ObjectCreate, ObjectDefineProperty, - Symbol, SafePromise, + Symbol, } = primordials; const { isContext } = internalBinding('contextify'); diff --git a/lib/internal/worker.js b/lib/internal/worker.js index fb033b2472..6051a02178 100644 --- a/lib/internal/worker.js +++ b/lib/internal/worker.js @@ -7,6 +7,7 @@ const { MathMax, ObjectCreate, ObjectEntries, + Symbol, } = primordials; const EventEmitter = require('events'); diff --git a/lib/internal/worker/io.js b/lib/internal/worker/io.js index a672dac94c..1167198676 100644 --- a/lib/internal/worker/io.js +++ b/lib/internal/worker/io.js @@ -7,6 +7,7 @@ const { ObjectGetOwnPropertyDescriptors, ObjectGetPrototypeOf, ObjectSetPrototypeOf, + Symbol, } = primordials; const { diff --git a/lib/net.js b/lib/net.js index 7e5d0ea621..5f12c733dd 100644 --- a/lib/net.js +++ b/lib/net.js @@ -28,6 +28,7 @@ const { NumberIsNaN, ObjectDefineProperty, ObjectSetPrototypeOf, + Symbol, } = primordials; const EventEmitter = require('events'); diff --git a/lib/os.js b/lib/os.js index 51520802d8..29b2946b80 100644 --- a/lib/os.js +++ b/lib/os.js @@ -23,6 +23,7 @@ const { ObjectDefineProperties, + Symbol, } = primordials; const { safeGetenv } = internalBinding('credentials'); diff --git a/lib/perf_hooks.js b/lib/perf_hooks.js index 0b8bab03e4..3e86f10e22 100644 --- a/lib/perf_hooks.js +++ b/lib/perf_hooks.js @@ -7,6 +7,7 @@ const { ObjectDefineProperties, ObjectDefineProperty, ObjectKeys, + Symbol, } = primordials; const { diff --git a/lib/readline.js b/lib/readline.js index 630359aeb6..ea53cd1bbf 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -36,6 +36,7 @@ const { NumberIsNaN, ObjectDefineProperty, ObjectSetPrototypeOf, + Symbol, } = primordials; const { diff --git a/lib/repl.js b/lib/repl.js index 55daf2f47f..b6876bb8c6 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -55,6 +55,7 @@ const { ObjectKeys, ObjectPrototypeHasOwnProperty, ObjectSetPrototypeOf, + Symbol, } = primordials; const { diff --git a/lib/string_decoder.js b/lib/string_decoder.js index 0ab74b7725..3d2cc2fcb6 100644 --- a/lib/string_decoder.js +++ b/lib/string_decoder.js @@ -24,6 +24,7 @@ const { ArrayBufferIsView, ObjectDefineProperties, + Symbol, } = primordials; const { Buffer } = require('buffer'); diff --git a/lib/trace_events.js b/lib/trace_events.js index 5ec50d32c6..1ff2b5a4fb 100644 --- a/lib/trace_events.js +++ b/lib/trace_events.js @@ -2,6 +2,7 @@ const { ArrayIsArray, + Symbol, } = primordials; const { hasTracing } = internalBinding('config'); diff --git a/lib/v8.js b/lib/v8.js index 1e0ee43f22..cabe96f345 100644 --- a/lib/v8.js +++ b/lib/v8.js @@ -17,6 +17,7 @@ const { Array, ObjectPrototypeToString, + Symbol, } = primordials; const { Buffer } = require('buffer'); diff --git a/lib/vm.js b/lib/vm.js index d12a460df6..a4b5b37e83 100644 --- a/lib/vm.js +++ b/lib/vm.js @@ -24,6 +24,7 @@ const { ArrayIsArray, ArrayPrototypeForEach, + Symbol, } = primordials; const { diff --git a/lib/wasi.js b/lib/wasi.js index 65b8473624..ff8685cbb0 100644 --- a/lib/wasi.js +++ b/lib/wasi.js @@ -5,8 +5,10 @@ const { ArrayPrototypeForEach, ArrayPrototypeMap, FunctionPrototypeBind, - ObjectKeys + ObjectKeys, + Symbol, } = primordials; + const { ERR_INVALID_ARG_TYPE, ERR_WASI_ALREADY_STARTED diff --git a/lib/zlib.js b/lib/zlib.js index 375af0fea5..3b9e522a06 100644 --- a/lib/zlib.js +++ b/lib/zlib.js @@ -31,6 +31,7 @@ const { ObjectGetPrototypeOf, ObjectKeys, ObjectSetPrototypeOf, + Symbol, } = primordials; const { -- cgit v1.2.3