mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
006f5afe12
Summary: Because of T92179998, T93607943, and T93394807, we are still seeking resolution to tricky crashes wrt the use of EventEmitters. I believe the recent spike is because of two recent changes: we pass in EventEmitters earlier, during PreAllocation; and we clean them up earlier, during stopSurface, to avoid jsi::~Pointer crashes. Additionally, the gating previously added around the PreAllocation path was incorrect and led to more nullptrs being passed around as EventEmitters. To mitigate these issues: 1) I am adding/fixing gating to preallocation and early cleanup paths 2) I am making EventEmitterWrapper more resilient by ensuring EventEmitter is non-null before invoking it. 3) I am making sure that in more cases, we pass a non-null EventEmitter pointer to Java. 4) I am backing out the synchronization in EventEmitterWrapper (java side) as that did not resolve the issue and is a pessimisation There are older, unchanged paths that could still be passing in nullptr as the EventEmitter (Update and Create). As those have not changed recently, I'm not going to fix those cases and instead, we can now rely on the caller to ensure that the EventEmitter is non-null before calling. Changelog: [internal] Differential Revision: D29252806 fbshipit-source-id: 5c68d95fa2465afe45e0083a0685c8c1abf31619
Building React Native for Android
See the docs on the website.
Running tests
When you submit a pull request CircleCI will automatically run all tests. To run tests locally, see Testing.