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>2021-05-26 19:42:00 +0300
committerJoyee Cheung <joyeec9h3@gmail.com>2021-06-10 09:17:49 +0300
commit30e8b5e2a2638d26939eb6cb00c1ffb77fdba6f7 (patch)
treee131e2ad4cc707355cbe4c40db7ff94d2a9a77c8 /src/node.cc
parentf461158febdffe8eaa6468b1b716f2dbe40fd056 (diff)
tools: refactor snapshot builder
This patch: - Moves the snapshot building code to src/ so that we can reuse it later when generating custom snapshots from an entry point accepted by the node binary. - Create a SnapshotData struct that incorporates all the data useful for a snapshot blob, including both the V8 data and the Node.js data. PR-URL: https://github.com/nodejs/node/pull/38902 Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Diffstat (limited to 'src/node.cc')
-rw-r--r--src/node.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/node.cc b/src/node.cc
index 3ca2a05d8b8..75ad5689fca 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -1130,7 +1130,7 @@ int Start(int argc, char** argv) {
{
Isolate::CreateParams params;
- const std::vector<size_t>* indexes = nullptr;
+ const std::vector<size_t>* indices = nullptr;
const EnvSerializeInfo* env_info = nullptr;
bool force_no_snapshot =
per_process::cli_options->per_isolate->no_node_snapshot;
@@ -1138,7 +1138,7 @@ int Start(int argc, char** argv) {
v8::StartupData* blob = NodeMainInstance::GetEmbeddedSnapshotBlob();
if (blob != nullptr) {
params.snapshot_blob = blob;
- indexes = NodeMainInstance::GetIsolateDataIndexes();
+ indices = NodeMainInstance::GetIsolateDataIndices();
env_info = NodeMainInstance::GetEnvSerializeInfo();
}
}
@@ -1149,7 +1149,7 @@ int Start(int argc, char** argv) {
per_process::v8_platform.Platform(),
result.args,
result.exec_args,
- indexes);
+ indices);
result.exit_code = main_instance.Run(env_info);
}