Index: runtime/vm/snapshot.cc |
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc |
index 1d6651e129628f69ce4818c776c48be339e4c563..a566bc97f4a2bbe842057cc6a9f835674d02ce5e 100644 |
--- a/runtime/vm/snapshot.cc |
+++ b/runtime/vm/snapshot.cc |
@@ -191,7 +191,8 @@ SnapshotReader::SnapshotReader( |
typed_data_(TypedData::Handle(isolate)), |
error_(UnhandledException::Handle(isolate)), |
max_vm_isolate_object_id_( |
- Object::vm_isolate_snapshot_object_table().Length()), |
+ (kind == Snapshot::kFull) ? |
+ Object::vm_isolate_snapshot_object_table().Length() : 0), |
backward_references_(backward_refs) { |
} |
@@ -2266,7 +2267,7 @@ ScriptSnapshotWriter::ScriptSnapshotWriter(uint8_t** buffer, |
kInitialSize, |
&forward_list_, |
true), |
- forward_list_(SnapshotWriter::FirstObjectId()) { |
+ forward_list_(kMaxPredefinedObjectIds) { |
ASSERT(buffer != NULL); |
ASSERT(alloc != NULL); |
} |
@@ -2324,7 +2325,7 @@ MessageWriter::MessageWriter(uint8_t** buffer, |
kInitialSize, |
&forward_list_, |
can_send_any_object), |
- forward_list_(SnapshotWriter::FirstObjectId()) { |
+ forward_list_(kMaxPredefinedObjectIds) { |
ASSERT(buffer != NULL); |
ASSERT(alloc != NULL); |
} |