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

Unified Diff: pkg/compiler/lib/src/library_loader.dart

Issue 1254453002: Remove (for the time being) async-await from dart2js. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/library_loader.dart
diff --git a/pkg/compiler/lib/src/library_loader.dart b/pkg/compiler/lib/src/library_loader.dart
index 3e6acb5b93c15dbe34145ddb44d5655620a1b801..2a5a413aa4f0f200d149f0ff96fa0b22b41bbf1d 100644
--- a/pkg/compiler/lib/src/library_loader.dart
+++ b/pkg/compiler/lib/src/library_loader.dart
@@ -533,12 +533,12 @@ class _LibraryLoaderTask extends CompilerTask implements LibraryLoaderTask {
LibraryElement library) async {
Siggi Cherem (dart-lang) 2015/07/23 00:03:06 might be good to remove `async` as well to avoid c
compiler.onLibraryCreated(library);
libraryCanonicalUriMap[library.canonicalUri] = library;
- await compiler.onLibraryScanned(library, handler);
- for (LibraryTag tag in library.tags) {
- LibraryElement dependency = library.getLibraryFromTag(tag);
- await createLibrary(handler, library, dependency.canonicalUri);
- }
- return library;
+ return compiler.onLibraryScanned(library, handler).then((_) {
+ return future.forEach(library.tags, (LibraryTag tag) {
+ LibraryElement dependency = library.getLibraryFromTag(tag);
+ return createLibrary(handler, library, dependency.canonicalUri);
+ }).then((_) => library);
+ });
}
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698