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

Unified Diff: runtime/vm/raw_object_snapshot.cc

Issue 354763004: - Implement Isolate.pause and Isolate.resume. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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/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.
}

Powered by Google App Engine
This is Rietveld 408576698