Skip to content

Commit 1fef02b

Browse files
src: add missing option parser template for the DebugOptionsParser
This allows embedders to run `node::options_parser::Parse` for a `node::DebugOptions`.
1 parent 8619b19 commit 1fef02b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/node_options.cc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,17 @@ class PerProcessOptionsParser : public OptionsParser<PerProcessOptions> {
231231
#if HAVE_INSPECTOR
232232
const DebugOptionsParser _dop_instance{};
233233
const EnvironmentOptionsParser _eop_instance{_dop_instance};
234+
235+
// This Parse is not dead code, it used by embedders (Electron).
236+
template <>
237+
void Parse(
238+
StringVector* const args, StringVector* const exec_args,
239+
StringVector* const v8_args,
240+
DebugOptions* const options,
241+
OptionEnvvarSettings required_env_settings, StringVector* const errors) {
242+
_dop_instance.Parse(
243+
args, exec_args, v8_args, options, required_env_settings, errors);
244+
}
234245
#else
235246
const EnvironmentOptionsParser _eop_instance{};
236247
#endif // HAVE_INSPECTOR

0 commit comments

Comments
 (0)