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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_inset_element; 5 library script_inset_element;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:html'; 8 import 'dart:html';
9 import 'observatory_element.dart'; 9 import 'observatory_element.dart';
10 import 'service_ref.dart'; 10 import 'service_ref.dart';
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 Breakpoint bpt; 119 Breakpoint bpt;
120 int priority = 1; 120 int priority = 1;
121 121
122 BreakpointAnnotation(this.bpt) { 122 BreakpointAnnotation(this.bpt) {
123 var script = bpt.location.script; 123 var script = bpt.location.script;
124 if (bpt.location.tokenPos != null) { 124 if (bpt.location.tokenPos != null) {
125 var pos = bpt.location.tokenPos; 125 var pos = bpt.location.tokenPos;
126 line = script.tokenToLine(pos); 126 line = script.tokenToLine(pos);
127 columnStart = script.tokenToCol(pos) - 1; // tokenToCol is 1-origin. 127 columnStart = script.tokenToCol(pos) - 1; // tokenToCol is 1-origin.
128 } else { 128 } else {
129 line = bpt.location.line; 129 line = 0;
130 columnStart = bpt.location.column; 130 columnStart = 0;
131 if (columnStart == null) {
132 columnStart = 0;
133 }
turnidge 2015/09/15 16:01:03 bpt.location can have two types: SourceLocation an
Cutch 2015/09/15 17:29:57 Yep, you are right. I've fixed the static warnings
134 } 131 }
135 var length = script.guessTokenLength(line, columnStart); 132 var length = script.guessTokenLength(line, columnStart);
136 if (length == null) { 133 if (length == null) {
137 length = 1; 134 length = 1;
138 } 135 }
139 columnStop = columnStart + length; 136 columnStop = columnStart + length;
140 } 137 }
141 138
142 void applyStyleTo(element) { 139 void applyStyleTo(element) {
143 if (element == null) { 140 if (element == null) {
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 @CustomTag('source-inset') 1009 @CustomTag('source-inset')
1013 class SourceInsetElement extends PolymerElement { 1010 class SourceInsetElement extends PolymerElement {
1014 SourceInsetElement.created() : super.created(); 1011 SourceInsetElement.created() : super.created();
1015 1012
1016 @published SourceLocation location; 1013 @published SourceLocation location;
1017 @published String height = null; 1014 @published String height = null;
1018 @published int currentPos; 1015 @published int currentPos;
1019 @published bool inDebuggerContext = false; 1016 @published bool inDebuggerContext = false;
1020 @published ObservableList variables; 1017 @published ObservableList variables;
1021 } 1018 }
1022
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698