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; |
}; |
} |