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

Unified Diff: runtime/vm/debugger_api_impl.cc

Issue 1947393003: - Use a map to lookup libraries by URL. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger_api_impl.cc
diff --git a/runtime/vm/debugger_api_impl.cc b/runtime/vm/debugger_api_impl.cc
index f98b60a12df313d834544583d3a764d210e78637..4bfcae1c819d93d24c0f7f8fa19d5201c6319593 100644
--- a/runtime/vm/debugger_api_impl.cc
+++ b/runtime/vm/debugger_api_impl.cc
@@ -789,13 +789,14 @@ DART_EXPORT Dart_Handle Dart_GenerateScriptSource(Dart_Handle library_url_in,
UNWRAP_AND_CHECK_PARAM(String, library_url, library_url_in);
UNWRAP_AND_CHECK_PARAM(String, script_url, script_url_in);
- const Library& library = Library::Handle(Library::LookupLibrary(library_url));
+ const Library& library = Library::Handle(Z,
+ Library::LookupLibrary(T, library_url));
if (library.IsNull()) {
return Api::NewError("%s: library '%s' not found",
CURRENT_FUNC, library_url.ToCString());
}
- const Script& script = Script::Handle(library.LookupScript(script_url));
+ const Script& script = Script::Handle(Z, library.LookupScript(script_url));
if (script.IsNull()) {
return Api::NewError("%s: script '%s' not found in library '%s'",
CURRENT_FUNC, script_url.ToCString(),
@@ -810,17 +811,18 @@ DART_EXPORT Dart_Handle Dart_GetScriptURLs(Dart_Handle library_url_in) {
DARTSCOPE(Thread::Current());
UNWRAP_AND_CHECK_PARAM(String, library_url, library_url_in);
- const Library& library = Library::Handle(Library::LookupLibrary(library_url));
+ const Library& library = Library::Handle(Z,
+ Library::LookupLibrary(T, library_url));
if (library.IsNull()) {
return Api::NewError("%s: library '%s' not found",
CURRENT_FUNC, library_url.ToCString());
}
- const Array& loaded_scripts = Array::Handle(library.LoadedScripts());
+ const Array& loaded_scripts = Array::Handle(Z, library.LoadedScripts());
ASSERT(!loaded_scripts.IsNull());
intptr_t num_scripts = loaded_scripts.Length();
- const Array& script_list = Array::Handle(Array::New(num_scripts));
- Script& script = Script::Handle();
- String& url = String::Handle();
+ const Array& script_list = Array::Handle(Z, Array::New(num_scripts));
+ Script& script = Script::Handle(Z);
+ String& url = String::Handle(Z);
for (int i = 0; i < num_scripts; i++) {
script ^= loaded_scripts.At(i);
url = script.url();
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698