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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 3004563002: Fixes for issues (Closed)
Patch Set: Created 3 years, 4 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/bin/loader.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 6347cc98683a3a15975e4e051052af1ef25d2366..c53377b25ff4a831e1e83e33dbf3c71dd850625b 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -5030,6 +5030,11 @@ DART_EXPORT Dart_Handle Dart_LoadScript(Dart_Handle url,
return result;
}
library ^= Library::LookupLibrary(T, resolved_url_str);
+ if (library.IsNull()) {
+ // If the URL string does not match, use the library object
+ // returned by the kernel reader.
aam 2017/08/24 19:20:06 We know that this will happen when we request to l
siva 2017/08/24 23:00:42 The scenarios when this can happen is when resolve
+ library ^= Api::UnwrapHandle(result);
aam 2017/08/25 21:56:03 Sorry, I didn't realize that `result` here will be
siva 2017/08/25 21:59:47 Good point will fix that.
+ }
if (library.IsNull()) {
return Api::NewError("%s: Unable to load script '%s' correctly.",
CURRENT_FUNC, resolved_url_str.ToCString());
« no previous file with comments | « runtime/bin/loader.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698