Please sign in to comment.
Fix ReactInstanceManager deadlock
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
- Loading branch information...
Showing with 41 additions and 16 deletions.