mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
9883da167b
Summary: This diff changes the implementation a little bit: * We don't use RuntimeExecutor there anymore (because it's already been used in EventBeat). The actual purpose of EventBeatManager was distilled to "provide a tick synchronized with the main run loop"; * Now we use dedicated EventBeatManagerObserver interface to decouple this functionality from EventBeat-intrinsic functionality; * A bunch of small clean-ups. * Now we ensure threading and capturing ownership in a single function in AsyncEventBeat class. Before this change, the EventBeatManager called `beat` function of the EventBeat directly bypassing AsyncEventBeat class, and effectively bypassing the check that underlying infra still exists (aka EventBeat::OwnerBox feature). That alone might fix some C++ crashes that we see. Changelog: [Internal] Fabric-specific internal change. Reviewed By: sammy-SC Differential Revision: D18307655 fbshipit-source-id: 3b582cb71085ed99ee94f8e6d575196c2082557b