mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
process: use defineProperty instead of assignment
PR-URL: https://github.com/nodejs/node/pull/43907 Fixes: https://github.com/nodejs/node/issues/43496 Refs: https://github.com/endojs/endo/issues/576 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com>
This commit is contained in:
1 parent
bbc455c4f9
commit
380659daf1
1 file changed
+10
-3
@@ -15,6 +15,7 @@ const {
|
||||
Float64Array,
|
||||
NumberMAX_SAFE_INTEGER,
|
||||
ObjectFreeze,
|
||||
ObjectDefineProperty,
|
||||
ReflectApply,
|
||||
RegExpPrototypeExec,
|
||||
SafeArrayIterator,
|
||||
@@ -371,9 +372,15 @@ function buildAllowedFlags() {
|
||||
return SetPrototypeValues(this[kInternal].set);
|
||||
}
|
||||
}
|
||||
NodeEnvironmentFlagsSet.prototype.keys =
|
||||
NodeEnvironmentFlagsSet.prototype[SymbolIterator] =
|
||||
NodeEnvironmentFlagsSet.prototype.values;
|
||||
const flagSetValues = NodeEnvironmentFlagsSet.prototype.values;
|
||||
ObjectDefineProperty(NodeEnvironmentFlagsSet.prototype, SymbolIterator, {
|
||||
__proto__: null,
|
||||
value: flagSetValues,
|
||||
});
|
||||
ObjectDefineProperty(NodeEnvironmentFlagsSet.prototype, 'keys', {
|
||||
__proto__: null,
|
||||
value: flagSetValues,
|
||||
});
|
||||
|
||||
ObjectFreeze(NodeEnvironmentFlagsSet.prototype.constructor);
|
||||
ObjectFreeze(NodeEnvironmentFlagsSet.prototype);
|
||||
|
||||
Reference in new issue
Block a user