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); |