From 459d4481d456dfcbf616dbe6faaa92695ea71e6a Mon Sep 17 00:00:00 2001 From: Emanuel Hoogeveen Date: Tue, 15 Nov 2022 14:27:54 +0100 Subject: [PATCH] src: add --max-semi-space-size to the options allowed in NODE_OPTIONS PR-URL: https://github.com/nodejs/node/pull/44436 Reviewed-By: Luigi Pinca Reviewed-By: Ben Noordhuis Reviewed-By: Evan Lucas Reviewed-By: Michael Dawson Reviewed-By: James M Snell Reviewed-By: Antoine du Hamel --- doc/api/cli.md | 1 + src/node_options.cc | 1 + test/parallel/test-cli-node-options.js | 1 + 3 files changed, 3 insertions(+) diff --git a/doc/api/cli.md b/doc/api/cli.md index 9fa3463eda1d36..ae5ee435f9aa22 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -1945,6 +1945,7 @@ V8 options that are allowed are: * `--interpreted-frames-native-stack` * `--jitless` * `--max-old-space-size` +* `--max-semi-space-size` * `--perf-basic-prof-only-functions` * `--perf-basic-prof` * `--perf-prof-unwinding-info` diff --git a/src/node_options.cc b/src/node_options.cc index d3c493a36d5f89..7f44ed0bcd90e1 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -709,6 +709,7 @@ PerIsolateOptionsParser::PerIsolateOptionsParser( V8Option{}, kAllowedInEnvvar); AddOption("--max-old-space-size", "", V8Option{}, kAllowedInEnvvar); + AddOption("--max-semi-space-size", "", V8Option{}, kAllowedInEnvvar); AddOption("--perf-basic-prof", "", V8Option{}, kAllowedInEnvvar); AddOption( "--perf-basic-prof-only-functions", "", V8Option{}, kAllowedInEnvvar); diff --git a/test/parallel/test-cli-node-options.js b/test/parallel/test-cli-node-options.js index 2d34a56e03c1a0..4d659a7b212441 100644 --- a/test/parallel/test-cli-node-options.js +++ b/test/parallel/test-cli-node-options.js @@ -72,6 +72,7 @@ expect('--disallow-code-generation-from-strings', 'B\n'); expect('--huge-max-old-generation-size', 'B\n'); expect('--jitless', 'B\n'); expect('--max-old-space-size=0', 'B\n'); +expect('--max-semi-space-size=0', 'B\n'); expect('--stack-trace-limit=100', /(\s*at f \(\[(eval|worker eval)\]:1:\d*\)\r?\n)/, '(function f() { f(); })();',