Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2022-04-28 18:08:26 +0300
committerMichaël Zasso <targos@protonmail.com>2022-05-02 15:39:30 +0300
commit37ca1102c457775a6d5b89099bbc7b405272e1ac (patch)
tree535669249fa2990f7c3c2f0c5478c79cc4375534 /src/node_options.cc
parent1102922ef93fddba03c4919c36db7f14c59c08d5 (diff)
src: make --no-node-snapshot a per-process option
We enable the shared read-only heap which currently requires that the snapshot used in different isolates in the same process to be the same. Therefore --no-node-snapshot is a per-process option. PR-URL: https://github.com/nodejs/node/pull/42864 Refs: https://github.com/nodejs/node/pull/42809 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'src/node_options.cc')
-rw-r--r--src/node_options.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/node_options.cc b/src/node_options.cc
index b2b4c2c18c7..dae1ce1866f 100644
--- a/src/node_options.cc
+++ b/src/node_options.cc
@@ -650,10 +650,6 @@ PerIsolateOptionsParser::PerIsolateOptionsParser(
"track heap object allocations for heap snapshots",
&PerIsolateOptions::track_heap_objects,
kAllowedInEnvironment);
- AddOption("--node-snapshot",
- "", // It's a debug-only option.
- &PerIsolateOptions::node_snapshot,
- kAllowedInEnvironment);
// Explicitly add some V8 flags to mark them as allowed in NODE_OPTIONS.
AddOption("--abort-on-uncaught-exception",
@@ -755,7 +751,10 @@ PerProcessOptionsParser::PerProcessOptionsParser(
"Currently only supported in the node_mksnapshot binary.",
&PerProcessOptions::build_snapshot,
kDisallowedInEnvironment);
-
+ AddOption("--node-snapshot",
+ "", // It's a debug-only option.
+ &PerProcessOptions::node_snapshot,
+ kAllowedInEnvironment);
// 12.x renamed this inadvertently, so alias it for consistency within the
// release line, while using the original name for consistency with older
// release lines.