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

Unified Diff: runtime/vm/service_event.cc

Issue 1166433008: 2nd attempt at adding streamListen/streamCancel to the service protocol. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix context objects 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/service_event.h ('k') | runtime/vm/service_isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service_event.cc
diff --git a/runtime/vm/service_event.cc b/runtime/vm/service_event.cc
index 0583da4f7ccb8511378b8cc7fd3f42dad5da3a0c..2c6680df21b2c1cc862434a8154dd7ddf25bfa73 100644
--- a/runtime/vm/service_event.cc
+++ b/runtime/vm/service_event.cc
@@ -84,6 +84,8 @@ const char* ServiceEvent::EventTypeToCString(EventType type) {
return "GC"; // TODO(koda): Change to GarbageCollected.
case kInspect:
return "Inspect";
+ case kIllegal:
+ return "Illegal";
default:
UNREACHABLE();
return "Unknown";
@@ -91,6 +93,35 @@ const char* ServiceEvent::EventTypeToCString(EventType type) {
}
+const char* ServiceEvent::stream_id() const {
+ switch (type()) {
+ case kIsolateStart:
+ case kIsolateExit:
+ case kIsolateUpdate:
+ return "Isolate";
+
+ case kPauseStart:
+ case kPauseExit:
+ case kPauseBreakpoint:
+ case kPauseInterrupted:
+ case kPauseException:
+ case kResume:
+ case kBreakpointAdded:
+ case kBreakpointResolved:
+ case kBreakpointRemoved:
+ case kInspect:
+ return "Debug";
+
+ case kGC:
+ return "GC";
+
+ default:
+ UNREACHABLE();
+ return NULL;
+ }
+}
+
+
void ServiceEvent::PrintJSON(JSONStream* js) const {
JSONObject jsobj(js);
jsobj.AddProperty("type", "Event");
« no previous file with comments | « runtime/vm/service_event.h ('k') | runtime/vm/service_isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698