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

Side by Side Diff: runtime/vm/service_event.cc

Issue 1293383011: Add an IsolateRunnable event to the service protocol. Improve service docs. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/service_event.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/service_event.h" 5 #include "vm/service_event.h"
6 6
7 namespace dart { 7 namespace dart {
8 8
9 // Translate from the legacy DebugEvent to a ServiceEvent. 9 // Translate from the legacy DebugEvent to a ServiceEvent.
10 static ServiceEvent::EventKind TranslateEventKind( 10 static ServiceEvent::EventKind TranslateEventKind(
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 type == DebuggerEvent::kExceptionThrown) { 55 type == DebuggerEvent::kExceptionThrown) {
56 set_top_frame(debugger_event->top_frame()); 56 set_top_frame(debugger_event->top_frame());
57 } 57 }
58 } 58 }
59 59
60 60
61 const char* ServiceEvent::KindAsCString() const { 61 const char* ServiceEvent::KindAsCString() const {
62 switch (kind()) { 62 switch (kind()) {
63 case kIsolateStart: 63 case kIsolateStart:
64 return "IsolateStart"; 64 return "IsolateStart";
65 case kIsolateRunnable:
66 return "IsolateRunnable";
65 case kIsolateExit: 67 case kIsolateExit:
66 return "IsolateExit"; 68 return "IsolateExit";
67 case kIsolateUpdate: 69 case kIsolateUpdate:
68 return "IsolateUpdate"; 70 return "IsolateUpdate";
69 case kPauseStart: 71 case kPauseStart:
70 return "PauseStart"; 72 return "PauseStart";
71 case kPauseExit: 73 case kPauseExit:
72 return "PauseExit"; 74 return "PauseExit";
73 case kPauseBreakpoint: 75 case kPauseBreakpoint:
74 return "PauseBreakpoint"; 76 return "PauseBreakpoint";
(...skipping 24 matching lines...) Expand all
99 default: 101 default:
100 UNREACHABLE(); 102 UNREACHABLE();
101 return "Unknown"; 103 return "Unknown";
102 } 104 }
103 } 105 }
104 106
105 107
106 const char* ServiceEvent::stream_id() const { 108 const char* ServiceEvent::stream_id() const {
107 switch (kind()) { 109 switch (kind()) {
108 case kIsolateStart: 110 case kIsolateStart:
111 case kIsolateRunnable:
109 case kIsolateExit: 112 case kIsolateExit:
110 case kIsolateUpdate: 113 case kIsolateUpdate:
111 return Service::isolate_stream.id(); 114 return Service::isolate_stream.id();
112 115
113 case kPauseStart: 116 case kPauseStart:
114 case kPauseExit: 117 case kPauseExit:
115 case kPauseBreakpoint: 118 case kPauseBreakpoint:
116 case kPauseInterrupted: 119 case kPauseInterrupted:
117 case kPauseException: 120 case kPauseException:
118 case kResume: 121 case kResume:
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 200
198 201
199 void ServiceEvent::PrintJSONHeader(JSONObject* jsobj) const { 202 void ServiceEvent::PrintJSONHeader(JSONObject* jsobj) const {
200 ASSERT(jsobj != NULL); 203 ASSERT(jsobj != NULL);
201 jsobj->AddProperty("type", "Event"); 204 jsobj->AddProperty("type", "Event");
202 jsobj->AddProperty("kind", KindAsCString()); 205 jsobj->AddProperty("kind", KindAsCString());
203 jsobj->AddProperty("isolate", isolate()); 206 jsobj->AddProperty("isolate", isolate());
204 } 207 }
205 208
206 } // namespace dart 209 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/service_event.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698