1339137 - Don't do Annex B lexical function behavior when redeclaring a parameter name in a function with parameter expressions.

This commit is contained in:
Gaming4JC 2019-06-09 01:48:29 -04:00 • committed by Roy Tam
commit c92b219172
4 changed files with 41 additions and 9 deletions

View file

@ -669,6 +669,14 @@ FunctionScope::script() const
return canonicalFunction()->nonLazyScript();
}
/* static */ bool
FunctionScope::isSpecialName(ExclusiveContext* cx, JSAtom* name)
{
return name == cx->names().arguments ||
name == cx->names().dotThis ||
name == cx->names().dotGenerator;
}
/* static */ Shape*
FunctionScope::getEmptyEnvironmentShape(ExclusiveContext* cx, bool hasParameterExprs)
{