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

Unified Diff: runtime/vm/snapshot.cc

Issue 9159066: Allocate a Dart_CMessage structure when decoding a message into C structures (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments from asiva@ Created 8 years, 11 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 | « runtime/vm/snapshot.h ('k') | runtime/vm/snapshot_test.cc » ('j') | 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 472a2d20766dcbef85c3b041d7bce0d33d167601..78fe6a70d2f910f8ec6c74c601e35cd268f996ad 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -455,6 +455,17 @@ CMessageReader::CMessageReader(const uint8_t* buffer,
}
+Dart_CMessage* CMessageReader::ReadMessage() {
+ // Read the object out of the message.
+ Dart_CObject* object = ReadObject();
+
+ Dart_CMessage* message =
+ reinterpret_cast<Dart_CMessage*>(alloc_(NULL, 0, sizeof(Dart_CMessage)));
+ if (message == NULL) return NULL;
+ message->root = object;
+ return message;
+}
+
intptr_t CMessageReader::LookupInternalClass(intptr_t class_header) {
SerializedHeaderType header_type = SerializedHeaderTag::decode(class_header);
ASSERT(header_type == kObjectId);
« no previous file with comments | « runtime/vm/snapshot.h ('k') | runtime/vm/snapshot_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698