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

Unified Diff: runtime/bin/vmservice/client/lib/src/elements/script_ref.dart

Issue 192443004: Complete the switch to ServiceObject (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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/elements/script_ref.dart
diff --git a/runtime/bin/vmservice/client/lib/src/elements/script_ref.dart b/runtime/bin/vmservice/client/lib/src/elements/script_ref.dart
index 4f2794be9e93a720d72f085a2743d5223afc7d7f..1eaf1b46c338e96d11171663404126fcd568fd2b 100644
--- a/runtime/bin/vmservice/client/lib/src/elements/script_ref.dart
+++ b/runtime/bin/vmservice/client/lib/src/elements/script_ref.dart
@@ -11,36 +11,25 @@ import 'service_ref.dart';
class ScriptRefElement extends ServiceRefElement {
@published int line = -1;
- String get objectId {
- if (line < 0) {
- return super.objectId;
- }
- // TODO(johnmccutchan): Add a ?line=XX invalidates the idea that this
- // method returns an objectId.
- return '${super.objectId}?line=$line';
- }
-
String get hoverText {
if (ref == null) {
- return '';
+ return super.hoverText;
}
if (line < 0) {
- return ref['user_name'];
+ return ref.vmName;
} else {
- return "${ref['user_name']}:$line";
+ return '${ref.vmName}:$line';
}
}
String get name {
if (ref == null) {
- return '';
+ return super.name;
}
- var scriptUrl = ref['user_name'];
- var shortScriptUrl = scriptUrl.substring(scriptUrl.lastIndexOf('/') + 1);
if (line < 0) {
- return shortScriptUrl;
+ return ref.name;
} else {
- return "$shortScriptUrl:$line";
+ return '${ref.name}:$line';
}
}

Powered by Google App Engine
This is Rietveld 408576698