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

Unified Diff: runtime/vm/json_stream.cc

Issue 1170503004: Initial Timeline Events (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
« no previous file with comments | « runtime/vm/json_stream.h ('k') | runtime/vm/object.h » ('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 729330f9998ff673d518beb77347eae402af9ed7..e716e508e45381b6ed937406b35b3926ad852ad0 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"
@@ -391,6 +392,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));
@@ -481,6 +488,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;
« no previous file with comments | « runtime/vm/json_stream.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698