mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
90287ca536
Summary: Currently the `remove` API returns an owned unique_ptr of the removed ShadowTree but it's not used anywhere, so we can simplify the API. Because of that change, we can make the API safe even if the SurfaceId has already been removed. For context, on Android there is a race between RootView.unmountReactApplication and C++ teardown which removes all SurfaceIds. This currently causes a crash, but after this diff the 2nd call to `remove` for a given SurfaceId will noop. Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D22416471 fbshipit-source-id: dbba44c276aab8e81097b92a89e0becdcb7b28ba