fix: use local scheduler for thread-safe (#44565)

Summary:
`getScheduler()` is intended for thread-safe

## Changelog:

[Android][FIXED] - local scheduler for thread-safe

Pull Request resolved: https://github.com/facebook/react-native/pull/44565

Test Plan: none

Reviewed By: fabriziocucci

Differential Revision: D57326255

Pulled By: javache

fbshipit-source-id: fa3a1df0f2653d5c286fdb537e0d44ab6fd1ed54
This commit is contained in:
Sunbreak
2024-05-14 04:05:36 -07:00
committed by Facebook GitHub Bot
parent 2cc3ba1f19
commit 7dd91d3437
@@ -91,7 +91,7 @@ void Binding::setPixelDensity(float pointScaleFactor) {
}
void Binding::driveCxxAnimations() {
scheduler_->animationTick();
getScheduler()->animationTick();
}
void Binding::reportMount(SurfaceId surfaceId) {
@@ -189,7 +189,7 @@ void Binding::startSurfaceWithConstraints(
isRTL ? LayoutDirection::RightToLeft : LayoutDirection::LeftToRight;
auto surfaceHandler = SurfaceHandler{moduleName->toStdString(), surfaceId};
surfaceHandler.setContextContainer(scheduler_->getContextContainer());
surfaceHandler.setContextContainer(scheduler->getContextContainer());
surfaceHandler.setProps(initialProps->consume());
surfaceHandler.constraintLayout(constraints, context);