From bf5dadeef07250763948765e9902edd2ecee5448 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Thu, 18 Apr 2019 22:09:28 +0800 Subject: 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 Reviewed-By: Refael Ackermann Reviewed-By: James M Snell Reviewed-By: Ben Noordhuis --- src/node_main_instance.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/node_main_instance.h') 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 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; -- cgit v1.2.3