Index: src/snapshot/partial-serializer.cc |
diff --git a/src/snapshot/partial-serializer.cc b/src/snapshot/partial-serializer.cc |
index a141aac19339b9fa32da323ca755122b5ed7e7e9..b78a1edbd0647f52079a4a3ee1c4b922ad334c5f 100644 |
--- a/src/snapshot/partial-serializer.cc |
+++ b/src/snapshot/partial-serializer.cc |
@@ -103,7 +103,7 @@ void PartialSerializer::SerializeObject(HeapObject* obj, HowToCode how_to_code, |
if (obj->IsJSObject()) { |
JSObject* jsobj = JSObject::cast(obj); |
if (jsobj->GetInternalFieldCount() > 0) { |
- DCHECK_NOT_NULL(serialize_internal_fields_); |
+ DCHECK_NOT_NULL(serialize_internal_fields_.callback); |
internal_field_holders_.Add(jsobj); |
} |
} |
@@ -132,7 +132,7 @@ void PartialSerializer::SerializeInternalFields() { |
DisallowHeapAllocation no_gc; |
DisallowJavascriptExecution no_js(isolate()); |
DisallowCompilation no_compile(isolate()); |
- DCHECK_NOT_NULL(serialize_internal_fields_); |
+ DCHECK_NOT_NULL(serialize_internal_fields_.callback); |
sink_.Put(kInternalFieldsData, "internal fields data"); |
while (internal_field_holders_.length() > 0) { |
HandleScope scope(isolate()); |
@@ -142,7 +142,8 @@ void PartialSerializer::SerializeInternalFields() { |
int internal_fields_count = obj->GetInternalFieldCount(); |
for (int i = 0; i < internal_fields_count; i++) { |
if (obj->GetInternalField(i)->IsHeapObject()) continue; |
- StartupData data = serialize_internal_fields_(v8::Utils::ToLocal(obj), i); |
+ StartupData data = serialize_internal_fields_.callback( |
+ v8::Utils::ToLocal(obj), i, serialize_internal_fields_.data); |
sink_.Put(kNewObject + reference.space(), "internal field holder"); |
PutBackReference(*obj, reference); |
sink_.PutInt(i, "internal field index"); |