Index: runtime/vm/dart_api_message.cc |
diff --git a/runtime/vm/dart_api_message.cc b/runtime/vm/dart_api_message.cc |
index 90604483ae3e71e76aeb18230409ea1295515f07..aa0809915f208449c199f6ce556b45b85fbe01e9 100644 |
--- a/runtime/vm/dart_api_message.cc |
+++ b/runtime/vm/dart_api_message.cc |
@@ -681,6 +681,13 @@ Dart_CObject* ApiMessageReader::ReadInternalVMObject(intptr_t class_id, |
AddBackRef(object_id, object, kIsDeserialized); |
return object; |
} |
+ case kCapabilityCid: { |
+ int64_t id = Read<int64_t>(); |
+ Dart_CObject* object = AllocateDartCObject(Dart_CObject_kCapability); |
+ object->value.as_capability.id = id; |
+ AddBackRef(object_id, object, kIsDeserialized); |
+ return object; |
+ } |
#define READ_TYPED_DATA_HEADER(type) \ |
intptr_t len = ReadSmiValue(); \ |
@@ -1268,6 +1275,13 @@ bool ApiMessageWriter::WriteCObjectInlined(Dart_CObject* object, |
WriteRawPointerValue(reinterpret_cast<intptr_t>(callback)); |
break; |
} |
+ case Dart_CObject_kCapability: { |
+ WriteInlinedHeader(object); |
+ WriteIndexedObject(kCapabilityCid); |
+ WriteTags(0); |
+ Write<uint64_t>(object->value.as_capability.id); |
+ break; |
+ } |
default: |
UNREACHABLE(); |
} |