Index: runtime/vm/raw_object_snapshot.cc |
=================================================================== |
--- runtime/vm/raw_object_snapshot.cc (revision 37860) |
+++ runtime/vm/raw_object_snapshot.cc (working copy) |
@@ -2528,15 +2528,26 @@ |
intptr_t object_id, |
intptr_t tags, |
Snapshot::Kind kind) { |
- UNIMPLEMENTED(); |
- return Capability::null(); |
+ uint64_t id = reader->Read<uint64_t>(); |
+ |
+ Capability& result = Capability::ZoneHandle(reader->isolate(), |
+ Capability::New(id)); |
+ reader->AddBackRef(object_id, &result, kIsDeserialized); |
+ return result.raw(); |
} |
void RawCapability::WriteTo(SnapshotWriter* writer, |
intptr_t object_id, |
Snapshot::Kind kind) { |
- UNIMPLEMENTED(); |
+ // Write out the serialization header value for this object. |
+ writer->WriteInlinedObjectHeader(object_id); |
+ |
+ // Write out the class and tags information. |
+ writer->WriteIndexedObject(kCapabilityCid); |
+ writer->WriteTags(writer->GetObjectTags(this)); |
+ |
+ writer->Write(ptr()->id_); |
siva
2014/07/01 21:42:56
writer->Write<uint64_t>(ptr()->id_);
so it reads
Ivan Posva
2014/07/03 12:51:17
Done. Also below in SendPort::WriteTo.
|
} |