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

Unified Diff: runtime/bin/vmservice/client/lib/src/observatory/isolate.dart

Issue 185413015: Update the navbar in the observatory (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: new js Created 6 years, 10 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/client/lib/src/observatory/isolate.dart
diff --git a/runtime/bin/vmservice/client/lib/src/observatory/isolate.dart b/runtime/bin/vmservice/client/lib/src/observatory/isolate.dart
index 08c4da9165a0c85e853d7d2bf51586e2aa50deaa..0135c4b6ef0701bf72d8c874b5fe42d319fe3ccd 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory/isolate.dart
+++ b/runtime/bin/vmservice/client/lib/src/observatory/isolate.dart
@@ -15,6 +15,7 @@ class Isolate extends Observable {
@observable final List<Code> codes = new List<Code>();
@observable String id;
@observable String name;
+ @observable String vmName;
@observable Map entry;
@observable String rootLib;
@observable final Map<String, double> timers =
@@ -25,20 +26,20 @@ class Isolate extends Observable {
@observable Map topFrame = null;
@observable String fileAndLine = null;
-
- Isolate.fromId(this.id) : name = '' {}
-
+
+ Isolate.fromId(this.id) : name = 'isolate' {}
+
Isolate.fromMap(Map map)
: id = map['id'], name = map['name'] {
}
- void refresh() {
- var request = '/$id/';
- _application.requestManager.requestMap(request).then((map) {
- update(map);
- }).catchError((e, trace) {
- Logger.root.severe('Error while updating isolate summary: $e\n$trace');
- });
+ Future refresh() {
+ var request = '/$id/';
+ return _application.requestManager.requestMap(request).then((map) {
+ update(map);
+ }).catchError((e, trace) {
+ Logger.root.severe('Error while updating isolate summary: $e\n$trace');
+ });
}
void update(Map map) {
@@ -46,17 +47,20 @@ class Isolate extends Observable {
Logger.root.severe('Unexpected message type in Isolate.update: ${map["type"]}');
return;
}
- if (map['name'] == null ||
- map['rootLib'] == null ||
+ if (map['rootLib'] == null ||
map['timers'] == null ||
map['heap'] == null) {
Logger.root.severe("Malformed 'Isolate' response: $map");
return;
}
- name = map['name'];
rootLib = map['rootLib']['id'];
+ vmName = map['name'];
if (map['entry'] != null) {
entry = map['entry'];
+ name = entry['name'];
+ } else {
+ // fred
+ name = 'root isolate';
}
if (map['topFrame'] != null) {
topFrame = map['topFrame'];

Powered by Google App Engine
This is Rietveld 408576698