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

Unified Diff: src/parsing/parser.cc

Issue 2347633002: [parser] Fix unfinalized block scope in non-lexical for each (Closed)
Patch Set: Created 4 years, 3 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/debug-scopes.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index 4973857c37ea0f2cf2854c35000be559db065e3a..622e563d01444f1466291fe373ef079aa62a1dbb 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -2667,7 +2667,9 @@ Statement* Parser::ParseForStatement(ZoneList<const AstRawString*>* labels,
Statement* final_loop = InitializeForEachStatement(
loop, expression, enumerable, body, each_keyword_position);
- DCHECK_NULL(for_state.FinalizedBlockScope());
nickie 2016/09/15 14:54:25 Method FinalizedBlockScope() has side effects, esp
+ Scope* for_scope = for_state.FinalizedBlockScope();
+ DCHECK_NULL(for_scope);
+ USE(for_scope);
return final_loop;
} else {
« no previous file with comments | « no previous file | test/mjsunit/debug-scopes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698