Skip to content

Commit 076b939

Browse files
Initialize UIManagerBinding::currentEventPriority_ to Default
The field had no initializer and the constructor does not set it, so unstable_getCurrentEventPriority returned uninitialized memory until the first event was dispatched. React reads it when the app first calls updateContainer, so the first render could get an arbitrary lane, sometimes IdleLane. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent bbfd391 commit 076b939

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎packages/react-native/ReactCommon/react/renderer/uimanager/UIManagerBinding.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class UIManagerBinding : public jsi::HostObject {
8888
std::shared_ptr<UIManager> uiManager_;
8989
std::unique_ptr<jsi::Function> eventHandler_;
9090
mutable PointerEventsProcessor pointerEventsProcessor_;
91-
mutable ReactEventPriority currentEventPriority_;
91+
mutable ReactEventPriority currentEventPriority_{ReactEventPriority::Default};
9292
};
9393

9494
} // namespace facebook::react

0 commit comments

Comments
 (0)