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

Unified Diff: dart/pkg/dart2js_incremental/lib/dart2js_incremental.dart

Issue 564373004: Add LibraryLoader.resetAsync. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Restore code. Created 6 years, 3 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: dart/pkg/dart2js_incremental/lib/dart2js_incremental.dart
diff --git a/dart/pkg/dart2js_incremental/lib/dart2js_incremental.dart b/dart/pkg/dart2js_incremental/lib/dart2js_incremental.dart
index 6e49c02f4d91695d90f34a2cb1f944135aaad28f..d66bffe629fcc0ade9aca9bdcbf4ec3c3d5e655b 100644
--- a/dart/pkg/dart2js_incremental/lib/dart2js_incremental.dart
+++ b/dart/pkg/dart2js_incremental/lib/dart2js_incremental.dart
@@ -69,7 +69,7 @@ class IncrementalCompiler {
Future<bool> compile(Uri script) {
List<String> options = new List<String>.from(this.options);
options.addAll(INCREMENTAL_OPTIONS);
- _compiler = reuseCompiler(
+ Future<Compiler> future = reuseCompiler(
cachedCompiler: _compiler,
libraryRoot: libraryRoot,
packageRoot: packageRoot,
@@ -78,6 +78,9 @@ class IncrementalCompiler {
options: options,
outputProvider: outputProvider,
environment: environment);
- return _compiler.run(script);
+ return future.then((Compiler compiler) {
+ _compiler = compiler;
+ return compiler.run(script);
+ });
}
}
« no previous file with comments | « dart/pkg/dart2js_incremental/lib/caching_compiler.dart ('k') | dart/sdk/lib/_internal/compiler/implementation/compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698