Commit 932a865e authored by verwaest's avatar verwaest Committed by Commit bot

[counters] Fix runtime-call-stats wrt background parsing

BUG=

Review-Url: https://codereview.chromium.org/2507293003
Cr-Commit-Position: refs/heads/master@{#41088}
parent afd49054
......@@ -3891,10 +3891,10 @@ typename ParserBase<Impl>::ExpressionT
ParserBase<Impl>::ParseArrowFunctionLiteral(
bool accept_IN, const FormalParametersT& formal_parameters, bool* ok) {
const RuntimeCallStats::CounterId counters[2][2] = {
{&RuntimeCallStats::ParseArrowFunctionLiteral,
&RuntimeCallStats::ParseBackgroundArrowFunctionLiteral},
{&RuntimeCallStats::PreParseArrowFunctionLiteral,
&RuntimeCallStats::PreParseBackgroundArrowFunctionLiteral}};
{&RuntimeCallStats::ParseBackgroundArrowFunctionLiteral,
&RuntimeCallStats::ParseArrowFunctionLiteral},
{&RuntimeCallStats::PreParseBackgroundArrowFunctionLiteral,
&RuntimeCallStats::PreParseArrowFunctionLiteral}};
RuntimeCallTimerScope runtime_timer(
runtime_call_stats_,
counters[Impl::IsPreParser()][parsing_on_main_thread_]);
......
......@@ -180,10 +180,10 @@ PreParser::Expression PreParser::ParseFunctionLiteral(
// Function ::
// '(' FormalParameterList? ')' '{' FunctionBody '}'
const RuntimeCallStats::CounterId counters[2][2] = {
{&RuntimeCallStats::PreParseWithVariableResolution,
&RuntimeCallStats::PreParseBackgroundWithVariableResolution},
{&RuntimeCallStats::PreParseNoVariableResolution,
&RuntimeCallStats::PreParseBackgroundNoVariableResolution}};
{&RuntimeCallStats::PreParseBackgroundWithVariableResolution,
&RuntimeCallStats::PreParseWithVariableResolution},
{&RuntimeCallStats::PreParseBackgroundNoVariableResolution,
&RuntimeCallStats::PreParseNoVariableResolution}};
RuntimeCallTimerScope runtime_timer(
runtime_call_stats_,
counters[track_unresolved_variables_][parsing_on_main_thread_]);
......
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