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

Unified Diff: runtime/vm/object.cc

Issue 2045023003: Fix deferred load errors / bug #26482 (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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/lib/lib_prefix.dart ('k') | tests/standalone/deferred/alpha.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « runtime/lib/lib_prefix.dart ('k') | tests/standalone/deferred/alpha.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698