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

Unified Diff: sdk/lib/_internal/compiler/implementation/source_file_provider.dart

Issue 17759007: First pass at asynchronous input loading in dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 7 years, 4 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: sdk/lib/_internal/compiler/implementation/source_file_provider.dart
diff --git a/sdk/lib/_internal/compiler/implementation/source_file_provider.dart b/sdk/lib/_internal/compiler/implementation/source_file_provider.dart
index 3188a3e159ba5dcdf1b87956b004b170a84a4a32..a69f6abe41be02deb1d90138af2785eb693c9931 100644
--- a/sdk/lib/_internal/compiler/implementation/source_file_provider.dart
+++ b/sdk/lib/_internal/compiler/implementation/source_file_provider.dart
@@ -38,8 +38,9 @@ class SourceFileProvider {
try {
source = readAll(uriPathToNative(resourceUri.path));
} on FileException catch (ex) {
- throw "Error reading '${relativize(cwd, resourceUri, isWindows)}' "
- "(${ex.osError})";
+ return new Future.error(
+ "Error reading '${relativize(cwd, resourceUri, isWindows)}' "
+ "(${ex.osError})");
}
dartCharactersRead += source.length;
sourceFiles[resourceUri.toString()] = new SourceFile(

Powered by Google App Engine
This is Rietveld 408576698