@@ -240,7 +240,7 @@ bool config_experimental_modules = false;
240240
241241// Set in node.cc by ParseArgs when --loader is used.
242242// Used in node_config.cc to set a constant on process.binding('config')
243- // that is used by lib/internal/bootstrap_node .js
243+ // that is used by lib/internal/bootstrap/node .js
244244std::string config_userland_loader; // NOLINT(runtime/string)
245245
246246// Set by ParseArgs when --pending-deprecation or NODE_PENDING_DEPRECATION
@@ -253,7 +253,7 @@ std::string config_warning_file; // NOLINT(runtime/string)
253253// Set in node.cc by ParseArgs when --expose-internals or --expose_internals is
254254// used.
255255// Used in node_config.cc to set a constant on process.binding('config')
256- // that is used by lib/internal/bootstrap_node .js
256+ // that is used by lib/internal/bootstrap/node .js
257257bool config_expose_internals = false ;
258258
259259// Set to false in node.cc when NODE_NO_HTTP2=1 is used.
@@ -3685,23 +3685,23 @@ static Local<Function> GetBootstrapper(Environment* env, Local<String> source,
36853685 // are not safe to ignore.
36863686 try_catch.SetVerbose (false );
36873687
3688- // Execute the factory javascript file
3689- Local<Value> factory_v = ExecuteString (env, source, script_name);
3688+ // Execute the bootstrapper javascript file
3689+ Local<Value> bootstrapper_v = ExecuteString (env, source, script_name);
36903690 if (try_catch.HasCaught ()) {
36913691 ReportException (env, try_catch);
36923692 exit (10 );
36933693 }
36943694
3695- CHECK (factory_v ->IsFunction ());
3696- Local<Function> factory = Local<Function>::Cast (factory_v );
3695+ CHECK (bootstrapper_v ->IsFunction ());
3696+ Local<Function> bootstrapper = Local<Function>::Cast (bootstrapper_v );
36973697
3698- return scope.Escape (factory );
3698+ return scope.Escape (bootstrapper );
36993699}
37003700
3701- static bool ExecuteBootstrapper (Environment* env, Local<Function> factory ,
3701+ static bool ExecuteBootstrapper (Environment* env, Local<Function> bootstrapper ,
37023702 int argc, Local<Value> argv[],
37033703 Local<Value>* out) {
3704- bool ret = factory ->Call (
3704+ bool ret = bootstrapper ->Call (
37053705 env->context (), Null (env->isolate ()), argc, argv).ToLocal (out);
37063706
37073707 // If there was an error during bootstrap then it was either handled by the
@@ -3728,16 +3728,18 @@ void LoadEnvironment(Environment* env) {
37283728 // are not safe to ignore.
37293729 try_catch.SetVerbose (false );
37303730
3731- // The factory scripts are lib/internal/bootstrap_loaders .js and
3732- // lib/internal/bootstrap_node .js, each included as a static C string
3731+ // The bootstrapper scripts are lib/internal/bootstrap/loaders .js and
3732+ // lib/internal/bootstrap/node .js, each included as a static C string
37333733 // defined in node_javascript.h, generated in node_javascript.cc by
37343734 // node_js2c.
3735+ Local<String> loaders_name =
3736+ FIXED_ONE_BYTE_STRING (env->isolate (), " internal/bootstrap/loaders.js" );
37353737 Local<Function> loaders_bootstrapper =
3736- GetBootstrapper (env, LoadersBootstrapperSource (env),
3737- FIXED_ONE_BYTE_STRING (env->isolate (), " bootstrap_loaders.js" ));
3738+ GetBootstrapper (env, LoadersBootstrapperSource (env), loaders_name);
3739+ Local<String> node_name =
3740+ FIXED_ONE_BYTE_STRING (env->isolate (), " internal/bootstrap/node.js" );
37383741 Local<Function> node_bootstrapper =
3739- GetBootstrapper (env, NodeBootstrapperSource (env),
3740- FIXED_ONE_BYTE_STRING (env->isolate (), " bootstrap_node.js" ));
3742+ GetBootstrapper (env, NodeBootstrapperSource (env), node_name);
37413743
37423744 // Add a reference to the global object
37433745 Local<Object> global = env->context ()->Global ();
0 commit comments