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

Unified Diff: runtime/lib/lib_prefix.dart

Issue 1998963003: Rework standalone to use a synchronous loader that does not invoke Dart code (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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
« runtime/bin/vmservice/loader.dart ('K') | « runtime/include/dart_api.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/lib_prefix.dart
diff --git a/runtime/lib/lib_prefix.dart b/runtime/lib/lib_prefix.dart
index 4f509da5bff4a23e95cbea1eed136bfcd5357576..4d0bb53ae5a584ca9004ce95281149b8f36df964 100644
--- a/runtime/lib/lib_prefix.dart
+++ b/runtime/lib/lib_prefix.dart
@@ -49,16 +49,21 @@ var _outstandingLoadRequests = new List<List>();
// Called from the VM when all outstanding load requests have
// finished.
_completeDeferredLoads() {
+ var stillOutstandingLoadRequests = new List<List>();
turnidge 2016/06/03 17:50:25 Comment?
for (int i = 0; i < _outstandingLoadRequests.length; i++) {
var prefix = _outstandingLoadRequests[i][0];
- var completer = _outstandingLoadRequests[i][1];
- var error = prefix._loadError();
- if (error != null) {
- completer.completeError(error);
+ if (prefix._load()) {
+ var completer = _outstandingLoadRequests[i][1];
+ var error = prefix._loadError();
+ if (error != null) {
+ completer.completeError(error);
+ } else {
+ prefix._invalidateDependentCode();
+ completer.complete(true);
+ }
} else {
- prefix._invalidateDependentCode();
- completer.complete(true);
+ stillOutstandingLoadRequests.add(_outstandingLoadRequests[i]);
}
}
- _outstandingLoadRequests.clear();
+ _outstandingLoadRequests = stillOutstandingLoadRequests;
}
« runtime/bin/vmservice/loader.dart ('K') | « runtime/include/dart_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698