Skip to content

Commit 1537ca4

Browse files
committed
bootstrap: move global to globalThis
1 parent 08c8e85 commit 1537ca4

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

lib/internal/bootstrap/node.js

+1
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ function setupGlobalProxy() {
402402
enumerable: false,
403403
configurable: true
404404
});
405+
globalThis.global = globalThis;
405406
}
406407

407408
function setupBuffer() {

src/node.cc

-3
Original file line numberDiff line numberDiff line change
@@ -343,9 +343,6 @@ MaybeLocal<Value> Environment::BootstrapNode() {
343343
EscapableHandleScope scope(isolate_);
344344

345345
Local<Object> global = context()->Global();
346-
// TODO(joyeecheung): this can be done in JS land now.
347-
global->Set(context(), FIXED_ONE_BYTE_STRING(isolate_, "global"), global)
348-
.Check();
349346

350347
// process, require, internalBinding, primordials
351348
std::vector<Local<String>> node_params = {

0 commit comments

Comments
 (0)