diff --git a/ReactCommon/react/renderer/scheduler/Scheduler.cpp b/ReactCommon/react/renderer/scheduler/Scheduler.cpp index a8418c52c6e..89fd0a5fb73 100644 --- a/ReactCommon/react/renderer/scheduler/Scheduler.cpp +++ b/ReactCommon/react/renderer/scheduler/Scheduler.cpp @@ -95,11 +95,9 @@ Scheduler::Scheduler( uiManager->setDelegate(this); uiManager->setComponentDescriptorRegistry(componentDescriptorRegistry_); - runtimeExecutor_( - [uiManager, runtimeExecutor = runtimeExecutor_](jsi::Runtime &runtime) { - UIManagerBinding::createAndInstallIfNeeded( - runtime, runtimeExecutor, uiManager); - }); + runtimeExecutor_([uiManager](jsi::Runtime &runtime) { + UIManagerBinding::createAndInstallIfNeeded(runtime, uiManager); + }); auto componentDescriptorRegistryKey = "ComponentDescriptorRegistry_DO_NOT_USE_PRETTY_PLEASE"; diff --git a/ReactCommon/react/renderer/uimanager/UIManagerBinding.cpp b/ReactCommon/react/renderer/uimanager/UIManagerBinding.cpp index e1ac1399850..c8af3e88232 100644 --- a/ReactCommon/react/renderer/uimanager/UIManagerBinding.cpp +++ b/ReactCommon/react/renderer/uimanager/UIManagerBinding.cpp @@ -23,7 +23,6 @@ namespace facebook::react { void UIManagerBinding::createAndInstallIfNeeded( jsi::Runtime &runtime, - RuntimeExecutor const &runtimeExecutor, std::shared_ptr const &uiManager) { auto uiManagerModuleName = "nativeFabricUIManager"; @@ -32,8 +31,7 @@ void UIManagerBinding::createAndInstallIfNeeded( if (uiManagerValue.isUndefined()) { // The global namespace does not have an instance of the binding; // we need to create, install and return it. - auto uiManagerBinding = - std::make_shared(uiManager, runtimeExecutor); + auto uiManagerBinding = std::make_shared(uiManager); auto object = jsi::Object::createFromHostObject(runtime, uiManagerBinding); runtime.global().setProperty( runtime, uiManagerModuleName, std::move(object)); @@ -54,11 +52,8 @@ std::shared_ptr UIManagerBinding::getBinding( return uiManagerObject.getHostObject(runtime); } -UIManagerBinding::UIManagerBinding( - std::shared_ptr uiManager, - RuntimeExecutor runtimeExecutor) - : uiManager_(std::move(uiManager)), - runtimeExecutor_(std::move(runtimeExecutor)) {} +UIManagerBinding::UIManagerBinding(std::shared_ptr uiManager) + : uiManager_(std::move(uiManager)) {} UIManagerBinding::~UIManagerBinding() { LOG(WARNING) << "UIManagerBinding::~UIManagerBinding() was called (address: " diff --git a/ReactCommon/react/renderer/uimanager/UIManagerBinding.h b/ReactCommon/react/renderer/uimanager/UIManagerBinding.h index 9ddd53d77e2..f929ba54760 100644 --- a/ReactCommon/react/renderer/uimanager/UIManagerBinding.h +++ b/ReactCommon/react/renderer/uimanager/UIManagerBinding.h @@ -7,7 +7,6 @@ #pragma once -#include #include #include #include @@ -28,7 +27,6 @@ class UIManagerBinding : public jsi::HostObject { */ static void createAndInstallIfNeeded( jsi::Runtime &runtime, - RuntimeExecutor const &runtimeExecutor, std::shared_ptr const &uiManager); /* @@ -37,9 +35,7 @@ class UIManagerBinding : public jsi::HostObject { */ static std::shared_ptr getBinding(jsi::Runtime &runtime); - UIManagerBinding( - std::shared_ptr uiManager, - RuntimeExecutor runtimeExecutor); + UIManagerBinding(std::shared_ptr uiManager); ~UIManagerBinding(); @@ -76,8 +72,6 @@ class UIManagerBinding : public jsi::HostObject { std::shared_ptr uiManager_; std::unique_ptr eventHandler_; mutable ReactEventPriority currentEventPriority_; - - RuntimeExecutor runtimeExecutor_; }; } // namespace facebook::react