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

Unified Diff: runtime/vm/service_event.cc

Issue 1143783003: Add the streamListen and streamCancel rpcs to the vm service. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: before commit Created 5 years, 7 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 070125d6f299f7f4cf83a5c23ff1963874633da7..a0faadf60d193c79d66ba2227d85e5f7468f5d93 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", "ServiceEvent");
« 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