Skip to content

Commit 1fdfaa5

Browse files
guybedfordrichardlau
authored andcommitted
bootstrap: correct --frozen-intrinsics override fix
PR-URL: #35041 Reviewed-By: Bradley Farias <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 8044533 commit 1fdfaa5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/internal/freeze_intrinsics.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,8 @@ module.exports = function() {
384384
defineProperty(this, prop, {
385385
value: newValue,
386386
writable: true,
387-
enumerable: desc.enumerable,
388-
configurable: desc.configurable
387+
enumerable: true,
388+
configurable: true
389389
});
390390
}
391391
}

test/parallel/test-freeze-intrinsics.js

+2
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,6 @@ assert.throws(
2727
const o = {};
2828
o.toString = () => 'Custom toString';
2929
assert.strictEqual(o + 'asdf', 'Custom toStringasdf');
30+
assert.strictEqual(Object.getOwnPropertyDescriptor(o, 'toString').enumerable,
31+
true);
3032
}

0 commit comments

Comments
 (0)