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

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: 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..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);
« 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