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

Unified Diff: runtime/vm/dart_api_message.cc

Issue 243973002: - Add a minimal implementation of Capability. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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
Index: runtime/vm/dart_api_message.cc
===================================================================
--- runtime/vm/dart_api_message.cc (revision 35191)
+++ runtime/vm/dart_api_message.cc (working copy)
@@ -316,20 +316,6 @@
// TODO(sgjesse): Handle other instances. Currently this will
// skew the reading as the fields of the instance is not read.
}
- } else if (strcmp("dart:isolate", library_uri) == 0 &&
- strncmp("_SendPortImpl@", class_name, 14) == 0) {
- 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) {
- object->type = Dart_CObject_kSendPort;
- object->value.as_send_port = port->value.as_int32;
- } else if (port->type == Dart_CObject_kInt64) {
- object->type = Dart_CObject_kSendPort;
- object->value.as_send_port = port->value.as_int64;
- }
} else {
// TODO(sgjesse): Handle other instances. Currently this will
// skew the reading as the fields of the instance is not read.
@@ -601,6 +587,13 @@
::free(utf16);
return object;
}
+ case kSendPortCid: {
+ int64_t value64 = Read<int64_t>();
+ Dart_CObject* object = AllocateDartCObject(Dart_CObject_kSendPort);
+ object->value.as_send_port = value64;
+ AddBackRef(object_id, object, kIsDeserialized);
+ return object;
+ }
#define READ_TYPED_DATA_HEADER(type) \
intptr_t len = ReadSmiValue(); \

Powered by Google App Engine
This is Rietveld 408576698