mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
912dac24fc
Summary: Because of the previous diffs there's an increased chance of race conditions between JS executing and queuing up PreAllocateViewMountItems for surfaces that are stopped. Make sure those are ignored if they're queued up and a surface has been stopped. Currently stopSurface only happens on the UI thread; PreAllocateViewMountItems can be queued from any thread, but are only executed on the UI thread. So once a batch of items starts executing, there's no race between teardown and execution: we just need to make sure we check that the surface is still running initially. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D21965839 fbshipit-source-id: 0241dc171022cc923b7e38dcd110d664096dde79