diff --git a/src/node_contextify.cc b/src/node_contextify.cc index ec0f68671301d0..c73df5bc2df5b0 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -208,21 +208,24 @@ MaybeLocal ContextifyContext::CreateV8Context( Local ctx; if (snapshot_data == nullptr) { - ctx = Context::New(isolate, - nullptr, // extensions - object_template, - {}, // global object - {}, // deserialization callback - queue); + ctx = Context::New( + isolate, + nullptr, // extensions + object_template, + {}, // global object + v8::DeserializeInternalFieldsCallback(), // deserialization callback + queue); if (ctx.IsEmpty() || InitializeBaseContextForSnapshot(ctx).IsNothing()) { return MaybeLocal(); } - } else if (!Context::FromSnapshot(isolate, - SnapshotData::kNodeVMContextIndex, - {}, // deserialization callback - nullptr, // extensions - {}, // global object - queue) + } else if (!Context::FromSnapshot( + isolate, + SnapshotData::kNodeVMContextIndex, + v8::DeserializeInternalFieldsCallback(), // deserialization + // callback + nullptr, // extensions + {}, // global object + queue) .ToLocal(&ctx)) { return MaybeLocal(); } diff --git a/test/cctest/test_environment.cc b/test/cctest/test_environment.cc index 2e747c7be58922..b3f588c7365305 100644 --- a/test/cctest/test_environment.cc +++ b/test/cctest/test_environment.cc @@ -687,7 +687,12 @@ TEST_F(EnvironmentTest, NestedMicrotaskQueue) { std::unique_ptr queue = v8::MicrotaskQueue::New( isolate_, v8::MicrotasksPolicy::kExplicit); v8::Local context = v8::Context::New( - isolate_, nullptr, {}, {}, {}, queue.get()); + isolate_, + nullptr, + {}, + {}, + v8::DeserializeInternalFieldsCallback(), + queue.get()); node::InitializeContext(context); v8::Context::Scope context_scope(context);