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

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

Issue 1265153005: Observatory fixes: (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/observatory/tests/service/async_continuation_test.dart ('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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 } 159 }
160 if (top_frame() != NULL) { 160 if (top_frame() != NULL) {
161 JSONObject jsFrame(&jsobj, "topFrame"); 161 JSONObject jsFrame(&jsobj, "topFrame");
162 top_frame()->PrintToJSONObject(&jsFrame); 162 top_frame()->PrintToJSONObject(&jsFrame);
163 intptr_t index = 0; // Avoid ambiguity in call to AddProperty. 163 intptr_t index = 0; // Avoid ambiguity in call to AddProperty.
164 jsFrame.AddProperty("index", index); 164 jsFrame.AddProperty("index", index);
165 } 165 }
166 if (exception() != NULL) { 166 if (exception() != NULL) {
167 jsobj.AddProperty("exception", *(exception())); 167 jsobj.AddProperty("exception", *(exception()));
168 } 168 }
169 if (async_continuation() != NULL) { 169 if (async_continuation() != NULL && !async_continuation()->IsNull()) {
170 jsobj.AddProperty("_asyncContinuation", *(async_continuation())); 170 jsobj.AddProperty("_asyncContinuation", *(async_continuation()));
171 } 171 }
172 if (inspectee() != NULL) { 172 if (inspectee() != NULL) {
173 jsobj.AddProperty("inspectee", *(inspectee())); 173 jsobj.AddProperty("inspectee", *(inspectee()));
174 } 174 }
175 if (gc_stats() != NULL) { 175 if (gc_stats() != NULL) {
176 jsobj.AddProperty("reason", Heap::GCReasonToString(gc_stats()->reason_)); 176 jsobj.AddProperty("reason", Heap::GCReasonToString(gc_stats()->reason_));
177 isolate()->heap()->PrintToJSONObject(Heap::kNew, &jsobj); 177 isolate()->heap()->PrintToJSONObject(Heap::kNew, &jsobj);
178 isolate()->heap()->PrintToJSONObject(Heap::kOld, &jsobj); 178 isolate()->heap()->PrintToJSONObject(Heap::kOld, &jsobj);
179 } 179 }
(...skipping 15 matching lines...) Expand all
195 195
196 196
197 void ServiceEvent::PrintJSONHeader(JSONObject* jsobj) const { 197 void ServiceEvent::PrintJSONHeader(JSONObject* jsobj) const {
198 ASSERT(jsobj != NULL); 198 ASSERT(jsobj != NULL);
199 jsobj->AddProperty("type", "Event"); 199 jsobj->AddProperty("type", "Event");
200 jsobj->AddProperty("kind", KindAsCString()); 200 jsobj->AddProperty("kind", KindAsCString());
201 jsobj->AddProperty("isolate", isolate()); 201 jsobj->AddProperty("isolate", isolate());
202 } 202 }
203 203
204 } // namespace dart 204 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/observatory/tests/service/async_continuation_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698