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

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

Issue 1393523002: Support tab completion of line:col in the debugger. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix warnings and other issues Created 5 years, 2 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/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 d9d9b64d5b8763d93d9588a670413bcecb43b4ca..aad3a0b47007897131a990cdd4e7a1f0f1a7f35e 100644
--- a/runtime/observatory/lib/src/elements/script_inset.dart
+++ b/runtime/observatory/lib/src/elements/script_inset.dart
@@ -425,7 +425,12 @@ class ScriptInsetElement extends ObservatoryElement {
case ServiceEvent.kBreakpointRemoved:
var loc = event.breakpoint.location;
if (loc.script == script) {
- int line = script.tokenToLine(loc.tokenPos);
+ int line;
+ if (loc.tokenPos != null) {
+ line = script.tokenToLine(loc.tokenPos);
+ } else {
+ line = script.tokenToLine(loc.line);
+ }
if ((line >= _startLine) && (line <= _endLine)) {
_updateTask.queue();
}

Powered by Google App Engine
This is Rietveld 408576698