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

Unified Diff: pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart

Issue 2438823002: Re-add null check for closure-data (Originally removed in 177dee8f1621eef43d5c820f1a0e9d91bce1dc6d) (Closed)
Patch Set: Created 4 years, 2 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/js_emitter/runtime_type_generator.dart
diff --git a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
index 170d16d07dc0629a424fd435cec13c0faf30ba93..7cffc44de5b73cf6b1b931433b9aa6870d4f312e 100644
--- a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
@@ -81,11 +81,13 @@ class RuntimeTypeGenerator {
if (!method.isAbstract) {
ClosureClassMap closureData = compiler.closureToClassMapper
.getClosureToClassMapping(method.resolvedAst);
- ClosureFieldElement thisLocal =
- closureData.freeVariableMap[closureData.thisLocal];
- if (thisLocal != null) {
- jsAst.Name thisName = namer.instanceFieldPropertyName(thisLocal);
- thisAccess = js('this.#', thisName);
+ if (closureData != null) {
+ ClosureFieldElement thisLocal =
+ closureData.freeVariableMap[closureData.thisLocal];
+ if (thisLocal != null) {
+ jsAst.Name thisName = namer.instanceFieldPropertyName(thisLocal);
+ thisAccess = js('this.#', thisName);
+ }
}
}
« 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