diff --git a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp index b29907d0e97..2dc9a8b1276 100644 --- a/packages/react-native/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp +++ b/packages/react-native/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp @@ -82,17 +82,17 @@ class RuntimeSchedulerTest : public testing::TestWithParam { return stubClock_->getNow(); }; - performanceEntryReporter_ = PerformanceEntryReporter::getInstance().get(); + performanceEntryReporter_ = std::make_unique(); runtimeScheduler_ = std::make_unique(runtimeExecutor, stubNow); - runtimeScheduler_->setPerformanceEntryReporter(performanceEntryReporter_); + runtimeScheduler_->setPerformanceEntryReporter( + performanceEntryReporter_.get()); } void TearDown() override { ReactNativeFeatureFlags::dangerouslyReset(); - performanceEntryReporter_->clearEntries(); } jsi::Function createHostFunctionFromLambda( @@ -119,7 +119,7 @@ class RuntimeSchedulerTest : public testing::TestWithParam { std::unique_ptr stubQueue_; std::unique_ptr runtimeScheduler_; std::shared_ptr stubErrorUtils_; - PerformanceEntryReporter* performanceEntryReporter_{}; + std::unique_ptr performanceEntryReporter_{}; }; TEST_P(RuntimeSchedulerTest, now) {