mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
d183fd327b
Summary: It is possible (most recently, if there are bugs in LayoutAnimations, but also in general) to issue a `removeViewAt` MountItem that removes the incorrect view if, for whatever reason, the View hierarchy has become "corrupt" and Views are out of order. I added two heuristics to catch if that happens: check the tag of the View being removed if possible, and ensure that all deleted views do not have a parent. This will turn weird visual glitches into hard crashes, which we want once the UI has become corrupt. My only concern here is with perf; maybe we could put these behind a debug-only flag or something, but it's probably not a huge deal. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D22130186 fbshipit-source-id: 0942b019c3449d68edfb9db1fe8130ea351d1d8f