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

Unified Diff: vm/raw_object_snapshot.cc

Issue 11344018: Fix for issue 6311 (serialize the right type). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 2 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 | vm/snapshot_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/raw_object_snapshot.cc
===================================================================
--- vm/raw_object_snapshot.cc (revision 14118)
+++ vm/raw_object_snapshot.cc (working copy)
@@ -2113,13 +2113,14 @@
#undef EXTERNALARRAY_READ_FROM
+template<typename ElementT>
static void ByteArrayWriteTo(SnapshotWriter* writer,
intptr_t object_id,
Snapshot::Kind kind,
intptr_t byte_array_kind,
intptr_t tags,
RawSmi* length,
- uint8_t* data) {
+ ElementT* data) {
ASSERT(writer != NULL);
intptr_t len = Smi::Value(length);
@@ -2157,7 +2158,7 @@
k##name##ArrayCid, \
writer->GetObjectTags(this), \
ptr()->length_, \
- reinterpret_cast<uint8_t*>(ptr()->data_)); \
+ ptr()->data_); \
} \
@@ -2175,7 +2176,7 @@
k##name##ArrayCid, \
writer->GetObjectTags(this), \
ptr()->length_, \
- reinterpret_cast<uint8_t*>(ptr()->external_data_->data())); \
+ ptr()->external_data_->data()); \
} \
« no previous file with comments | « no previous file | vm/snapshot_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698