Index: dart/site/try/src/compiler_isolate.dart |
diff --git a/dart/site/try/src/compiler_isolate.dart b/dart/site/try/src/compiler_isolate.dart |
index f6265aea23a1e0dac48c4409a6e59d4c08de2593..6952c83c9a86c600bbfe27554d550c36890eca38 100644 |
--- a/dart/site/try/src/compiler_isolate.dart |
+++ b/dart/site/try/src/compiler_isolate.dart |
@@ -107,16 +107,17 @@ compile(source, SendPort replyTo) { |
} |
} |
Stopwatch compilationTimer = new Stopwatch()..start(); |
- cachedCompiler = reuseCompiler( |
+ reuseCompiler( |
diagnosticHandler: handler, |
inputProvider: inputProvider, |
options: options, |
cachedCompiler: cachedCompiler, |
libraryRoot: sdkLocation, |
packageRoot: Uri.base.resolve('/packages/'), |
- packagesAreImmutable: true); |
- |
- cachedCompiler.run(Uri.parse('$PRIVATE_SCHEME:/main.dart')).then((success) { |
+ packagesAreImmutable: true).then((Compiler newCompiler) { |
+ cachedCompiler = newCompiler; |
+ return cachedCompiler.run(Uri.parse('$PRIVATE_SCHEME:/main.dart')); |
+ }).then((success) { |
compilationTimer.stop(); |
print('Compilation took ${compilationTimer.elapsed}'); |
if (cachedCompiler.libraryLoader |