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

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

Issue 1340073002: Fix static analysis warnings in Observatory (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « runtime/observatory/lib/src/elements/debugger.dart ('k') | runtime/observatory/tests/ui/inspector.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
-
« no previous file with comments | « runtime/observatory/lib/src/elements/debugger.dart ('k') | runtime/observatory/tests/ui/inspector.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698