mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Summary: Now `UIManager` serves as `ShadowTree`'s delegate instead of `Scheduler`. There is no good reason for Scheduler to be a ShadowTree delegate anymore, now UIManager owns all ShadowTree instances (via the registry). The existing configuration causes a crash because `ShadowTree` can overlive the `Scheduler`. Having a `UIManager` as a delegate of `ShadowTree` solves the problem because `UIManager` checks the own delegate for (which is actually a Scheduler) nullability before calling something on it (and `Scheduler` nulls that delegate during own deallocation process). (No actual ownership relations were changed in the diff.) Changelog: [Internal] Fabric-specific internal change. Reviewed By: JoshuaGross Differential Revision: D18285500 fbshipit-source-id: 35ac4f37b6abdf4857a23c4869785a323e433317