diff options
author | Shelley Vohr <shelley.vohr@gmail.com> | 2021-06-01 15:47:03 +0300 |
---|---|---|
committer | Shelley Vohr <shelley.vohr@gmail.com> | 2021-06-07 11:39:47 +0300 |
commit | d8d1d9631b7388bae6c615fa51b32b10033be24a (patch) | |
tree | 13441ad2442a1e038c858ca3a14e52de3d5347a2 /src/node_internals.h | |
parent | d07c12f4441ff389f67868c6535c76bec7196cd6 (diff) |
src: make InitializeOncePerProcess more flexible
PR-URL: https://github.com/nodejs/node/pull/38888
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_internals.h')
-rw-r--r-- | src/node_internals.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/node_internals.h b/src/node_internals.h index b75092d662d..31076551e70 100644 --- a/src/node_internals.h +++ b/src/node_internals.h @@ -316,7 +316,20 @@ struct InitializationResult { std::vector<std::string> exec_args; bool early_return = false; }; + +enum InitializationSettingsFlags : uint64_t { + kDefaultInitialization = 1 << 0, + kInitializeV8 = 1 << 1, + kRunPlatformInit = 1 << 2, + kInitOpenSSL = 1 << 3 +}; + +// TODO(codebytere): eventually document and expose to embedders. InitializationResult InitializeOncePerProcess(int argc, char** argv); +InitializationResult InitializeOncePerProcess( + int argc, + char** argv, + InitializationSettingsFlags flags); void TearDownOncePerProcess(); void SetIsolateErrorHandlers(v8::Isolate* isolate, const IsolateSettings& s); void SetIsolateMiscHandlers(v8::Isolate* isolate, const IsolateSettings& s); |