Commit c1da025b authored by marja's avatar marja Committed by Commit bot

Fix r37816: SloppyBlockFunctionStatement needs to go to parser_zone_.

Putting SloppyBlockFunctionStatement into local_zone_ was too early. It
needs to go into parser_zone_ because Scope refers to it. It will be
moved back to local_zone_ when we can put Scopes into temporary Zones.

A test (to demonstrate we crash without this CL) will follow in a separate CL.

R=verwaest@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2170813002
Cr-Commit-Position: refs/heads/master@{#37920}
parent f793cb1f
......@@ -3186,8 +3186,8 @@ class AstNodeFactory final BASE_EMBEDDED {
SloppyBlockFunctionStatement* NewSloppyBlockFunctionStatement(
Statement* statement, Scope* scope) {
return new (local_zone_)
SloppyBlockFunctionStatement(local_zone_, statement, scope);
return new (parser_zone_)
SloppyBlockFunctionStatement(parser_zone_, statement, scope);
}
CaseClause* NewCaseClause(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment