mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-04 09:27:53 +08:00
Summary: Yet another issue with mAttachedRootViews. Every time attachRootView is called, the root view's id is reset to NO_ID. However, there can be a case where the react context has not initialized yet, so we delay attaching the root view to the instance manager until setupReactContext. If attachRootView was called a second time before the react context has finished initializing, we end up in a situation where we try to attach the same root view twice I'm planning to remove mAttachedRootViews all together in a future diff, but for now let's avoid these crashes. Reviewed By: mmmulani Differential Revision: D12835167 fbshipit-source-id: ebef3fadc5f9f467eebb3b5644c685acc5ea10bf