Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fabric: Attempt to recover from invariant violation in ~Sheduler
Summary: We see crashes that happen in the destructor of `EventEmitterWrapper` class which indicates that `EventEmitter`s were not "disabled" before `Runtime` was deallocated. Assuming that `Scheduler` *was* deallocated before the `Runtime` (there is no proof for that), we can suppose that `stopSurface` was not called properly on time. Again, assuming that the moment of Scheduler deallocation is fine, we can try to recover from this situation by forced unmounting of all outstanding `ShadowTree` (that will make future destroying of EventEmitter don't crash). Why do we believe that `Scheduler` *was* deallocated before `Runtime`? We are not sure but that's possibly a case or that might be true for some portion of cases. At least, we will know for sure what exactly went wrong. There is a possibility that all crashes that would happen after will happen exactly here. And, frankly, from the probability standpoint, earlier we destroy JSI objects, lower chances are that it will be after the death of Runtime. Changelog: [Internal] Fabric-specific internal change. Reviewed By: sammy-SC Differential Revision: D18465408 fbshipit-source-id: 76338ed6fce0621cf11ce3178b4d1be7e0c73ccf
- Loading branch information