Index: src/parsing/pattern-rewriter.cc |
diff --git a/src/parsing/pattern-rewriter.cc b/src/parsing/pattern-rewriter.cc |
index 21b1cec69655c092b3c4e822ed3d14dd6987ccb6..f3d9bb02a33bec518052372f713aec08ea3ef756 100644 |
--- a/src/parsing/pattern-rewriter.cc |
+++ b/src/parsing/pattern-rewriter.cc |
@@ -37,11 +37,12 @@ void Parser::PatternRewriter::DeclareAndInitializeVariables( |
void Parser::PatternRewriter::RewriteDestructuringAssignment( |
Parser* parser, RewritableExpression* to_rewrite, Scope* scope) { |
- PatternRewriter rewriter; |
- |
+ DCHECK(!scope->HasBeenRemoved()); |
DCHECK(!to_rewrite->is_rewritten()); |
bool ok = true; |
+ |
+ PatternRewriter rewriter; |
rewriter.scope_ = scope; |
rewriter.parser_ = parser; |
rewriter.context_ = ASSIGNMENT; |
@@ -586,8 +587,9 @@ void Parser::PatternRewriter::VisitArrayLiteral(ArrayLiteral* node, |
Expression* closing_condition = factory()->NewUnaryOperation( |
Token::NOT, factory()->NewVariableProxy(done), nopos); |
- parser_->FinalizeIteratorUse(completion, closing_condition, iterator, block_, |
- target); |
+ |
+ parser_->FinalizeIteratorUse(scope(), completion, closing_condition, iterator, |
+ block_, target); |
block_ = target; |
} |