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

Unified Diff: runtime/lib/object.cc

Issue 419103003: Handle load errors in deferred code (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 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
Index: runtime/lib/object.cc
===================================================================
--- runtime/lib/object.cc (revision 38636)
+++ runtime/lib/object.cc (working copy)
@@ -290,4 +290,17 @@
return Bool::Get(hasCompleted).raw();
}
+
+DEFINE_NATIVE_ENTRY(LibraryPrefix_loadError, 1) {
+ const LibraryPrefix& prefix =
+ LibraryPrefix::CheckedHandle(arguments->NativeArgAt(0));
+ // Currently all errors are Dart instances, e.g. I/O errors
+ // created by deferred loading code. LanguageErrors from
+ // failed loading or finalization attempts are propagated and result
+ // in the isolate's death.
+ const Object& error = Object::Handle(prefix.LoadError());
Ivan Posva 2014/07/31 18:29:04 In that case this should be: const Instance& error
hausner 2014/07/31 21:12:45 Done.
+ return error.raw();
+}
+
+
} // namespace dart

Powered by Google App Engine
This is Rietveld 408576698