Index: runtime/vm/json_stream.cc |
diff --git a/runtime/vm/json_stream.cc b/runtime/vm/json_stream.cc |
index 71d30a9b0168b73de9912b7c24e81e3a65d27c6c..db1873de1e4219b5df7f72a53d766de91c318445 100644 |
--- a/runtime/vm/json_stream.cc |
+++ b/runtime/vm/json_stream.cc |
@@ -12,6 +12,7 @@ |
#include "vm/object.h" |
#include "vm/service_event.h" |
#include "vm/service.h" |
+#include "vm/timeline.h" |
#include "vm/unicode.h" |
@@ -355,6 +356,12 @@ void JSONStream::PrintValue(Isolate* isolate, bool ref) { |
} |
+void JSONStream::PrintValue(TimelineEvent* timeline_event) { |
+ PrintCommaIfNeeded(); |
+ timeline_event->PrintJSON(this); |
+} |
+ |
+ |
void JSONStream::PrintServiceId(const Object& o) { |
ASSERT(id_zone_ != NULL); |
PrintProperty("id", id_zone_->GetServiceId(o)); |
@@ -437,6 +444,13 @@ void JSONStream::PrintProperty(const char* name, Isolate* isolate) { |
} |
+void JSONStream::PrintProperty(const char* name, |
+ TimelineEvent* timeline_event) { |
+ PrintPropertyName(name); |
+ PrintValue(timeline_event); |
+} |
+ |
+ |
void JSONStream::PrintfProperty(const char* name, const char* format, ...) { |
PrintPropertyName(name); |
va_list args; |