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