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

Unified Diff: runtime/vm/service_event.cc

Issue 1765563002: Stream blocks of timeline events over the service protocol (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/service_event.cc
diff --git a/runtime/vm/service_event.cc b/runtime/vm/service_event.cc
index 2e64c66a7dd2185daaad046daa77de20a2da4883..02cc2a8937cc21000e649f7d01ba2e152099e962 100644
--- a/runtime/vm/service_event.cc
+++ b/runtime/vm/service_event.cc
@@ -42,6 +42,7 @@ ServiceEvent::ServiceEvent(Isolate* isolate, EventKind event_kind)
embedder_stream_id_(NULL),
breakpoint_(NULL),
top_frame_(NULL),
+ timeline_event_block_(NULL),
extension_rpc_(NULL),
exception_(NULL),
at_async_jump_(false),
@@ -64,6 +65,7 @@ ServiceEvent::ServiceEvent(const DebuggerEvent* debugger_event)
kind_(TranslateEventKind(debugger_event->type())),
breakpoint_(NULL),
top_frame_(NULL),
+ timeline_event_block_(NULL),
extension_rpc_(NULL),
exception_(NULL),
at_async_jump_(false),
@@ -137,6 +139,8 @@ const char* ServiceEvent::KindAsCString() const {
return "Illegal";
case kExtension:
return "Extension";
+ case kTimelineEvents:
+ return "TimelineEvents";
default:
UNREACHABLE();
return "Unknown";
@@ -181,6 +185,9 @@ const char* ServiceEvent::stream_id() const {
case kExtension:
return Service::extension_stream.id();
+ case kTimelineEvents:
+ return Service::timeline_stream.id();
+
default:
UNREACHABLE();
return NULL;
@@ -207,6 +214,9 @@ void ServiceEvent::PrintJSON(JSONStream* js) const {
jsobj.AddProperty("breakpoint", breakpoint());
}
}
+ if (kind() == kTimelineEvents) {
+ jsobj.AddProperty("timelineEvents", timeline_event_block_);
+ }
if (kind() == kDebuggerSettingsUpdate) {
JSONObject jssettings(&jsobj, "_debuggerSettings");
isolate()->debugger()->PrintSettingsToJSONObject(&jssettings);
@@ -261,7 +271,7 @@ void ServiceEvent::PrintJSONHeader(JSONObject* jsobj) const {
jsobj->AddProperty("extensionKind",
extension_event_.event_kind->ToCString());
}
- if (kind() == kVMUpdate) {
+ if (isolate() == NULL) {
jsobj->AddPropertyVM("vm");
} else {
jsobj->AddProperty("isolate", isolate());

Powered by Google App Engine
This is Rietveld 408576698