Index: src/mksnapshot.cc |
diff --git a/src/mksnapshot.cc b/src/mksnapshot.cc |
index b4a40180a5081e1451338fe404cc798c216d21de..2e2ff6cd268176a25ee38bec4be26b6d8ff9aeae 100644 |
--- a/src/mksnapshot.cc |
+++ b/src/mksnapshot.cc |
@@ -67,6 +67,11 @@ class SnapshotWriter { |
const i::Serializer& serializer, |
const i::List<i::byte>& context_snapshot_data, |
const i::Serializer& context_serializer) const { |
+ // The serializer supports large objects, but we don't expect any in the |
+ // the startup snapshot. If this changes, we need to write it into the |
+ // snapshot file and read it for deserialization. |
+ CHECK_EQ(0, serializer.large_objects_total_size()); |
+ CHECK_EQ(0, context_serializer.large_objects_total_size()); |
WriteSnapshotFile(snapshot_data, serializer, |
context_snapshot_data, context_serializer); |
MaybeWriteStartupBlob(snapshot_data, serializer, |
@@ -84,10 +89,11 @@ class SnapshotWriter { |
i::List<i::byte> startup_blob; |
i::ListSnapshotSink sink(&startup_blob); |
- int spaces[] = { |
- i::NEW_SPACE, i::OLD_POINTER_SPACE, i::OLD_DATA_SPACE, i::CODE_SPACE, |
- i::MAP_SPACE, i::CELL_SPACE, i::PROPERTY_CELL_SPACE |
- }; |
+ // Large object space reservation is not necessary. |
+ int spaces[] = {i::NEW_SPACE, i::OLD_POINTER_SPACE, |
+ i::OLD_DATA_SPACE, i::CODE_SPACE, |
+ i::MAP_SPACE, i::CELL_SPACE, |
+ i::PROPERTY_CELL_SPACE}; |
i::byte* snapshot_bytes = snapshot_data.begin(); |
sink.PutBlob(snapshot_bytes, snapshot_data.length(), "snapshot"); |