Index: src/snapshot/partial-serializer.cc |
diff --git a/src/snapshot/partial-serializer.cc b/src/snapshot/partial-serializer.cc |
index 66aafb5368b7c5e907b348363eaf2350e333332c..a141aac19339b9fa32da323ca755122b5ed7e7e9 100644 |
--- a/src/snapshot/partial-serializer.cc |
+++ b/src/snapshot/partial-serializer.cc |
@@ -102,7 +102,10 @@ void PartialSerializer::SerializeObject(HeapObject* obj, HowToCode how_to_code, |
if (obj->IsJSObject()) { |
JSObject* jsobj = JSObject::cast(obj); |
- if (jsobj->GetInternalFieldCount() > 0) internal_field_holders_.Add(jsobj); |
+ if (jsobj->GetInternalFieldCount() > 0) { |
+ DCHECK_NOT_NULL(serialize_internal_fields_); |
+ internal_field_holders_.Add(jsobj); |
+ } |
} |
// Object has not yet been serialized. Serialize it here. |