diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2019-04-18 22:09:28 +0800 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2019-04-23 11:26:04 +0800 |
commit | bf5dadeef07250763948765e9902edd2ecee5448 (patch) | |
tree | ac7b81a4217ecd6d4f767c981db6ad4def233469 /src/node_main_instance.h | |
parent | d7016679509cd7f2d50612369509e8797d8157b0 (diff) | |
download | android-node-v8-bf5dadeef07250763948765e9902edd2ecee5448.tar.gz android-node-v8-bf5dadeef07250763948765e9902edd2ecee5448.tar.bz2 android-node-v8-bf5dadeef07250763948765e9902edd2ecee5448.zip |
src: enable snapshot with per-isolate data
Enable serializing the isolate from an isolate snapshot generated
by node_mksnapshot with per-isolate data.
PR-URL: https://github.com/nodejs/node/pull/27321
Refs: https://github.com/nodejs/node/issues/17058
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'src/node_main_instance.h')
-rw-r--r-- | src/node_main_instance.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/node_main_instance.h b/src/node_main_instance.h index 615fda1f49..98c17cc8f0 100644 --- a/src/node_main_instance.h +++ b/src/node_main_instance.h @@ -70,6 +70,11 @@ class NodeMainInstance { // and the environment creation routine in workers somehow. std::unique_ptr<Environment> CreateMainEnvironment(int* exit_code); + // If nullptr is returned, the binary is not built with embedded + // snapshot. + static const IndexArray* GetIsolateDataIndexes(); + static v8::StartupData* GetEmbeddedSnapshotBlob(); + private: NodeMainInstance(const NodeMainInstance&) = delete; NodeMainInstance& operator=(const NodeMainInstance&) = delete; |