Index: sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart b/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart |
index 14934380c2eefe897c3adf54387cb698f95c116d..09ac0618dd01c849b1909235d17af21b17386ab2 100644 |
--- a/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart |
+++ b/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart |
@@ -225,12 +225,13 @@ Future<MirrorSystem> analyze(List<Uri> libraries, |
internalDiagnosticHandler, |
libraryRoot, packageRoot, options); |
compiler.librariesToAnalyzeWhenRun = libraries; |
- bool success = compiler.run(null); |
- if (success && !compilationFailed) { |
- return new Future<MirrorSystem>.value(new Dart2JsMirrorSystem(compiler)); |
- } else { |
- return new Future<MirrorSystem>.error('Failed to create mirror system.'); |
- } |
+ return compiler.run(null).then((success) { |
+ if (success && !compilationFailed) { |
+ return new Dart2JsMirrorSystem(compiler); |
+ } else { |
+ throw 'Failed to create mirror system.'; |
+ } |
+ }); |
Bob Nystrom
2013/06/26 01:03:24
Well, at least one part of the codebase got cleane
ahe
2013/06/26 07:02:00
Indeed!
|
} |
//------------------------------------------------------------------------------ |