| 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 2910563d6cb68ec18d23bc0ca17ef9c9dd11a3aa..2e77d87ae537acfdf4a3e1d974e9c0278cb4a1e7 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart
|
| @@ -226,12 +226,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((bool success) {
|
| + if (success && !compilationFailed) {
|
| + return new Dart2JsMirrorSystem(compiler);
|
| + } else {
|
| + throw 'Failed to create mirror system.';
|
| + }
|
| + });
|
| }
|
|
|
| //------------------------------------------------------------------------------
|
|
|