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

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
Index: runtime/vm/json_stream.cc
diff --git a/runtime/vm/json_stream.cc b/runtime/vm/json_stream.cc
index c122bb787e24132a107acf53fd4ce4e6887c913d..ecfe664c321bca528664020575282d29af22e644 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,8 @@ DECLARE_FLAG(bool, trace_service);
JSONStream::JSONStream(intptr_t buf_size)
: open_objects_(0),
buffer_(buf_size),
+ ring_service_id_zone_(ObjectIdRing::kNewId),
+ service_id_zone_(&ring_service_id_zone_),
reply_port_(ILLEGAL_PORT),
seq_(""),
method_(""),
@@ -285,6 +288,12 @@ void JSONStream::PrintValue(Isolate* isolate, bool ref) {
}
+void JSONStream::PrintServiceId(const char* name, const Object& o) {
+ ASSERT(service_id_zone_ != NULL);
+ PrintProperty(name, service_id_zone_->GetServiceId(o));
+}
+
+
void JSONStream::PrintPropertyBool(const char* name, bool b) {
PrintPropertyName(name);
PrintValueBool(b);

Powered by Google App Engine
This is Rietveld 408576698