Skip to content

Commit 056b0bd

Browse files
MarshallOfSoundaddaleax
authored andcommittedJul 14, 2019
src: add missing option parser template for the DebugOptionsParser
This allows embedders to run `node::options_parser::Parse` for a `node::DebugOptions`. PR-URL: #28543 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 88bac02 commit 056b0bd

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
 

‎src/node_options.cc

+11
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,17 @@ class PerProcessOptionsParser : public OptionsParser<PerProcessOptions> {
226226
#if HAVE_INSPECTOR
227227
const DebugOptionsParser _dop_instance{};
228228
const EnvironmentOptionsParser _eop_instance{_dop_instance};
229+
230+
// This Parse is not dead code. It is used by embedders (e.g., Electron).
231+
template <>
232+
void Parse(
233+
StringVector* const args, StringVector* const exec_args,
234+
StringVector* const v8_args,
235+
DebugOptions* const options,
236+
OptionEnvvarSettings required_env_settings, StringVector* const errors) {
237+
_dop_instance.Parse(
238+
args, exec_args, v8_args, options, required_env_settings, errors);
239+
}
229240
#else
230241
const EnvironmentOptionsParser _eop_instance{};
231242
#endif // HAVE_INSPECTOR

0 commit comments

Comments
 (0)
Please sign in to comment.