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

Unified Diff: src/parsing/preparser.cc

Issue 1895123002: Prevent un-parsed LiteralFunction reaching the compiler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix test. (eager_compile_hint used function_state_ of parent function.) Created 4 years, 8 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-base.h ('k') | test/mjsunit/regress-604044.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/preparser.cc
diff --git a/src/parsing/preparser.cc b/src/parsing/preparser.cc
index 8b059b1bea0e320c149c6c5426a837ebe9f55a3a..e4c30841edc144f301e20b1fc10db46a00ba7123 100644
--- a/src/parsing/preparser.cc
+++ b/src/parsing/preparser.cc
@@ -984,9 +984,8 @@ PreParser::Expression PreParser::ParseFunctionLiteral(
// See Parser::ParseFunctionLiteral for more information about lazy parsing
// and lazy compilation.
- bool is_lazily_parsed =
- (outer_is_script_scope && allow_lazy() && !parenthesized_function_);
- parenthesized_function_ = false;
+ bool is_lazily_parsed = (outer_is_script_scope && allow_lazy() &&
+ !function_state_->this_function_is_parenthesized());
Expect(Token::LBRACE, CHECK_OK);
if (is_lazily_parsed) {
« no previous file with comments | « src/parsing/parser-base.h ('k') | test/mjsunit/regress-604044.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698