Skip to content

Commit

Permalink
bootstrap: move global initialization to js
Browse files Browse the repository at this point in the history
PR-URL: #43625
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
  • Loading branch information
alenakhineika authored and targos committed Jul 12, 2022
1 parent 9d918d9 commit 0783663
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 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
5 changes: 0 additions & 5 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -342,11 +342,6 @@ MaybeLocal<Value> Environment::BootstrapInternalLoaders() {
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 = {
process_string(),
Expand Down

0 comments on commit 0783663

Please sign in to comment.