GeezerVison is showing github.com — vm: use v8::DeserializeInternalFieldsCallback explicitly · nodejs/node@e178a43
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: src/node_contextify.cc +15-12Lines changed: 15 additions & 12 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -208,21 +208,24 @@ MaybeLocal<Context> ContextifyContext::CreateV8Context( | 208 | 208 |
| 209 | 209 | Local<Context> ctx; | 210 | 210 | if (snapshot_data == nullptr) { | 211 | | - ctx = Context::New(isolate, | 212 | | - nullptr, // extensions | 213 | | - object_template, | 214 | | - {}, // global object | 215 | | - {}, // deserialization callback | 216 | | - queue); | | 211 | + ctx = Context::New( | | 212 | + isolate, | | 213 | + nullptr, // extensions | | 214 | + object_template, | | 215 | + {}, // global object | | 216 | + v8::DeserializeInternalFieldsCallback(), // deserialization callback | | 217 | + queue); | 217 | 218 | if (ctx.IsEmpty() || InitializeBaseContextForSnapshot(ctx).IsNothing()) { | 218 | 219 | return MaybeLocal<Context>(); | 219 | 220 | } | 220 | | - } else if (!Context::FromSnapshot(isolate, | 221 | | - SnapshotData::kNodeVMContextIndex, | 222 | | - {}, // deserialization callback | 223 | | - nullptr, // extensions | 224 | | - {}, // global object | 225 | | - queue) | | 221 | + } else if (!Context::FromSnapshot( | | 222 | + isolate, | | 223 | + SnapshotData::kNodeVMContextIndex, | | 224 | + v8::DeserializeInternalFieldsCallback(), // deserialization | | 225 | + // callback | | 226 | + nullptr, // extensions | | 227 | + {}, // global object | | 228 | + queue) | 226 | 229 | .ToLocal(&ctx)) { | 227 | 230 | return MaybeLocal<Context>(); | 228 | 231 | } | |
Collapse file Copy file name to clipboardExpand all lines: test/cctest/test_environment.cc +7-2Lines changed: 7 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -686,8 +686,13 @@ TEST_F(EnvironmentTest, NestedMicrotaskQueue) { | 686 | 686 |
| 687 | 687 | std::unique_ptr<v8::MicrotaskQueue> queue = v8::MicrotaskQueue::New( | 688 | 688 | isolate_, v8::MicrotasksPolicy::kExplicit); | 689 | | - v8::Local<v8::Context> context = v8::Context::New( | 690 | | - isolate_, nullptr, {}, {}, {}, queue.get()); | | 689 | + v8::Local<v8::Context> context = | | 690 | + v8::Context::New(isolate_, | | 691 | + nullptr, | | 692 | + {}, | | 693 | + {}, | | 694 | + v8::DeserializeInternalFieldsCallback(), | | 695 | + queue.get()); | 691 | 696 | node::InitializeContext(context); | 692 | 697 | v8::Context::Scope context_scope(context); | 693 | 698 |
| |
|