vm: include vm context in the embedded snapshot

Include a minimally initialized contextify context in the embedded
snapshot. This paves the way for user-land vm context snapshots.

PR-URL: https://github.com/nodejs/node/pull/44252
Refs: https://github.com/nodejs/node/issues/44014
Refs: https://github.com/nodejs/node/issues/37476
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
Joyee Cheung authored and RafaelGSS committed 2022-09-05 11:32:53 -03:00
1 parent bce827e5d1
commit 736a04aa13
4 files changed
+45 -11

No files matched your search

+1
View File
@@ -52,6 +52,7 @@ class ContextifyContext {
static v8::MaybeLocal<v8::Context> CreateV8Context(
v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> object_template,
const SnapshotData* snapshot_data,
v8::MicrotaskQueue* queue);
bool InitializeContext(v8::Local<v8::Context> ctx,
Environment* env,