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

Unified Diff: runtime/bin/vmservice/client/lib/src/observatory_elements/service_ref.dart

Issue 165643003: Rework <script-ref>: - optional 'line' parameter - use a shorter version of the script url in the a… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: gen 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_elements/service_ref.dart
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/service_ref.dart b/runtime/bin/vmservice/client/lib/src/observatory_elements/service_ref.dart
index ed30a02a69fb3361dbc8e919e5b9be0dde778b83..349532fafcc98a9dfd75c5ac85353b9613621a3e 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/service_ref.dart
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/service_ref.dart
@@ -11,6 +11,7 @@ import 'observatory_element.dart';
class ServiceRefElement extends ObservatoryElement {
@published Map ref;
@published bool internal = false;
+ @published Isolate isolate = null;
ServiceRefElement.created() : super.created();
void refChanged(oldValue) {
@@ -20,8 +21,8 @@ class ServiceRefElement extends ObservatoryElement {
}
String get url {
- if ((app != null) && (ref != null)) {
- return app.locationManager.currentIsolateRelativeLink(ref['id']);
+ if (ref != null) {
+ return relativeLink(ref['id']);
}
return '';
}
@@ -47,4 +48,19 @@ class ServiceRefElement extends ObservatoryElement {
}
return '';
}
+
+ void isolateChanged(oldValue) {
+ notifyPropertyChange(#relativeLink, 0, 1);
+ }
+
+ @observable
+ String relativeLink(String link) {
+ if (app == null) {
+ return '';
+ } else if (isolate == null) {
+ return app.locationManager.currentIsolateRelativeLink(link);
+ } else {
+ return app.locationManager.relativeLink(isolate.id, link);
+ }
+ }
}

Powered by Google App Engine
This is Rietveld 408576698