Skip to content

Commit 455c923

Browse files
committed
fixup! process: split execution into main scripts
1 parent 857d84f commit 455c923

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/node.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ MaybeLocal<Value> StartMainThreadExecution(Environment* env) {
777777
return StartExecution(env, "internal/main/print_bash_completion");
778778
}
779779

780-
if (per_process::cli_options->prof_process) {
780+
if (env->options()->prof_process) {
781781
env->set_execution_mode(Environment::ExecutionMode::kPrintBashCompletion);
782782
return StartExecution(env, "internal/main/prof_process");
783783
}

src/node_options.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,11 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
205205
AddOption("--preserve-symlinks-main",
206206
"preserve symbolic links when resolving the main module",
207207
&EnvironmentOptions::preserve_symlinks_main);
208+
AddOption("--prof-process",
209+
"process V8 profiler output generated using --prof",
210+
&EnvironmentOptions::prof_process);
211+
// Options after --prof-process are passed through to the prof processor.
212+
AddAlias("--prof-process", { "--prof-process", "--" });
208213
AddOption("--redirect-warnings",
209214
"write warnings to file instead of stderr",
210215
&EnvironmentOptions::redirect_warnings,
@@ -382,11 +387,6 @@ PerProcessOptionsParser::PerProcessOptionsParser() {
382387
AddOption("--v8-options",
383388
"print V8 command line options",
384389
&PerProcessOptions::print_v8_help);
385-
AddOption("--prof-process",
386-
"process V8 profiler output generated using --prof",
387-
&PerProcessOptions::prof_process);
388-
// Options after --prof-process are passed through to the prof processor.
389-
AddAlias("--prof-process", {"--prof-process", "--"});
390390

391391
#ifdef NODE_HAVE_I18N_SUPPORT
392392
AddOption("--icu-data-dir",

src/node_options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ class EnvironmentOptions : public Options {
107107
bool pending_deprecation = false;
108108
bool preserve_symlinks = false;
109109
bool preserve_symlinks_main = false;
110+
bool prof_process = false;
110111
std::string redirect_warnings;
111112
bool throw_deprecation = false;
112113
bool trace_deprecation = false;
@@ -174,7 +175,6 @@ class PerProcessOptions : public Options {
174175
bool print_help = false;
175176
bool print_v8_help = false;
176177
bool print_version = false;
177-
bool prof_process = false;
178178

179179
#ifdef NODE_HAVE_I18N_SUPPORT
180180
std::string icu_data_dir;

src/node_process_object.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ MaybeLocal<Object> CreateProcessObject(
238238

239239
// --prof-process
240240
// TODO(addaleax): Remove this.
241-
if (per_process::cli_options->prof_process) {
241+
if (env->options()->prof_process) {
242242
READONLY_PROPERTY(process, "profProcess", True(env->isolate()));
243243
}
244244

0 commit comments

Comments
 (0)