diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2019-06-09 01:48:29 -0400 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2019-07-18 22:38:30 -0400 |
commit | d27591806950034d8d3763a13db6f2c201311991 (patch) | |
tree | ea9b9ec96274ab9d3f0fd48670dc9b1876fdd889 /js/src/vm/Scope.cpp | |
parent | d200a2b02e50b33511ff2ea26a2968301f06b170 (diff) | |
download | UXP-d27591806950034d8d3763a13db6f2c201311991.tar UXP-d27591806950034d8d3763a13db6f2c201311991.tar.gz UXP-d27591806950034d8d3763a13db6f2c201311991.tar.lz UXP-d27591806950034d8d3763a13db6f2c201311991.tar.xz UXP-d27591806950034d8d3763a13db6f2c201311991.zip |
1339137 - Don't do Annex B lexical function behavior when redeclaring a parameter name in a function with parameter expressions.
Diffstat (limited to 'js/src/vm/Scope.cpp')
-rw-r--r-- | js/src/vm/Scope.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/js/src/vm/Scope.cpp b/js/src/vm/Scope.cpp index a71c03695..0f80d7b69 100644 --- a/js/src/vm/Scope.cpp +++ b/js/src/vm/Scope.cpp @@ -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) { |