Index: runtime/lib/object.cc |
=================================================================== |
--- runtime/lib/object.cc (revision 38794) |
+++ 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 Instance& error = Instance::Handle(prefix.LoadError()); |
+ return error.raw(); |
+} |
+ |
+ |
} // namespace dart |