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

Unified Diff: dart/runtime/vm/dart_api_message.cc

Issue 59073003: Version 0.8.10.4 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month 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 | « dart/runtime/vm/bootstrap_natives.h ('k') | dart/runtime/vm/debugger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/runtime/vm/dart_api_message.cc
===================================================================
--- dart/runtime/vm/dart_api_message.cc (revision 29808)
+++ dart/runtime/vm/dart_api_message.cc (working copy)
@@ -291,11 +291,12 @@
if (type != Dart_TypedData_kInvalid) {
object->type =
static_cast<Dart_CObject_Type>(Dart_CObject_Internal::kView);
- ReadObjectImpl(); // Skip type arguments.
+ Dart_CObject_Internal* cls =
+ reinterpret_cast<Dart_CObject_Internal*>(ReadObjectImpl());
+ ASSERT(cls == object->cls);
object->internal.as_view.buffer = ReadObjectImpl();
object->internal.as_view.offset_in_bytes = ReadSmiValue();
object->internal.as_view.length = ReadSmiValue();
- ReadObjectImpl(); // Skip last field.
// The buffer is fully read now as typed data objects are
// serialized in-line.
@@ -317,7 +318,9 @@
}
} else if (strcmp("dart:isolate", library_uri) == 0 &&
strncmp("_SendPortImpl@", class_name, 14) == 0) {
- ReadObjectImpl(); // Skip type arguments.
+ Dart_CObject_Internal* cls =
+ reinterpret_cast<Dart_CObject_Internal*>(ReadObjectImpl());
+ ASSERT(cls == object->cls);
// Read the port id.
Dart_CObject* port = ReadObjectImpl();
if (port->type == Dart_CObject_kInt32) {
@@ -327,7 +330,6 @@
object->type = Dart_CObject_kSendPort;
object->value.as_send_port = port->value.as_int64;
}
- ReadObjectImpl(); // Skip last field.
} else {
// TODO(sgjesse): Handle other instances. Currently this will
// skew the reading as the fields of the instance is not read.
« no previous file with comments | « dart/runtime/vm/bootstrap_natives.h ('k') | dart/runtime/vm/debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698