You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In FunctionDefinitionInstantiation in non-strict mode we set the LexicalEnvironment of a function to a NewDeclarativeEnvironment() which correctly initializes [[DisposeCapability]] to a NewDisposeCapability(). However, in strict mode we reuse the LexicalEnvironment which happens to be a Function Environment Record that was created by NewFunctionEnvironment(), which does not correctly set its [[DisposeCapability]] slot.
We either need to unconditionally set [[DisposeCapability]] in NewFunctionEnvironment(), or conditionally set it in FunctionDefinitionInstantiation() when we opt to reuse the LexicalEnvironment. I feel the first option is probably cleaner, though.