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(); \ |