Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(675)

Unified Diff: src/parsing/pattern-rewriter.cc

Issue 1767063002: Fix completion value of empty catch block in the presence of destructuring. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/parsing/parser.cc ('k') | test/mjsunit/harmony/destructuring.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/pattern-rewriter.cc
diff --git a/src/parsing/pattern-rewriter.cc b/src/parsing/pattern-rewriter.cc
index 2a194ee14b32d9145bddd82f26285ab86ad81241..69626d72f2e13573c55d9a2ab560a3c81cddcdd0 100644
--- a/src/parsing/pattern-rewriter.cc
+++ b/src/parsing/pattern-rewriter.cc
@@ -17,6 +17,8 @@ void Parser::PatternRewriter::DeclareAndInitializeVariables(
ZoneList<const AstRawString*>* names, bool* ok) {
PatternRewriter rewriter;
+ DCHECK(block->ignore_completion_value());
+
rewriter.scope_ = declaration_descriptor->scope;
rewriter.parser_ = declaration_descriptor->parser;
rewriter.context_ = BINDING;
@@ -358,7 +360,7 @@ void Parser::PatternRewriter::VisitRewritableExpression(
PatternContext old_context = SetAssignmentContextIfNeeded(initializer);
int pos = assign->position();
Block* old_block = block_;
- block_ = factory()->NewBlock(nullptr, 8, false, pos);
+ block_ = factory()->NewBlock(nullptr, 8, true, pos);
Variable* temp = nullptr;
Expression* pattern = assign->target();
Expression* old_value = current_value_;
« no previous file with comments | « src/parsing/parser.cc ('k') | test/mjsunit/harmony/destructuring.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698