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

Unified Diff: runtime/vm/object.cc

Issue 11696005: Improve line info accuracy in debugging (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years 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/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 16535)
+++ runtime/vm/object.cc (working copy)
@@ -2340,7 +2340,7 @@
for (intptr_t i = 0; i < len; i++) {
func ^= funcs.At(i);
if ((func.token_pos() <= token_pos) &&
- (token_pos < func.end_token_pos())) {
+ (token_pos <= func.end_token_pos())) {
return func.raw();
}
}
@@ -5667,7 +5667,12 @@
// Script does not contain the given line number.
return Function::null();
}
- return LookupFunctionInScript(script, first_token_pos);
+ Function& func = Function::Handle();
+ func = LookupFunctionInScript(script, first_token_pos);
Ivan Posva 2012/12/28 17:53:49 How about this? for (intptr_t token_pos = first_to
hausner 2013/01/07 23:24:31 Done.
+ if (func.IsNull()) {
+ func = LookupFunctionInScript(script, last_token_pos);
+ }
+ return func.raw();
}

Powered by Google App Engine
This is Rietveld 408576698