File tree 6 files changed +3
-22
lines changed
ReactAndroid/src/main/jni/react/fabric
ReactCommon/react/renderer/scheduler 6 files changed +3
-22
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,7 @@ NS_ASSUME_NONNULL_BEGIN
28
28
@interface RCTSurfacePresenter : NSObject
29
29
30
30
- (instancetype )initWithContextContainer : (facebook::react::ContextContainer::Shared)contextContainer
31
- runtimeExecutor : (facebook::react::RuntimeExecutor)runtimeExecutor
32
- bindingsInstallExecutor : (facebook::react::RuntimeExecutor)bindingsInstallExecutor ;
31
+ runtimeExecutor : (facebook::react::RuntimeExecutor)runtimeExecutor ;
33
32
34
33
@property (nonatomic ) facebook::react::ContextContainer::Shared contextContainer;
35
34
@property (nonatomic ) facebook::react::RuntimeExecutor runtimeExecutor;
Original file line number Diff line number Diff line change @@ -79,20 +79,17 @@ @implementation RCTSurfacePresenter {
79
79
RCTScheduler *_Nullable _scheduler; // Thread-safe. Pointer is protected by `_schedulerAccessMutex`.
80
80
ContextContainer::Shared _contextContainer; // Protected by `_schedulerLifeCycleMutex`.
81
81
RuntimeExecutor _runtimeExecutor; // Protected by `_schedulerLifeCycleMutex`.
82
- RuntimeExecutor _bindingsInstallExecutor; // Only used for installing bindings.
83
82
84
83
butter::shared_mutex _observerListMutex;
85
84
std::vector<__weak id <RCTSurfacePresenterObserver>> _observers; // Protected by `_observerListMutex`.
86
85
}
87
86
88
87
- (instancetype )initWithContextContainer : (ContextContainer::Shared)contextContainer
89
88
runtimeExecutor : (RuntimeExecutor)runtimeExecutor
90
- bindingsInstallExecutor : (RuntimeExecutor)bindingsInstallExecutor
91
89
{
92
90
if (self = [super init ]) {
93
91
assert (contextContainer && " RuntimeExecutor must be not null." );
94
92
_runtimeExecutor = runtimeExecutor;
95
- _bindingsInstallExecutor = bindingsInstallExecutor;
96
93
_contextContainer = contextContainer;
97
94
98
95
_surfaceRegistry = [RCTSurfaceRegistry new ];
@@ -298,7 +295,6 @@ - (RCTScheduler *)_createScheduler
298
295
}
299
296
300
297
toolbox.runtimeExecutor = runtimeExecutor;
301
- toolbox.bindingsInstallExecutor = _bindingsInstallExecutor;
302
298
303
299
toolbox.mainRunLoopObserverFactory = [](RunLoopObserver::Activity activities,
304
300
RunLoopObserver::WeakOwner const &owner) {
Original file line number Diff line number Diff line change @@ -89,10 +89,8 @@ - (instancetype)initWithBridge:(RCTBridge *)bridge contextContainer:(ContextCont
89
89
{
90
90
if (self = [super init ]) {
91
91
contextContainer->update (*RCTContextContainerFromBridge (bridge));
92
- auto runtimeExecuter = RCTRuntimeExecutorFromBridge (bridge);
93
92
_surfacePresenter = [[RCTSurfacePresenter alloc ] initWithContextContainer: contextContainer
94
- runtimeExecutor: runtimeExecuter
95
- bindingsInstallExecutor: runtimeExecuter];
93
+ runtimeExecutor: RCTRuntimeExecutorFromBridge (bridge)];
96
94
97
95
_bridge = bridge;
98
96
_batchedBridge = [_bridge batchedBridge ] ?: _bridge;
Original file line number Diff line number Diff line change @@ -468,12 +468,7 @@ void Binding::installFabricUIManager(
468
468
auto toolbox = SchedulerToolbox{};
469
469
toolbox.contextContainer = contextContainer;
470
470
toolbox.componentRegistryFactory = componentsRegistry->buildRegistryFunction ;
471
-
472
- // TODO: (T130208323) runtimeExecutor should execute lambdas after
473
- // main bundle eval, and bindingsInstallExecutor should execute before.
474
- toolbox.bindingsInstallExecutor = runtimeExecutor;
475
471
toolbox.runtimeExecutor = runtimeExecutor;
476
-
477
472
toolbox.synchronousEventBeatFactory = synchronousBeatFactory;
478
473
toolbox.asynchronousEventBeatFactory = asynchronousBeatFactory;
479
474
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ Scheduler::Scheduler(
95
95
uiManager->setDelegate (this );
96
96
uiManager->setComponentDescriptorRegistry (componentDescriptorRegistry_);
97
97
98
- schedulerToolbox. bindingsInstallExecutor ([uiManager](jsi::Runtime &runtime) {
98
+ runtimeExecutor_ ([uiManager](jsi::Runtime &runtime) {
99
99
UIManagerBinding::createAndInstallIfNeeded (runtime, uiManager);
100
100
});
101
101
Original file line number Diff line number Diff line change @@ -40,13 +40,6 @@ struct SchedulerToolbox final {
40
40
41
41
/*
42
42
* Represents running JavaScript VM and associated execution queue.
43
- * Can execute lambdas before main bundle has loaded.
44
- */
45
- RuntimeExecutor bindingsInstallExecutor;
46
-
47
- /*
48
- * Represents running JavaScript VM and associated execution queue.
49
- * Only executes lambdas after main bundle has loaded.
50
43
*/
51
44
RuntimeExecutor runtimeExecutor;
52
45
You can’t perform that action at this time.
0 commit comments