Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2916)

Unified Diff: runtime/vm/snapshot.cc

Issue 13866012: Fix issue with serializing typed array views (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698