Re-add null check for closure-data (Originally removed in 177dee8f16)

Review URL: https://codereview.chromium.org/2438823002 .
This commit is contained in:
Sigmund Cherem 2016-10-20 14:21:00 -07:00
parent d274e8adf8
commit 61bf1c2dc0

View file

@ -81,11 +81,13 @@ class RuntimeTypeGenerator {
if (!method.isAbstract) { if (!method.isAbstract) {
ClosureClassMap closureData = compiler.closureToClassMapper ClosureClassMap closureData = compiler.closureToClassMapper
.getClosureToClassMapping(method.resolvedAst); .getClosureToClassMapping(method.resolvedAst);
ClosureFieldElement thisLocal = if (closureData != null) {
closureData.freeVariableMap[closureData.thisLocal]; ClosureFieldElement thisLocal =
if (thisLocal != null) { closureData.freeVariableMap[closureData.thisLocal];
jsAst.Name thisName = namer.instanceFieldPropertyName(thisLocal); if (thisLocal != null) {
thisAccess = js('this.#', thisName); jsAst.Name thisName = namer.instanceFieldPropertyName(thisLocal);
thisAccess = js('this.#', thisName);
}
} }
} }