Chromium Code Reviews| Index: runtime/vm/raw_object_snapshot.cc |
| diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc |
| index 405c2e4fe1b1a5a24320edc4d8a1a23de367f216..8f8e5428ee7dcb67a5f27452d06bd85fa48561a4 100644 |
| --- a/runtime/vm/raw_object_snapshot.cc |
| +++ b/runtime/vm/raw_object_snapshot.cc |
| @@ -115,6 +115,7 @@ void RawClass::WriteTo(SnapshotWriter* writer, |
| // Write out all the non object pointer fields. |
| // NOTE: cpp_vtable_ is not written. |
| classid_t class_id = ptr()->id_; |
| + ASSERT(class_id != kIllegalCid); |
| writer->Write<classid_t>(class_id); |
| if (!RawObject::IsInternalVMdefinedClassId(class_id)) { |
| // We don't write the instance size of VM defined classes as they |
| @@ -1290,6 +1291,7 @@ void RawLibrary::WriteTo(SnapshotWriter* writer, |
| } else { |
| ASSERT((kind == Snapshot::kFull) || !ptr()->is_in_fullsnapshot_); |
| // Write out all non object fields. |
| + // TODO(rmacnak): ASSERT(ptr()->index_ != static_cast<classid_t>(-1)); |
|
regis
2016/02/19 20:54:07
Is this ASSERT not yet valid?
rmacnak
2016/02/20 01:35:39
I put it back in locally but forgot to reupload th
|
| writer->WriteClassIDValue(ptr()->index_); |
| writer->Write<uint16_t>(ptr()->num_imports_); |
| writer->Write<int8_t>(ptr()->load_state_); |
| @@ -2003,6 +2005,9 @@ RawICData* ICData::ReadFrom(SnapshotReader* reader, |
| READ_OBJECT_FIELDS(result, |
| result.raw()->from(), toobj, |
| kAsReference); |
| + if (reader->snapshot_code()) { |
| + result.set_owner(Function::Handle(reader->zone())); |
| + } |
| return result.raw(); |
| } |