summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-04-06 10:44:48 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-04-06 10:44:48 +0200
commit8e8d0ed75c076b4b92e2971ff877b104dafeffca (patch)
treeb95c03827ea8aa8c29b092377e5c2032222b28d8 /js
parent4a62cbec61620f54bfb3949d9165c4dd406c2444 (diff)
downloadUXP-8e8d0ed75c076b4b92e2971ff877b104dafeffca.tar
UXP-8e8d0ed75c076b4b92e2971ff877b104dafeffca.tar.gz
UXP-8e8d0ed75c076b4b92e2971ff877b104dafeffca.tar.lz
UXP-8e8d0ed75c076b4b92e2971ff877b104dafeffca.tar.xz
UXP-8e8d0ed75c076b4b92e2971ff877b104dafeffca.zip
Remove for-in/of loop parsing code that redundantly marks the loop
target as assigned -- Parser::forHeadStart already does this.
Diffstat (limited to 'js')
-rw-r--r--js/src/frontend/Parser.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp
index 94573fce7..c979e38c3 100644
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -5715,12 +5715,6 @@ Parser<ParseHandler>::forStatement(YieldHandling yieldHandling)
stmt.refineForKind(StatementKind::ForOfLoop);
}
- if (!handler.isDeclarationList(target)) {
- MOZ_ASSERT(!forLoopLexicalScope);
- if (!checkAndMarkAsAssignmentLhs(target, PlainAssignment))
- return null();
- }
-
// Parser::declaration consumed everything up to the closing ')'. That
// token follows an {Assignment,}Expression, so the next token must be
// consumed as if an operator continued the expression, i.e. as None.