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

Unified Diff: src/parsing/parser-base.h

Issue 2380993003: Readd default function variables upon scope reset for preparse abort (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/parsing/parser.cc ('k') | test/mjsunit/regress/regress-651327.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser-base.h
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h
index fac3ec694afaa90ad2dc3c213572b8f60d6baede..689b5a1053fec2776ffb1119e9925ff476636efd 100644
--- a/src/parsing/parser-base.h
+++ b/src/parsing/parser-base.h
@@ -729,7 +729,6 @@ class ParserBase {
new (zone()) DeclarationScope(zone(), scope(), FUNCTION_SCOPE, kind);
// TODO(verwaest): Move into the DeclarationScope constructor.
if (!IsArrowFunction(kind)) {
- result->DeclareThis(ast_value_factory());
result->DeclareDefaultFunctionVariables(ast_value_factory());
}
return result;
@@ -3932,8 +3931,8 @@ ParserBase<Impl>::ParseArrowFunctionLiteral(
LazyParsingResult result = impl()->SkipLazyFunctionBody(
&materialized_literal_count, &expected_property_count, false, true,
CHECK_OK);
- formal_parameters.scope->ResetAfterPreparsing(result ==
- kLazyParsingAborted);
+ formal_parameters.scope->ResetAfterPreparsing(
+ ast_value_factory_, result == kLazyParsingAborted);
if (formal_parameters.materialized_literals_count > 0) {
materialized_literal_count +=
« no previous file with comments | « src/parsing/parser.cc ('k') | test/mjsunit/regress/regress-651327.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698