-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The comment about calling the f function seems to have drifted a little. Moving it to be closer to the actual call. PR-URL: #8405 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
- Loading branch information
Showing
1 changed file
with
7 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3388,14 +3388,6 @@ void LoadEnvironment(Environment* env) { | |
CHECK(f_value->IsFunction()); | ||
Local<Function> f = Local<Function>::Cast(f_value); | ||
|
||
// Now we call 'f' with the 'process' variable that we've built up with | ||
// all our bindings. Inside bootstrap_node.js we'll take care of | ||
// assigning things to their places. | ||
|
||
// We start the process this way in order to be more modular. Developers | ||
// who do not like how bootstrap_node.js setups the module system but do | ||
// like Node's I/O bindings may want to replace 'f' with their own function. | ||
|
||
// Add a reference to the global object | ||
Local<Object> global = env->context()->Global(); | ||
|
||
|
@@ -3425,6 +3417,13 @@ void LoadEnvironment(Environment* env) { | |
// (Allows you to set stuff on `global` from anywhere in JavaScript.) | ||
global->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "global"), global); | ||
|
||
// Now we call 'f' with the 'process' variable that we've built up with | ||
// all our bindings. Inside bootstrap_node.js we'll take care of | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
danbev
Author
Contributor
|
||
// assigning things to their places. | ||
|
||
// We start the process this way in order to be more modular. Developers | ||
// who do not like how bootstrap_node.js setups the module system but do | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
danbev
Author
Contributor
|
||
// like Node's I/O bindings may want to replace 'f' with their own function. | ||
Local<Value> arg = env->process_object(); | ||
f->Call(Null(env->isolate()), 1, &arg); | ||
} | ||
|
"Inside bootstrap_node.js and internal/process"