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

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

Issue 38703009: Update VM service to new isolate API (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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_isolates.dart
diff --git a/runtime/bin/vmservice/running_isolates.dart b/runtime/bin/vmservice/running_isolates.dart
index 5b38223d18f26a279ad807c0c8e9532c9e518e4a..0cfa02f3048542f47d300a39124075b14c240378 100644
--- a/runtime/bin/vmservice/running_isolates.dart
+++ b/runtime/bin/vmservice/running_isolates.dart
@@ -9,28 +9,28 @@ class RunningIsolates implements ServiceRequestRouter {
RunningIsolates();
- void isolateStartup(SendPort sp, String name) {
- if (isolates[sp.hashCode] != null) {
+ void isolateStartup(int portId, SendPort sp, String name) {
+ if (isolates[portId] != null) {
throw new StateError('Duplicate isolate startup.');
}
- var ri = new RunningIsolate(sp, name);
- isolates[sp.hashCode] = ri;
+ var ri = new RunningIsolate(portId, sp, name);
+ isolates[portId] = ri;
}
- void isolateShutdown(SendPort sp) {
- if (isolates[sp.hashCode] == null) {
+ void isolateShutdown(int portId, SendPort sp) {
+ if (isolates[portId] == null) {
throw new StateError('Unknown isolate.');
}
- isolates.remove(sp.hashCode);
+ isolates.remove(portId);
}
void _isolateCollectionRequest(ServiceRequest request) {
var members = [];
var result = {};
- isolates.forEach((sp, ri) {
+ isolates.forEach((portId, runningIsolate) {
members.add({
- 'id': sp,
- 'name': ri.name
+ 'id': portId,
+ 'name': runningIsolate.name
});
});
result['type'] = 'IsolateList';

Powered by Google App Engine
This is Rietveld 408576698