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

Unified Diff: pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart

Issue 2998943002: Add more diagnostics to the deferred loading implementation. (Closed)
Patch Set: Created 3 years, 4 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: pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
index faa524458558685d4939bbbc3f80cac70608733d..778f1264c0a5572f3805020f3cff41327aff5db1 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
@@ -1708,8 +1708,12 @@ class Emitter extends js_emitter.EmitterBase {
};
// Function for initializing a loaded hunk, given its hash.
#initializeLoadedHunk = function(hunkHash) {
- $deferredInitializers[hunkHash](
- #globalsHolder, ${namer.staticStateHolder});
+ var hunk = $deferredInitializers[hunkHash];
+ if (hunk == null) {
Siggi Cherem (dart-lang) 2017/08/14 18:14:22 technically we should never get here because I als
+ throw "DeferredLoading state error: code with hash '" +
+ hunkHash + "' was not loaded";
+ }
+ hunk(#globalsHolder, ${namer.staticStateHolder});
#deferredInitialized[hunkHash] = true;
};
}

Powered by Google App Engine
This is Rietveld 408576698