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

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

Issue 1202583002: Misc service fixes (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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/bin/vmservice/server.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 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 18 matching lines...) Expand all
29 pathSegments.forEach((String segment) { 29 pathSegments.forEach((String segment) {
30 if (segment == null || segment == '') { 30 if (segment == null || segment == '') {
31 return; 31 return;
32 } 32 }
33 path.add(segment); 33 path.add(segment);
34 }); 34 });
35 } 35 }
36 36
37 Message.fromJsonRpc(this.client, Map map) 37 Message.fromJsonRpc(this.client, Map map)
38 : serial = map['id'], method = map['method'] { 38 : serial = map['id'], method = map['method'] {
39 params.addAll(map['params']); 39 if (map['params'] != null) {
40 params.addAll(map['params']);
41 }
40 } 42 }
41 43
42 static String _methodNameFromUri(Uri uri) { 44 static String _methodNameFromUri(Uri uri) {
43 if (uri == null) { 45 if (uri == null) {
44 return ''; 46 return '';
45 } 47 }
46 if (uri.pathSegments.length == 0) { 48 if (uri.pathSegments.length == 0) {
47 return ''; 49 return '';
48 } 50 }
49 return uri.pathSegments[0]; 51 return uri.pathSegments[0];
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 }; 155 };
154 _completer.complete(JSON.encode(response)); 156 _completer.complete(JSON.encode(response));
155 } 157 }
156 } 158 }
157 159
158 bool sendIsolateServiceMessage(SendPort sp, List m) 160 bool sendIsolateServiceMessage(SendPort sp, List m)
159 native "VMService_SendIsolateServiceMessage"; 161 native "VMService_SendIsolateServiceMessage";
160 162
161 void sendRootServiceMessage(List m) 163 void sendRootServiceMessage(List m)
162 native "VMService_SendRootServiceMessage"; 164 native "VMService_SendRootServiceMessage";
OLDNEW
« no previous file with comments | « runtime/bin/vmservice/server.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698