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>2022-05-05 14:37:01 +0300
committerRafaelGSS <rafael.nunu@hotmail.com>2022-05-10 15:13:18 +0300
commita20310d171aea18accf93ade3d60234944ba6c54 (patch)
tree8ad6f6cdf65bab60d99ad3cf661e79e113d63b2a /src/node_snapshot_builder.h
parent2df1624f804ca5113655575a0546f41a58dc8e02 (diff)
bootstrap: use a context snapshotted with primordials in workers
PR-URL: https://github.com/nodejs/node/pull/42867 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Diffstat (limited to 'src/node_snapshot_builder.h')
-rw-r--r--src/node_snapshot_builder.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/node_snapshot_builder.h b/src/node_snapshot_builder.h
index 183c39bdd76..61450a51dfa 100644
--- a/src/node_snapshot_builder.h
+++ b/src/node_snapshot_builder.h
@@ -29,6 +29,9 @@ class SnapshotBuilder {
static void InitializeIsolateParams(const SnapshotData* data,
v8::Isolate::CreateParams* params);
+ static const size_t kNodeBaseContextIndex = 0;
+ static const size_t kNodeMainContextIndex = kNodeBaseContextIndex + 1;
+
private:
// Used to synchronize access to the snapshot data
static Mutex snapshot_data_mutex_;