Chromium Code Reviews| Index: runtime/vm/debugger.cc |
| =================================================================== |
| --- runtime/vm/debugger.cc (revision 40552) |
| +++ runtime/vm/debugger.cc (working copy) |
| @@ -1903,20 +1903,29 @@ |
| Script& script = Script::Handle(isolate_); |
| const GrowableObjectArray& libs = |
| GrowableObjectArray::Handle(isolate_->object_store()->libraries()); |
| + const GrowableObjectArray& scripts = |
| + GrowableObjectArray::Handle(GrowableObjectArray::New()); |
|
siva
2014/09/26 20:02:48
....Handle(isolate_, GrowableObjectArray::New());
hausner
2014/09/26 20:19:12
Done.
|
| for (intptr_t i = 0; i < libs.Length(); i++) { |
| lib ^= libs.At(i); |
| script = lib.LookupScript(script_url); |
| if (!script.IsNull()) { |
| - break; |
| + scripts.Add(script); |
| } |
| } |
| - if (script.IsNull()) { |
| + if (scripts.Length() == 0) { |
| if (FLAG_verbose_debug) { |
| OS::Print("Failed to find script with url '%s'\n", |
| script_url.ToCString()); |
| } |
| return NULL; |
| } |
| + if (scripts.Length() > 1) { |
| + if (FLAG_verbose_debug) { |
| + OS::Print("Multiple scripts match url '%s'\n", script_url.ToCString()); |
| + } |
| + return NULL; |
| + } |
| + script ^= scripts.At(0); |
| intptr_t first_token_idx, last_token_idx; |
| script.TokenRangeAtLine(line_number, &first_token_idx, &last_token_idx); |
| if (first_token_idx < 0) { |