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

Unified Diff: runtime/bin/vmservice/running_isolate.dart

Issue 22607005: Remove race(s) in vmservice tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: runtime/bin/vmservice/running_isolate.dart
diff --git a/runtime/bin/vmservice/running_isolate.dart b/runtime/bin/vmservice/running_isolate.dart
index 6c7749a6e2f5606cab1a7d5b8da81744512e8f8a..2d4af13ae97c8b7cd1c16398af2ecf051447251a 100644
--- a/runtime/bin/vmservice/running_isolate.dart
+++ b/runtime/bin/vmservice/running_isolate.dart
@@ -6,9 +6,9 @@ part of vmservice;
class RunningIsolate implements ServiceRequestRouter {
final SendPort sendPort;
- String name = 'Unknown';
+ final String name;
- RunningIsolate(this.sendPort);
+ RunningIsolate(this.sendPort, this.name);
Future sendMessage(List request) {
final completer = new Completer.sync();
@@ -33,23 +33,4 @@ class RunningIsolate implements ServiceRequestRouter {
return new Future.value(request);
});
}
-
- void _sendNameRequest() {
- var request = new ServiceRequest();
- request.parse(Uri.parse('/name'));
- sendMessage(request.toServiceCallMessage()).then(_handleNameResponse);
- }
-
- void _handleNameResponse(String responseString) {
- try {
- var response = JSON.parse(responseString);
- name = response['name'];
- } catch (e) {
- name = 'Error retrieving isolate name.';
- return;
- }
- if (name == null) {
- name = 'Error retrieving isolate name.';
- }
- }
}

Powered by Google App Engine
This is Rietveld 408576698