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

Unified Diff: src/parsing/parameter-initializer-rewriter.cc

Issue 1747853002: Fix issue with re-scoping in do expressions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | test/mjsunit/harmony/regress/regress-4658.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parameter-initializer-rewriter.cc
diff --git a/src/parsing/parameter-initializer-rewriter.cc b/src/parsing/parameter-initializer-rewriter.cc
index 003bbebae016562d8a4e2696b0fd4e69a0920ba1..3e3587b2bd75bcf6646bcd18635bf1a8f956d55c 100644
--- a/src/parsing/parameter-initializer-rewriter.cc
+++ b/src/parsing/parameter-initializer-rewriter.cc
@@ -62,7 +62,7 @@ void Rewriter::VisitClassLiteral(ClassLiteral* class_literal) {
void Rewriter::VisitVariableProxy(VariableProxy* proxy) {
if (proxy->is_resolved()) {
Variable* var = proxy->var();
- DCHECK_EQ(var->mode(), TEMPORARY);
+ if (var->mode() != TEMPORARY) return;
adamk 2016/02/29 19:20:41 I agree that this seems fine for the ".catch" vari
rossberg 2016/03/01 09:44:10 Agreed. Var decls are the only bit missing towards
if (old_scope_->RemoveTemporary(var)) {
var->set_scope(new_scope_);
new_scope_->AddTemporary(var);
« no previous file with comments | « no previous file | test/mjsunit/harmony/regress/regress-4658.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698