summaryrefslogtreecommitdiffstats
path: root/js/src/vm/Scope.cpp
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-06-09 01:48:29 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-07-18 22:38:30 -0400
commitd27591806950034d8d3763a13db6f2c201311991 (patch)
treeea9b9ec96274ab9d3f0fd48670dc9b1876fdd889 /js/src/vm/Scope.cpp
parentd200a2b02e50b33511ff2ea26a2968301f06b170 (diff)
downloadUXP-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.cpp8
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)
{