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

Unified Diff: runtime/vm/json_stream.cc

Issue 1132323002: Add Service ID zones to service protocol (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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
« no previous file with comments | « runtime/vm/json_stream.h ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/json_stream.cc
diff --git a/runtime/vm/json_stream.cc b/runtime/vm/json_stream.cc
index c122bb787e24132a107acf53fd4ce4e6887c913d..82283719d70a77db751f753584c9e22bf1e99ce8 100644
--- a/runtime/vm/json_stream.cc
+++ b/runtime/vm/json_stream.cc
@@ -11,6 +11,7 @@
#include "vm/metrics.h"
#include "vm/object.h"
#include "vm/service_event.h"
+#include "vm/service.h"
#include "vm/unicode.h"
@@ -21,6 +22,9 @@ DECLARE_FLAG(bool, trace_service);
JSONStream::JSONStream(intptr_t buf_size)
: open_objects_(0),
buffer_(buf_size),
+ default_id_zone_(Isolate::Current()->object_id_ring(),
+ ObjectIdRing::kAllocateId),
+ id_zone_(&default_id_zone_),
reply_port_(ILLEGAL_PORT),
seq_(""),
method_(""),
@@ -285,6 +289,12 @@ void JSONStream::PrintValue(Isolate* isolate, bool ref) {
}
+void JSONStream::PrintServiceId(const char* name, const Object& o) {
+ ASSERT(id_zone_ != NULL);
+ PrintProperty(name, id_zone_->GetServiceId(o));
+}
+
+
void JSONStream::PrintPropertyBool(const char* name, bool b) {
PrintPropertyName(name);
PrintValueBool(b);
« no previous file with comments | « runtime/vm/json_stream.h ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698