mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Don't pass on receiveEvent after CatalystInstance destruction
Summary: It is possible for receiveEvent to be called concurrently with/after destruction of FabricUIManager. Drop events if we are able to detect that case. Changelog: [Internal] Reviewed By: sshic Differential Revision: D29596271 fbshipit-source-id: 1fa50d9c3cff0bf578316d905966e1bdfffe94d1
This commit is contained in:
committed by
Facebook GitHub Bot
parent
771d584098
commit
8ed4068381
@@ -820,6 +820,11 @@ public class FabricUIManager implements UIManager, LifecycleEventListener {
|
||||
FLog.d(TAG, "Emitted event without surfaceId: [%d] %s", reactTag, eventName);
|
||||
}
|
||||
|
||||
if (mDestroyed) {
|
||||
FLog.e(TAG, "Attempted to receiveEvent after destruction");
|
||||
return;
|
||||
}
|
||||
|
||||
EventEmitterWrapper eventEmitter = mMountingManager.getEventEmitter(surfaceId, reactTag);
|
||||
|
||||
if (eventEmitter == null) {
|
||||
|
||||
Reference in New Issue
Block a user