Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2019-04-14 12:46:52 +0300
committerJoyee Cheung <joyeec9h3@gmail.com>2019-04-20 16:14:01 +0300
commit5356b4a675ff8cb5f7de0a0bfe08a385d8a6f203 (patch)
tree53e21ce501eca897249afa847e539171e87431f6 /src/node_internals.h
parent964174e339b4440923deee2ebec3872d4f89f160 (diff)
src: split per-process initialization and teardown routines
This patch makes it possible to instantiate NodeMainInstance in a separate target and use it to e.g. create snapshot. PR-URL: https://github.com/nodejs/node/pull/27276 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'src/node_internals.h')
-rw-r--r--src/node_internals.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/node_internals.h b/src/node_internals.h
index 5e7bd18dcec..3fc6ea07361 100644
--- a/src/node_internals.h
+++ b/src/node_internals.h
@@ -311,6 +311,15 @@ v8::MaybeLocal<v8::Value> ExecuteBootstrapper(
std::vector<v8::Local<v8::Value>>* arguments);
void MarkBootstrapComplete(const v8::FunctionCallbackInfo<v8::Value>& args);
+struct InitializationResult {
+ int exit_code = 0;
+ std::vector<std::string> args;
+ std::vector<std::string> exec_args;
+ bool early_return = false;
+};
+InitializationResult InitializeOncePerProcess(int argc, char** argv);
+void TearDownOncePerProcess();
+
#if HAVE_INSPECTOR
namespace profiler {
void StartCoverageCollection(Environment* env);