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

Unified Diff: src/api.cc

Issue 2887193002: Create a thread safe version of StatsCounters and use. (Closed)
Patch Set: fix nits of mtrofin Created 3 years, 7 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 | « no previous file | src/counters.h » ('j') | src/counters.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 0ef4a8bf2d1dd7e0f658dcc091de68c07763add1..52e25b21b917c63736e88a5eaf005b3f332016bb 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -8690,9 +8690,7 @@ void Isolate::SetUseCounterCallback(UseCounterCallback callback) {
void Isolate::SetCounterFunction(CounterLookupCallback callback) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
- isolate->stats_table()->SetCounterFunction(callback);
- isolate->InitializeLoggingAndCounters();
- isolate->counters()->ResetCounters();
+ isolate->stats_table()->SetCounterFunction(callback, isolate);
}
« no previous file with comments | « no previous file | src/counters.h » ('j') | src/counters.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698