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

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

Issue 1160873002: Sundry service protocol cleanups before version 1.0. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: pre commit 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/service/service.md ('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::EventType TranslateEventType( 10 static ServiceEvent::EventType TranslateEventType(
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 JSONObject jsobj(js); 95 JSONObject jsobj(js);
96 jsobj.AddProperty("type", "ServiceEvent"); 96 jsobj.AddProperty("type", "ServiceEvent");
97 jsobj.AddProperty("eventType", EventTypeToCString(type())); 97 jsobj.AddProperty("eventType", EventTypeToCString(type()));
98 jsobj.AddProperty("isolate", isolate()); 98 jsobj.AddProperty("isolate", isolate());
99 if (breakpoint() != NULL) { 99 if (breakpoint() != NULL) {
100 jsobj.AddProperty("breakpoint", breakpoint()); 100 jsobj.AddProperty("breakpoint", breakpoint());
101 } 101 }
102 if (top_frame() != NULL) { 102 if (top_frame() != NULL) {
103 JSONObject jsFrame(&jsobj, "topFrame"); 103 JSONObject jsFrame(&jsobj, "topFrame");
104 top_frame()->PrintToJSONObject(&jsFrame); 104 top_frame()->PrintToJSONObject(&jsFrame);
105 intptr_t index = 0; // Avoid ambiguity in call to AddProperty.
106 jsFrame.AddProperty("index", index);
105 } 107 }
106 if (exception() != NULL) { 108 if (exception() != NULL) {
107 jsobj.AddProperty("exception", *(exception())); 109 jsobj.AddProperty("exception", *(exception()));
108 } 110 }
109 if (inspectee() != NULL) { 111 if (inspectee() != NULL) {
110 jsobj.AddProperty("inspectee", *(inspectee())); 112 jsobj.AddProperty("inspectee", *(inspectee()));
111 } 113 }
112 if (gc_stats() != NULL) { 114 if (gc_stats() != NULL) {
113 jsobj.AddProperty("reason", Heap::GCReasonToString(gc_stats()->reason_)); 115 jsobj.AddProperty("reason", Heap::GCReasonToString(gc_stats()->reason_));
114 isolate()->heap()->PrintToJSONObject(Heap::kNew, &jsobj); 116 isolate()->heap()->PrintToJSONObject(Heap::kNew, &jsobj);
115 isolate()->heap()->PrintToJSONObject(Heap::kOld, &jsobj); 117 isolate()->heap()->PrintToJSONObject(Heap::kOld, &jsobj);
116 } 118 }
117 } 119 }
118 120
119 } // namespace dart 121 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/service/service.md ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698