Index: src/snapshot/partial-serializer.cc |
diff --git a/src/snapshot/partial-serializer.cc b/src/snapshot/partial-serializer.cc |
index 34defb4dced93d73c02de17747165946c48f47bb..8aeeed15e9a4f399f39e588499ed43b3294fcefe 100644 |
--- a/src/snapshot/partial-serializer.cc |
+++ b/src/snapshot/partial-serializer.cc |
@@ -83,8 +83,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. |