Chromium Code Reviews| 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(); |
| } |