Skip to content

Commit

Permalink
bootstrap: move global initialization to js
Browse files Browse the repository at this point in the history
  • Loading branch information
alenakhineika committed Jun 30, 2022
1 parent 08c8e85 commit 41933c5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions lib/internal/bootstrap/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ function setupGlobalProxy() {
enumerable: false,
configurable: true
});
globalThis.global = globalThis;
}

function setupBuffer() {
Expand Down
3 changes: 0 additions & 3 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,6 @@ MaybeLocal<Value> Environment::BootstrapNode() {
EscapableHandleScope scope(isolate_);

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

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

0 comments on commit 41933c5

Please sign in to comment.