File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,7 @@ const {
120
120
decodeURIComponent,
121
121
encodeURI,
122
122
encodeURIComponent,
123
+ globalThis,
123
124
} = primordials ;
124
125
125
126
module . exports = function ( ) {
@@ -219,8 +220,6 @@ module.exports = function() {
219
220
ObjectGetOwnPropertyDescriptor ( FunctionPrototype , 'caller' ) . get ,
220
221
221
222
// 19 The Global Object
222
- // 19.1 Value Properties of the Global Object
223
- globalThis , // eslint-disable-line no-restricted-globals
224
223
// 19.2 Function Properties of the Global Object
225
224
eval ,
226
225
// eslint-disable-next-line node-core/prefer-primordials
@@ -357,6 +356,13 @@ module.exports = function() {
357
356
const frozenSet = new WeakSet ( ) ;
358
357
ArrayPrototypeForEach ( intrinsics , deepFreeze ) ;
359
358
359
+ // 19.1 Value Properties of the Global Object
360
+ ObjectDefineProperty ( globalThis , 'globalThis' , {
361
+ configurable : false ,
362
+ writable : false ,
363
+ value : globalThis ,
364
+ } ) ;
365
+
360
366
// Objects that are deeply frozen.
361
367
function deepFreeze ( root ) {
362
368
/**
You can’t perform that action at this time.
0 commit comments