Skip to content

Commit a01e8bc

Browse files
committed
src: moving f function call comment
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]>
1 parent e4ac083 commit a01e8bc

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/node.cc

+7-8
Original file line numberDiff line numberDiff line change
@@ -3388,14 +3388,6 @@ void LoadEnvironment(Environment* env) {
33883388
CHECK(f_value->IsFunction());
33893389
Local<Function> f = Local<Function>::Cast(f_value);
33903390

3391-
// Now we call 'f' with the 'process' variable that we've built up with
3392-
// all our bindings. Inside bootstrap_node.js we'll take care of
3393-
// assigning things to their places.
3394-
3395-
// We start the process this way in order to be more modular. Developers
3396-
// who do not like how bootstrap_node.js setups the module system but do
3397-
// like Node's I/O bindings may want to replace 'f' with their own function.
3398-
33993391
// Add a reference to the global object
34003392
Local<Object> global = env->context()->Global();
34013393

@@ -3425,6 +3417,13 @@ void LoadEnvironment(Environment* env) {
34253417
// (Allows you to set stuff on `global` from anywhere in JavaScript.)
34263418
global->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "global"), global);
34273419

3420+
// Now we call 'f' with the 'process' variable that we've built up with
3421+
// all our bindings. Inside bootstrap_node.js we'll take care of
3422+
// assigning things to their places.
3423+
3424+
// We start the process this way in order to be more modular. Developers
3425+
// who do not like how bootstrap_node.js setups the module system but do
3426+
// like Node's I/O bindings may want to replace 'f' with their own function.
34283427
Local<Value> arg = env->process_object();
34293428
f->Call(Null(env->isolate()), 1, &arg);
34303429
}

0 commit comments

Comments
 (0)