Index: runtime/vm/snapshot.cc |
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc |
index 6dbff558cea84fb0debf725b8ec403680a6f7486..d7ba30d8948ff23bec601bb9f5a86be8a30f20aa 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 |
@@ -1014,15 +1018,6 @@ void SnapshotWriter::WriteObjectRef(RawObject* raw) { |
return; |
} |
#undef SNAPSHOT_WRITE |
-#define SNAPSHOT_WRITE(clazz) \ |
- case kTypedData##clazz##ViewCid: \ |
- |
- CLASS_LIST_TYPED_DATA(SNAPSHOT_WRITE) |
- case kByteDataViewCid: { |
- WriteInstanceRef(raw, cls); |
- return; |
- } |
-#undef SNAPSHOT_WRITE |
default: break; |
} |
UNREACHABLE(); |
@@ -1088,6 +1083,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); |