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

Side by Side Diff: runtime/vm/service/message.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
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 part of vmservice; 5 part of vmservice;
6 6
7 class Message { 7 class Message {
8 final Completer _completer = new Completer.sync(); 8 final Completer _completer = new Completer.sync();
9 bool get completed => _completer.isCompleted; 9 bool get completed => _completer.isCompleted;
10 /// Future of response. 10 /// Future of response.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 if (uri == null) { 45 if (uri == null) {
46 return ''; 46 return '';
47 } 47 }
48 if (uri.pathSegments.length == 0) { 48 if (uri.pathSegments.length == 0) {
49 return ''; 49 return '';
50 } 50 }
51 return uri.pathSegments[0]; 51 return uri.pathSegments[0];
52 } 52 }
53 53
54 Message.fromUri(this.client, Uri uri) 54 Message.fromUri(this.client, Uri uri)
55 : method = _methodNameFromUri(uri) { 55 : serial = '', method = _methodNameFromUri(uri) {
56 params.addAll(uri.queryParameters); 56 params.addAll(uri.queryParameters);
57 } 57 }
58 58
59 Message.forIsolate(this.client, Uri uri, RunningIsolate isolate) 59 Message.forIsolate(this.client, Uri uri, RunningIsolate isolate)
60 : method = _methodNameFromUri(uri) { 60 : serial = '', method = _methodNameFromUri(uri) {
61 params.addAll(uri.queryParameters); 61 params.addAll(uri.queryParameters);
62 params['isolateId'] = isolate.serviceId; 62 params['isolateId'] = isolate.serviceId;
63 } 63 }
64 64
65 Uri toUri() { 65 Uri toUri() {
66 return new Uri(path: method, queryParameters: params); 66 return new Uri(path: method, queryParameters: params);
67 } 67 }
68 68
69 dynamic toJson() { 69 dynamic toJson() {
70 return { 70 return {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 }; 156 };
157 _completer.complete(JSON.encode(response)); 157 _completer.complete(JSON.encode(response));
158 } 158 }
159 } 159 }
160 160
161 bool sendIsolateServiceMessage(SendPort sp, List m) 161 bool sendIsolateServiceMessage(SendPort sp, List m)
162 native "VMService_SendIsolateServiceMessage"; 162 native "VMService_SendIsolateServiceMessage";
163 163
164 void sendRootServiceMessage(List m) 164 void sendRootServiceMessage(List m)
165 native "VMService_SendRootServiceMessage"; 165 native "VMService_SendRootServiceMessage";
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698