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

Side by Side Diff: runtime/vm/service/vmservice.dart

Issue 1266943005: Fix http requests and the crash dump RPC (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/message.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 library vmservice; 5 library vmservice;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:isolate'; 9 import 'dart:isolate';
10 import 'dart:typed_data'; 10 import 'dart:typed_data';
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 254
255 // Request command line flags. 255 // Request command line flags.
256 var getFlagList = Uri.parse('getFlagList'); 256 var getFlagList = Uri.parse('getFlagList');
257 var getFlagListResponse = JSON.decode( 257 var getFlagListResponse = JSON.decode(
258 await new Message.fromUri(client, getFlagList).sendToVM()); 258 await new Message.fromUri(client, getFlagList).sendToVM());
259 responses[getFlagList.toString()] = getFlagListResponse['result']; 259 responses[getFlagList.toString()] = getFlagListResponse['result'];
260 260
261 // Make requests to each isolate. 261 // Make requests to each isolate.
262 for (var isolate in isolates) { 262 for (var isolate in isolates) {
263 for (var request in perIsolateRequests) { 263 for (var request in perIsolateRequests) {
264 var message = new Message.forIsolate(request, isolate); 264 var message = new Message.forIsolate(client, request, isolate);
265 // Decode the JSON and and insert it into the map. The map key 265 // Decode the JSON and and insert it into the map. The map key
266 // is the request Uri. 266 // is the request Uri.
267 var response = JSON.decode(await isolate.route(message)); 267 var response = JSON.decode(await isolate.route(message));
268 responses[message.toUri().toString()] = response['result']; 268 responses[message.toUri().toString()] = response['result'];
269 } 269 }
270 // Dump the object id ring requests. 270 // Dump the object id ring requests.
271 var message = 271 var message =
272 new Message.forIsolate(client, Uri.parse('_dumpIdZone'), isolate); 272 new Message.forIsolate(client, Uri.parse('_dumpIdZone'), isolate);
273 var response = JSON.decode(await isolate.route(message)); 273 var response = JSON.decode(await isolate.route(message));
274 // Insert getObject requests into responses map. 274 // Insert getObject requests into responses map.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 service.runningIsolates.isolateStartup(port_id, sp, name); 318 service.runningIsolates.isolateStartup(port_id, sp, name);
319 } 319 }
320 320
321 void _onStart() native "VMService_OnStart"; 321 void _onStart() native "VMService_OnStart";
322 322
323 void _onExit() native "VMService_OnExit"; 323 void _onExit() native "VMService_OnExit";
324 324
325 bool _vmListenStream(String streamId) native "VMService_ListenStream"; 325 bool _vmListenStream(String streamId) native "VMService_ListenStream";
326 326
327 void _vmCancelStream(String streamId) native "VMService_CancelStream"; 327 void _vmCancelStream(String streamId) native "VMService_CancelStream";
OLDNEW
« no previous file with comments | « runtime/vm/service/message.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698