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

Unified Diff: src/parser.cc

Issue 1312613003: Ensure hole checks take place in switch statement scopes (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Changes based on review Created 5 years, 4 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
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index 57089fad85dc25abaa994ae3ea84179548858bad..978e8ed8f21bcd7a6bb84fd05c4f2bfbf50c2def 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -3002,6 +3002,7 @@ Statement* Parser::ParseSwitchStatement(ZoneList<const AstRawString*>* labels,
Block* cases_block =
factory()->NewBlock(NULL, 1, true, RelocInfo::kNoPosition);
Scope* cases_scope = NewScope(scope_, BLOCK_SCOPE);
+ cases_scope->SetNonlinear();
SwitchStatement* switch_statement =
factory()->NewSwitchStatement(labels, switch_pos);

Powered by Google App Engine
This is Rietveld 408576698