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

Unified Diff: runtime/vm/profiler_service.cc

Issue 1120133002: Rework error handling in the service protocol and in Observatory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix tests 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/json_stream.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/profiler_service.cc
diff --git a/runtime/vm/profiler_service.cc b/runtime/vm/profiler_service.cc
index e073ab54e1b682478de949a5e4f8658cc5c1f0fa..87fe0d04c541b99b5f717be2e74dbf38f1e923ac 100644
--- a/runtime/vm/profiler_service.cc
+++ b/runtime/vm/profiler_service.cc
@@ -2166,9 +2166,7 @@ void ProfilerService::PrintJSON(JSONStream* stream, TagOrder tag_order) {
MutexLocker profiler_data_lock(isolate->profiler_data_mutex());
IsolateProfilerData* profiler_data = isolate->profiler_data();
if (profiler_data == NULL) {
- JSONObject error(stream);
- error.AddProperty("type", "Error");
- error.AddProperty("text", "Isolate does not have profiling enabled.");
+ stream->PrintError(kProfilingDisabled, NULL);
return;
}
SampleBuffer* sample_buffer = profiler_data->sample_buffer();
« no previous file with comments | « runtime/vm/json_stream.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698