summaryrefslogtreecommitdiffstats
path: root/js/src/frontend
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-06-09 17:20:09 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-07-18 22:38:37 -0400
commitc1ba97eeae3171fb96283583c33f0238cedacab6 (patch)
tree92709b6e1c70d7e4594c68d9f73ae297d6f6dc67 /js/src/frontend
parent0f5f3c30490741c3053627de4fd5a27964c9953c (diff)
downloadUXP-c1ba97eeae3171fb96283583c33f0238cedacab6.tar
UXP-c1ba97eeae3171fb96283583c33f0238cedacab6.tar.gz
UXP-c1ba97eeae3171fb96283583c33f0238cedacab6.tar.lz
UXP-c1ba97eeae3171fb96283583c33f0238cedacab6.tar.xz
UXP-c1ba97eeae3171fb96283583c33f0238cedacab6.zip
1340089 - Check the binding name in comprehensionFor.
Diffstat (limited to 'js/src/frontend')
-rw-r--r--js/src/frontend/Parser.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp
index 322f428e5..fc4b0e965 100644
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -8101,6 +8101,8 @@ Parser<ParseHandler>::comprehensionFor(GeneratorKind comprehensionKind)
MUST_MATCH_TOKEN_FUNC(TokenKindIsPossibleIdentifier, JSMSG_NO_VARIABLE_NAME);
RootedPropertyName name(context, bindingIdentifier(YieldIsKeyword));
+ if (!name)
+ return null();
if (name == context->names().let) {
error(JSMSG_LET_COMP_BINDING);
return null();