diff options
author | Samuel Attard <sattard@slack-corp.com> | 2019-07-04 15:28:22 -0700 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2019-07-20 11:10:28 +0200 |
commit | 1f0fd1bb789362a68e58cc5d2e9c0abb2658d2c5 (patch) | |
tree | d7dbf2dd241b707b694296536292fddbd77f7348 /src | |
parent | b4aa7d357022383ae1256b6d5a42498119cb4018 (diff) | |
download | android-node-v8-1f0fd1bb789362a68e58cc5d2e9c0abb2658d2c5.tar.gz android-node-v8-1f0fd1bb789362a68e58cc5d2e9c0abb2658d2c5.tar.bz2 android-node-v8-1f0fd1bb789362a68e58cc5d2e9c0abb2658d2c5.zip |
src: add missing option parser template for the DebugOptionsParser
This allows embedders to run `node::options_parser::Parse` for a
`node::DebugOptions`.
PR-URL: https://github.com/nodejs/node/pull/28543
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/node_options.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/node_options.cc b/src/node_options.cc index 53a4171eda..b6ea82158c 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -226,6 +226,17 @@ class PerProcessOptionsParser : public OptionsParser<PerProcessOptions> { #if HAVE_INSPECTOR const DebugOptionsParser _dop_instance{}; const EnvironmentOptionsParser _eop_instance{_dop_instance}; + +// This Parse is not dead code. It is used by embedders (e.g., Electron). +template <> +void Parse( + StringVector* const args, StringVector* const exec_args, + StringVector* const v8_args, + DebugOptions* const options, + OptionEnvvarSettings required_env_settings, StringVector* const errors) { + _dop_instance.Parse( + args, exec_args, v8_args, options, required_env_settings, errors); +} #else const EnvironmentOptionsParser _eop_instance{}; #endif // HAVE_INSPECTOR |