From 85486570ef544695a2296ff13790d39e042f44d4 Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Wed, 11 Oct 2023 11:41:45 +0200 Subject: [PATCH] fix(tm-android): TM SyncVoidKind methods throws JSError --- .../core/platform/android/ReactCommon/JavaTurboModule.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/react-native/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.cpp b/packages/react-native/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.cpp index 521dcbaed5d9fe..3319b7431dc4bd 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.cpp +++ b/packages/react-native/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.cpp @@ -738,13 +738,10 @@ jsi::Value JavaTurboModule::invokeJavaMethod( case VoidKind: { if (shouldVoidMethodsExecuteSync_) { env->CallVoidMethodA(instance, methodID, jargs.data()); + checkJNIErrorForMethodCall(); + TMPL::syncMethodCallExecutionEnd(moduleName, methodName); TMPL::syncMethodCallEnd(moduleName, methodName); - try { - FACEBOOK_JNI_THROW_PENDING_EXCEPTION(); - } catch (...) { - throw; - } return jsi::Value::undefined(); }