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 — process: use `defineProperty` instead of assignment · nodejs/node@380659d

File tree

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

‎lib/internal/process/per_thread.js‎

Copy file name to clipboardExpand all lines: lib/internal/process/per_thread.js
+10-3Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const {
1515
Float64Array,
1616
NumberMAX_SAFE_INTEGER,
1717
ObjectFreeze,
18+
ObjectDefineProperty,
1819
ReflectApply,
1920
RegExpPrototypeExec,
2021
SafeArrayIterator,
@@ -371,9 +372,15 @@ function buildAllowedFlags() {
371372
return SetPrototypeValues(this[kInternal].set);
372373
}
373374
}
374-
NodeEnvironmentFlagsSet.prototype.keys =
375-
NodeEnvironmentFlagsSet.prototype[SymbolIterator] =
376-
NodeEnvironmentFlagsSet.prototype.values;
375+
const flagSetValues = NodeEnvironmentFlagsSet.prototype.values;
376+
ObjectDefineProperty(NodeEnvironmentFlagsSet.prototype, SymbolIterator, {
377+
__proto__: null,
378+
value: flagSetValues,
379+
});
380+
ObjectDefineProperty(NodeEnvironmentFlagsSet.prototype, 'keys', {
381+
__proto__: null,
382+
value: flagSetValues,
383+
});
377384

378385
ObjectFreeze(NodeEnvironmentFlagsSet.prototype.constructor);
379386
ObjectFreeze(NodeEnvironmentFlagsSet.prototype);

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.