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

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

Issue 1120133002: Rework error handling in the service protocol and in Observatory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix tests Created 5 years, 7 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/observatory/lib/src/elements/heap_map.dart
diff --git a/runtime/observatory/lib/src/elements/heap_map.dart b/runtime/observatory/lib/src/elements/heap_map.dart
index fc33a5c5001d5e9b3f18ea3f487ef3ae99a4c2bf..631b7801a58e9d1db43b731862ffc7063ab9da42 100644
--- a/runtime/observatory/lib/src/elements/heap_map.dart
+++ b/runtime/observatory/lib/src/elements/heap_map.dart
@@ -161,9 +161,7 @@ class HeapMapElement extends ObservatoryElement {
void _handleClick(MouseEvent event) {
var address = _objectAt(event.offset).address.toRadixString(16);
isolate.getObjectByAddress(address).then((result) {
- if (result is DartError) {
- Logger.root.severe(result.message);
- } else if (result.type != 'Sentinel') {
+ if (result.type != 'Sentinel') {
app.locationManager.go(gotoLink('/inspect', result));
}
});
@@ -234,16 +232,14 @@ class HeapMapElement extends ObservatoryElement {
});
}
- void refresh(var done) {
+ Future refresh() {
if (isolate == null) {
- return;
+ return new Future.value(null);
}
- isolate.invokeRpc('getHeapMap', {}).then((ServiceMap response) {
+ return isolate.invokeRpc('getHeapMap', {}).then((ServiceMap response) {
assert(response['type'] == 'HeapMap');
fragmentation = response;
- }).catchError((e, st) {
- Logger.root.info('$e $st');
- }).whenComplete(done);
+ });
}
void fragmentationChanged(oldValue) {
« no previous file with comments | « runtime/observatory/lib/src/elements/function_view.dart ('k') | runtime/observatory/lib/src/elements/heap_profile.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698