From 0273adae2b409e61830455a16e7ef4a5612f5a77 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Sun, 18 Apr 2021 18:01:07 +0200 Subject: [PATCH] fixup! bootstrap: freeze more intrinsics --- lib/internal/freeze_intrinsics.js | 4 +++- test/parallel/test-freeze-intrinsics.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/internal/freeze_intrinsics.js b/lib/internal/freeze_intrinsics.js index 3e04c439395c56..ca73559c3eb0cf 100644 --- a/lib/internal/freeze_intrinsics.js +++ b/lib/internal/freeze_intrinsics.js @@ -94,6 +94,7 @@ const { Symbol, SymbolIterator, SymbolMatchAll, + SymbolPrototype, SyntaxError, SyntaxErrorPrototype, TypeError, @@ -134,10 +135,11 @@ module.exports = function() { } = require('timers'); const intrinsicPrototypes = [ - // 21 Fundamental Objects + // 20 Fundamental Objects ObjectPrototype, // 20.1 FunctionPrototype, // 20.2 BooleanPrototype, // 20.3 + SymbolPrototype, // 20.4 ErrorPrototype, // 20.5 AggregateErrorPrototype, diff --git a/test/parallel/test-freeze-intrinsics.js b/test/parallel/test-freeze-intrinsics.js index f52c98b4c56bb6..978a6861a517fc 100644 --- a/test/parallel/test-freeze-intrinsics.js +++ b/test/parallel/test-freeze-intrinsics.js @@ -35,5 +35,5 @@ assert.throws( { assert.throws(() => { globalThis.globalThis = null; }, { name: 'TypeError' }); - assert.notStrictEqual(globalThis, null); + assert.strictEqual(globalThis.globalThis, globalThis); }