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

Unified Diff: src/parsing/preparser.cc

Issue 2509683002: [counters] Use separate counters for background parsing (Closed)
Patch Set: fixing cctest Created 4 years, 1 month 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
Index: src/parsing/preparser.cc
diff --git a/src/parsing/preparser.cc b/src/parsing/preparser.cc
index 8e5e9ab6525c766804733e3fc4339de452324adf..dc7920d9f523c49959a4d2c1aaddba9063f2abc3 100644
--- a/src/parsing/preparser.cc
+++ b/src/parsing/preparser.cc
@@ -182,8 +182,12 @@ PreParser::Expression PreParser::ParseFunctionLiteral(
RuntimeCallTimerScope runtime_timer(
runtime_call_stats_,
track_unresolved_variables_
- ? &RuntimeCallStats::PreParseWithVariableResolution
- : &RuntimeCallStats::PreParseNoVariableResolution);
+ ? parsing_on_main_thread_
+ ? &RuntimeCallStats::PreParseWithVariableResolution
+ : &RuntimeCallStats::PreParseBackgroundWithVariableResolution
+ : parsing_on_main_thread_
+ ? &RuntimeCallStats::PreParseNoVariableResolution
+ : &RuntimeCallStats::PreParseBackgroundNoVariableResolution);
// Parse function body.
PreParserStatementList body;

Powered by Google App Engine
This is Rietveld 408576698