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

Unified Diff: runtime/vm/debugger.cc

Issue 602853002: Allow setting breakpoints specifying the suffix of a file path (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger.cc
===================================================================
--- runtime/vm/debugger.cc (revision 40734)
+++ 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(isolate_, GrowableObjectArray::New());
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) {
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698