Index: src/snapshot/partial-serializer.cc |
diff --git a/src/snapshot/partial-serializer.cc b/src/snapshot/partial-serializer.cc |
index 0f1f133edc0b1707658bb6de70bde0a50726fc6d..8122ed0729d9b13a3ef07ee6d26c89c3f4efbc9b 100644 |
--- a/src/snapshot/partial-serializer.cc |
+++ b/src/snapshot/partial-serializer.cc |
@@ -85,8 +85,10 @@ void PartialSerializer::SerializeObject(HeapObject* obj, HowToCode how_to_code, |
// Clear literal boilerplates. |
if (obj->IsJSFunction()) { |
- FixedArray* literals = JSFunction::cast(obj)->literals(); |
- for (int i = 0; i < literals->length(); i++) literals->set_undefined(i); |
+ LiteralsArray* literals = JSFunction::cast(obj)->literals(); |
+ for (int i = 0; i < literals->literals_count(); i++) { |
+ literals->set_literal_undefined(i); |
+ } |
} |
// Object has not yet been serialized. Serialize it here. |