mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Summary: There is a race condition between tearing down the bridge vs CallbackWrapper invoking the wrapped jsi::Function. This means the wrapper can be stale and unsafe to access after the bridge dies. To avoid unsafe access, let's clean it up properly using weak ref. Reviewed By: RSNara Differential Revision: D17380360 fbshipit-source-id: f91ce75d945bf8ed0b141c593bcc674ff465aa8c