GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bootstrap: use correct descriptor for Symbol.{dispose,asyncDispose} · nodejs/node@e08fd98

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/internal/process
    • pre_execution.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/process/pre_execution.js‎

Copy file name to clipboardExpand all lines: lib/internal/process/pre_execution.js
+19-2Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,26 @@ function prepareExecution(options) {
120120
function setupSymbolDisposePolyfill() {
121121
// TODO(MoLow): Remove this polyfill once Symbol.dispose and Symbol.asyncDispose are available in V8.
122122
// eslint-disable-next-line node-core/prefer-primordials
123-
Symbol.dispose ??= SymbolDispose;
123+
if (typeof Symbol.dispose !== 'symbol') {
124+
ObjectDefineProperty(Symbol, 'dispose', {
125+
__proto__: null,
126+
configurable: false,
127+
enumerable: false,
128+
value: SymbolDispose,
129+
writable: false,
130+
});
131+
}
132+
124133
// eslint-disable-next-line node-core/prefer-primordials
125-
Symbol.asyncDispose ??= SymbolAsyncDispose;
134+
if (typeof Symbol.asyncDispose !== 'symbol') {
135+
ObjectDefineProperty(Symbol, 'asyncDispose', {
136+
__proto__: null,
137+
configurable: false,
138+
enumerable: false,
139+
value: SymbolAsyncDispose,
140+
writable: false,
141+
});
142+
}
126143
}
127144

128145
function setupUserModules(isLoaderWorker = false) {

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.