Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: RedBoxes don't show up after teardowns (facebook#38997)
Summary: Pull Request resolved: facebook#38997 After React Native gets destroyed (e.g: via an exception), the ReactHost resets its current activity. ## Problem React Native can display RedBoxes after React Native destruction (e.g: in the case of an exception). Displaying RedBoxes requires the current activity, which gets nullified. So, the RedBox might not show up after destruction. ## Changes This diff makes ReactHost keep a track of its last non-null activity in a WeakRef. Then, the DevMenu just uses the last non-null activity to display RedBoxes (and everything else). Changelog: [Internal] Differential Revision: https://internalfb.com/D48076893 fbshipit-source-id: 4f06527d7570b212e2bca985dc04912741fa9830
- Loading branch information