cli_remove_deprecated_v8_flag.patch 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  2. From: Omer Katz <[email protected]>
  3. Date: Thu, 19 Sep 2024 10:50:09 +0200
  4. Subject: cli: remove deprecated V8 flag
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. Remove the `--huge-max-old-generation-size` V8 flag from the
  9. `NODE_OPTIONS` allowlist. That flag was recently deprecated (it
  10. currently remains as nop, see crrev.com/c/5831467) and will soon be
  11. completely removed.
  12. PR-URL: https://github.com/nodejs/node/pull/54761
  13. Reviewed-By: Richard Lau <[email protected]>
  14. Reviewed-By: Luigi Pinca <[email protected]>
  15. Reviewed-By: Michaël Zasso <[email protected]>
  16. Reviewed-By: Yagiz Nizipli <[email protected]>
  17. diff --git a/doc/api/cli.md b/doc/api/cli.md
  18. index 0cfed4a4a91a3d3fb5aee6c9a4db3405ba836565..61d980a12fcf7c799e726e1462c65ce478a8ed0c 100644
  19. --- a/doc/api/cli.md
  20. +++ b/doc/api/cli.md
  21. @@ -3151,7 +3151,6 @@ V8 options that are allowed are:
  22. * `--disallow-code-generation-from-strings`
  23. * `--enable-etw-stack-walking`
  24. * `--expose-gc`
  25. -* `--huge-max-old-generation-size`
  26. * `--interpreted-frames-native-stack`
  27. * `--jitless`
  28. * `--max-old-space-size`
  29. diff --git a/src/node_options.cc b/src/node_options.cc
  30. index 4b3f7751db2871c8ce76b197a84a2417097030ea..21e53e1053fe2e4194d91b27a726d3a1306b1683 100644
  31. --- a/src/node_options.cc
  32. +++ b/src/node_options.cc
  33. @@ -922,11 +922,6 @@ PerIsolateOptionsParser::PerIsolateOptionsParser(
  34. "disallow eval and friends",
  35. V8Option{},
  36. kAllowedInEnvvar);
  37. - AddOption("--huge-max-old-generation-size",
  38. - "increase default maximum heap size on machines with 16GB memory "
  39. - "or more",
  40. - V8Option{},
  41. - kAllowedInEnvvar);
  42. AddOption("--jitless",
  43. "disable runtime allocation of executable memory",
  44. V8Option{},
  45. diff --git a/test/parallel/test-cli-node-options.js b/test/parallel/test-cli-node-options.js
  46. index e898a81af09ca6852ddc866310e5b8e0dc82971b..22d5a342df5d55f065383a6ebe1aebe59dc0f8d2 100644
  47. --- a/test/parallel/test-cli-node-options.js
  48. +++ b/test/parallel/test-cli-node-options.js
  49. @@ -70,7 +70,6 @@ if (common.hasCrypto) {
  50. expect('--abort_on-uncaught_exception', 'B\n');
  51. expect('--disallow-code-generation-from-strings', 'B\n');
  52. expect('--expose-gc', 'B\n');
  53. -expect('--huge-max-old-generation-size', 'B\n');
  54. expect('--jitless', 'B\n');
  55. expect('--max-old-space-size=0', 'B\n');
  56. expect('--max-semi-space-size=0', 'B\n');