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