diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2022-03-15 12:30:12 +0300 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2022-03-23 15:20:14 +0300 |
commit | bfb4ca8e94b2fda66c8adf048b9ac36c3c432e7f (patch) | |
tree | be8afac219fd3ce01363a3369fa93166b658bb4e /src/env.h | |
parent | c37fdacb348fa8f735f0c01fdfb0eefe6152dd34 (diff) |
bootstrap: use SnapshotData to pass snapshot data around
Instead of passing the snapshot blob, the per-isolate data
indices and the EnvSerializeInfo separately, use the aggregate
type Snapshot to carry these around, and refactor
NodeMainInstance so that it owns the v8::Isolate::CreateParams
when it owns its isolate. This also gets rid of the owns_isolate_
and deserialize_mode_ booleans in NodeMainInstance since
NodeMainInstance can compute these by just checking if it has
pointers to the CreateParams or the SnapshotData.
PR-URL: https://github.com/nodejs/node/pull/42360
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Diffstat (limited to 'src/env.h')
-rw-r--r-- | src/env.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/env.h b/src/env.h index 8fbe41518e1..efaeb53fbc7 100644 --- a/src/env.h +++ b/src/env.h @@ -36,6 +36,7 @@ #include "node_binding.h" #include "node_external_reference.h" #include "node_main_instance.h" +#include "node_native_module.h" #include "node_options.h" #include "node_perf_common.h" #include "node_snapshotable.h" @@ -972,7 +973,6 @@ struct EnvSerializeInfo { }; struct SnapshotData { - SnapshotData() { blob.data = nullptr; } v8::StartupData blob; std::vector<size_t> isolate_data_indices; EnvSerializeInfo env_info; |