mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
df7e8c64ff
Summary: D12829677 introduced a deadlock where onHostResume holds the lock on `moveToResumedLifecycleState()` then waits for the `mReactContext` lock, but at the same time setupReactContext holds the `mReactContext` lock and waits for `moveToResumedLifecycleState()` https://our.intern.facebook.com/intern/everpaste/?handle=GAgXFgLQH1ZlQikBAMQzo2LZ6h9TbiAxAAAz. The purpose of the previous diff was to make sure that detachRootoView and setupReactContext did not interfere with each other, and implemented that by blocking on mReactContext. Since this overloads the usage of mReactContext, let's use a different lock `mAttachedRootViews` to implement this behavior instead Reviewed By: mdvacca Differential Revision: D12989555 fbshipit-source-id: c12e5fd9c5fa4c2037167e9400dc0c1578e38959