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

Unified Diff: runtime/observatory/lib/src/elements/debugger.dart

Issue 1275713002: Order the vm's isolate list by isolate start time. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code review 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/observatory/lib/src/service/object.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/src/elements/debugger.dart
diff --git a/runtime/observatory/lib/src/elements/debugger.dart b/runtime/observatory/lib/src/elements/debugger.dart
index b4709c9c44cda311e7241563e2886d67f2f60d7a..fe525301d01e32104c8228e9c4321184cf119f17 100644
--- a/runtime/observatory/lib/src/elements/debugger.dart
+++ b/runtime/observatory/lib/src/elements/debugger.dart
@@ -805,17 +805,15 @@ class IsolateCommand extends DebuggerCommand {
Future<List<String>> complete(List<String> args) {
if (args.length != 1) {
return new Future.value([args.join('')]);
- }
- var isolates = debugger.vm.isolates.toList();
- isolates.sort((a, b) => a.startTime.compareTo(b.startTime));
+ }
var result = [];
- for (var isolate in isolates) {
+ for (var isolate in debugger.vm.isolates) {
var str = isolate.number.toString();
if (str.startsWith(args[0])) {
result.add('$str ');
}
}
- for (var isolate in isolates) {
+ for (var isolate in debugger.vm.isolates) {
if (isolate.name.startsWith(args[0])) {
result.add('${isolate.name} ');
}
@@ -840,9 +838,7 @@ class IsolateListCommand extends DebuggerCommand {
"Internal error: vm has not been set");
return new Future.value(null);
}
- var isolates = debugger.vm.isolates.toList();
- isolates.sort((a, b) => a.startTime.compareTo(b.startTime));
- for (var isolate in isolates) {
+ for (var isolate in debugger.vm.isolates) {
String current = (isolate == debugger.isolate ? ' *' : '');
debugger.console.print(
"Isolate ${isolate.number} '${isolate.name}'${current}");
« no previous file with comments | « no previous file | runtime/observatory/lib/src/service/object.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698