diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/events/EventEmitterWrapper.java b/ReactAndroid/src/main/java/com/facebook/react/fabric/events/EventEmitterWrapper.java index 69d0e1c8a8aecd..e1652a4f2bdd45 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/events/EventEmitterWrapper.java +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/events/EventEmitterWrapper.java @@ -47,7 +47,7 @@ private native void invokeUniqueEvent( * @param eventName {@link String} name of the event to execute. * @param params {@link WritableMap} payload of the event */ - public void invoke(@NonNull String eventName, @Nullable WritableMap params) { + public synchronized void invoke(@NonNull String eventName, @Nullable WritableMap params) { if (!isValid()) { return; } @@ -62,7 +62,7 @@ public void invoke(@NonNull String eventName, @Nullable WritableMap params) { * @param eventName {@link String} name of the event to execute. * @param params {@link WritableMap} payload of the event */ - public void invokeUnique( + public synchronized void invokeUnique( @NonNull String eventName, @Nullable WritableMap params, int customCoalesceKey) { if (!isValid()) { return; @@ -71,7 +71,7 @@ public void invokeUnique( invokeUniqueEvent(eventName, payload, customCoalesceKey); } - public void destroy() { + public synchronized void destroy() { if (mHybridData != null) { mHybridData.resetNative(); }