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