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

Side by Side Diff: runtime/observatory/lib/src/elements/script_ref.dart

Issue 979823003: Major rework of vm service events. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library script_ref_element; 5 library script_ref_element;
6 6
7 import 'package:polymer/polymer.dart'; 7 import 'package:polymer/polymer.dart';
8 import 'package:observatory/service.dart'; 8 import 'package:observatory/service.dart';
9 import 'service_ref.dart'; 9 import 'service_ref.dart';
10 10
(...skipping 20 matching lines...) Expand all
31 } 31 }
32 32
33 String get name { 33 String get name {
34 if (ref == null) { 34 if (ref == null) {
35 return super.name; 35 return super.name;
36 } 36 }
37 if (pos >= 0) { 37 if (pos >= 0) {
38 if (ref.loaded) { 38 if (ref.loaded) {
39 // Script is loaded, get the line number. 39 // Script is loaded, get the line number.
40 Script script = ref; 40 Script script = ref;
41 return '${super.name}:${script.tokenToLine(pos)}'; 41 return '${super.name}:${script.tokenToLine(pos)}:${script.tokenToCol(pos )}';
Cutch 2015/03/05 16:30:57 80 column limit
turnidge 2015/03/05 18:42:24 Done.
42 } else { 42 } else {
43 ref.load().then(_updateProperties); 43 ref.load().then(_updateProperties);
44 } 44 }
45 } 45 }
46 return super.name; 46 return super.name;
47 } 47 }
48 48
49 String get url { 49 String get url {
50 if (ref == null) { 50 if (ref == null) {
51 return super.url; 51 return super.url;
52 } 52 }
53 if (pos >= 0) { 53 if (pos >= 0) {
54 if (ref.loaded) { 54 if (ref.loaded) {
55 return '${super.url}---pos=${pos}'; 55 return '${super.url}---pos=${pos}';
56 } else { 56 } else {
57 ref.load().then(_updateProperties); 57 ref.load().then(_updateProperties);
58 } 58 }
59 } 59 }
60 return super.url; 60 return super.url;
61 } 61 }
62 62
63 ScriptRefElement.created() : super.created(); 63 ScriptRefElement.created() : super.created();
64 } 64 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698