Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 9eef8056270f8dcf3e77f7b8e9b7cc6aae7dfb21..d69e17655bd96853ec92dbb381c9b06ee03af83a 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -8718,9 +8718,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); |
} |