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

Unified Diff: src/parsing/parser.cc

Issue 2372703004: Don't reset parameters if we aborted preparsing, rebuild them from the params_ list (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 | « src/ast/scopes.cc ('k') | test/mjsunit/regress/regress-abort-preparsing-params.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 eae5a5781ce76fe043087245870f36da14dbcae5..bb9d69337df8a6b0b39142e1512a6c7c978db4ba 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -3488,7 +3488,9 @@ PreParser::PreParseResult Parser::ParseLazyFunctionBodyWithPreParser(
use_counts_);
// Detaching the scopes created by PreParser from the Scope chain must be done
// above (see ParseFunctionLiteral & AnalyzePartially).
- if (!is_inner_function) function_scope->ResetAfterPreparsing();
+ if (!is_inner_function) {
+ function_scope->ResetAfterPreparsing(result == PreParser::kPreParseAbort);
+ }
if (pre_parse_timer_ != NULL) {
pre_parse_timer_->Stop();
}
« no previous file with comments | « src/ast/scopes.cc ('k') | test/mjsunit/regress/regress-abort-preparsing-params.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698