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

Unified Diff: runtime/vm/service/running_isolates.dart

Issue 206213004: Add a VM page to the observatory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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.cc ('k') | runtime/vm/service_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service/running_isolates.dart
diff --git a/runtime/vm/service/running_isolates.dart b/runtime/vm/service/running_isolates.dart
index afa1e78c8af43c4f8dc725f7ae5a36c8c62f4c40..7f6b045cb40277888f88511bf952ee4c04e1a016 100644
--- a/runtime/vm/service/running_isolates.dart
+++ b/runtime/vm/service/running_isolates.dart
@@ -18,34 +18,17 @@ class RunningIsolates implements MessageRouter {
isolates.remove(portId);
}
- void _isolateCollectionRequest(Message message) {
- var members = [];
- var result = {};
- isolates.forEach((portId, runningIsolate) {
- members.add({
- 'type': '@Isolate',
- 'id': 'isolates/$portId',
- 'name': '$portId',
- });
- });
- result['type'] = 'IsolateList';
- result['id'] = 'isolates';
- result['members'] = members;
- message.setResponse(JSON.encode(result));
- }
-
Future<String> route(Message message) {
if (message.path.length == 0) {
message.setErrorResponse('No path.');
return message.response;
}
if (message.path[0] != 'isolates') {
- message.setErrorResponse('Path must begin with /isolates/.');
+ message.setErrorResponse('Path must begin with /isolates/');
return message.response;
}
- if (message.path.length == 1) {
- // Requesting list of running isolates.
- _isolateCollectionRequest(message);
+ if (message.path.length < 2) {
+ message.setErrorResponse('An isolate id must be provided');
return message.response;
}
var isolateId;
« no previous file with comments | « runtime/vm/service.cc ('k') | runtime/vm/service_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698