| Index: runtime/vm/object.cc
|
| diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
|
| index 13b84c64387f0b86d970b534c259ad4b7ffc2e1a..5003e7e1123010340703167e50e3252ce2356933 100644
|
| --- a/runtime/vm/object.cc
|
| +++ b/runtime/vm/object.cc
|
| @@ -10936,12 +10936,17 @@ bool LibraryPrefix::LoadLibrary() const {
|
| pending_deferred_loads.Add(deferred_lib);
|
| const String& lib_url = String::Handle(zone, deferred_lib.url());
|
| Dart_LibraryTagHandler handler = isolate->library_tag_handler();
|
| + Object& obj = Object::Handle(zone);
|
| {
|
| TransitionVMToNative transition(thread);
|
| Api::Scope api_scope(thread);
|
| - handler(Dart_kImportTag,
|
| - Api::NewHandle(thread, importer()),
|
| - Api::NewHandle(thread, lib_url.raw()));
|
| + obj = Api::UnwrapHandle(
|
| + handler(Dart_kImportTag,
|
| + Api::NewHandle(thread, importer()),
|
| + Api::NewHandle(thread, lib_url.raw())));
|
| + }
|
| + if (obj.IsError()) {
|
| + Exceptions::PropagateError(Error::Cast(obj));
|
| }
|
| } else {
|
| // Another load request is in flight.
|
|
|