Index: runtime/vm/snapshot.cc |
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc |
index 6dbff558cea84fb0debf725b8ec403680a6f7486..7bc4a2727d387320ec44b5beb038ebc6680b92cd 100644 |
--- a/runtime/vm/snapshot.cc |
+++ b/runtime/vm/snapshot.cc |
@@ -980,6 +980,10 @@ void SnapshotWriter::WriteObjectRef(RawObject* raw) { |
return; |
} |
+ if (RawObject::IsTypedDataViewClassId(class_id)) { |
+ WriteInstanceRef(raw, cls); |
+ return; |
+ } |
// Object is being referenced, add it to the forward ref list and mark |
// it so that future references to this object in the snapshot will use |
// this object id. Mark it as not having been serialized yet so that we |
@@ -1019,7 +1023,8 @@ void SnapshotWriter::WriteObjectRef(RawObject* raw) { |
CLASS_LIST_TYPED_DATA(SNAPSHOT_WRITE) |
case kByteDataViewCid: { |
- WriteInstanceRef(raw, cls); |
+ // Handled above. |
+ UNREACHABLE(); |
return; |
} |
#undef SNAPSHOT_WRITE |
siva
2013/04/09 21:15:12
Do we need this set of case statements for typedat
Søren Gjesse
2013/04/10 13:25:20
Yes, of cause. Done.
|
@@ -1088,6 +1093,7 @@ intptr_t SnapshotWriter::MarkObject(RawObject* raw, SerializeState state) { |
value = SerializedHeaderTag::update(kObjectId, value); |
value = SerializedHeaderData::update(object_id, value); |
uword tags = raw->ptr()->tags_; |
+ ASSERT(SerializedHeaderTag::decode(tags) != kObjectId); |
raw->ptr()->tags_ = value; |
ForwardObjectNode* node = new ForwardObjectNode(raw, tags, state); |
ASSERT(node != NULL); |