Chromium Code Reviews| Index: runtime/observatory/lib/src/elements/script_inset.dart |
| diff --git a/runtime/observatory/lib/src/elements/script_inset.dart b/runtime/observatory/lib/src/elements/script_inset.dart |
| index 2269c12bf9a03851c3f54a5419bc0b6f6a652512..38d9d9c4d4c4ab98f32bd1053e999064de98dadb 100644 |
| --- a/runtime/observatory/lib/src/elements/script_inset.dart |
| +++ b/runtime/observatory/lib/src/elements/script_inset.dart |
| @@ -121,13 +121,14 @@ class BreakpointAnnotation extends Annotation { |
| BreakpointAnnotation(this.bpt) { |
| var script = bpt.location.script; |
| - if (bpt.location.tokenPos != null) { |
| - var pos = bpt.location.tokenPos; |
| + var location = bpt.location; |
| + if (location is SourceLocation) { |
| + var pos = location.tokenPos; |
| line = script.tokenToLine(pos); |
| columnStart = script.tokenToCol(pos) - 1; // tokenToCol is 1-origin. |
| - } else { |
| - line = bpt.location.line; |
| - columnStart = bpt.location.column; |
| + } else if (location is UnresolvedSourceLocation) { |
|
turnidge
2015/09/15 17:58:24
UnresolvedSourceLocation can have a tokenPos as we
Cutch
2015/09/15 19:45:28
Done.
|
| + line = location.line; |
| + columnStart = location.column; |
| if (columnStart == null) { |
| columnStart = 0; |
| } |
| @@ -1019,4 +1020,3 @@ class SourceInsetElement extends PolymerElement { |
| @published bool inDebuggerContext = false; |
| @published ObservableList variables; |
| } |
| - |