| Index: runtime/vm/raw_object_snapshot.cc
|
| ===================================================================
|
| --- runtime/vm/raw_object_snapshot.cc (revision 35287)
|
| +++ runtime/vm/raw_object_snapshot.cc (working copy)
|
| @@ -2512,6 +2512,72 @@
|
| #undef EXT_TYPED_DATA_WRITE
|
|
|
|
|
| +RawCapability* Capability::ReadFrom(SnapshotReader* reader,
|
| + intptr_t object_id,
|
| + intptr_t tags,
|
| + Snapshot::Kind kind) {
|
| + UNIMPLEMENTED();
|
| + return Capability::null();
|
| +}
|
| +
|
| +
|
| +void RawCapability::WriteTo(SnapshotWriter* writer,
|
| + intptr_t object_id,
|
| + Snapshot::Kind kind) {
|
| + UNIMPLEMENTED();
|
| +}
|
| +
|
| +
|
| +RawReceivePort* ReceivePort::ReadFrom(SnapshotReader* reader,
|
| + intptr_t object_id,
|
| + intptr_t tags,
|
| + Snapshot::Kind kind) {
|
| + UNREACHABLE();
|
| + return ReceivePort::null();
|
| +}
|
| +
|
| +
|
| +void RawReceivePort::WriteTo(SnapshotWriter* writer,
|
| + intptr_t object_id,
|
| + Snapshot::Kind kind) {
|
| + if (kind == Snapshot::kMessage) {
|
| + // We do not allow objects with native fields in an isolate message.
|
| + writer->SetWriteException(Exceptions::kArgument,
|
| + "Illegal argument in isolate message"
|
| + " : (object is a RawReceivePort)");
|
| + } else {
|
| + UNREACHABLE();
|
| + }
|
| +}
|
| +
|
| +
|
| +RawSendPort* SendPort::ReadFrom(SnapshotReader* reader,
|
| + intptr_t object_id,
|
| + intptr_t tags,
|
| + Snapshot::Kind kind) {
|
| + uint64_t id = reader->Read<uint64_t>();
|
| +
|
| + SendPort& result = SendPort::ZoneHandle(reader->isolate(),
|
| + SendPort::New(id));
|
| + reader->AddBackRef(object_id, &result, kIsDeserialized);
|
| + return result.raw();
|
| +}
|
| +
|
| +
|
| +void RawSendPort::WriteTo(SnapshotWriter* writer,
|
| + intptr_t object_id,
|
| + Snapshot::Kind kind) {
|
| + // Write out the serialization header value for this object.
|
| + writer->WriteInlinedObjectHeader(object_id);
|
| +
|
| + // Write out the class and tags information.
|
| + writer->WriteIndexedObject(kSendPortCid);
|
| + writer->WriteIntptrValue(writer->GetObjectTags(this));
|
| +
|
| + writer->Write(ptr()->id_);
|
| +}
|
| +
|
| +
|
| RawStacktrace* Stacktrace::ReadFrom(SnapshotReader* reader,
|
| intptr_t object_id,
|
| intptr_t tags,
|
|
|