Rollout enableBridgelessArchitectureSoftExceptions (#43485)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43485

Already fully rolled out internally.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D54804177

fbshipit-source-id: 128822d408b6943f1f1536eb0101c6684cd45106
This commit is contained in:
Pieter De Baets
2024-03-14 10:31:37 -07:00
committed by Facebook GitHub Bot
parent 7488dc05e8
commit eca4d76d81
3 changed files with 6 additions and 15 deletions
@@ -1909,7 +1909,6 @@ public class com/facebook/react/config/ReactFeatureFlags {
public static field dispatchPointerEvents Z
public static field enableBridgelessArchitecture Z
public static field enableBridgelessArchitectureNewCreateReloadDestroy Z
public static field enableBridgelessArchitectureSoftExceptions Z
public static field enableClonelessStateProgression Z
public static field enableCppPropsIteratorSetter Z
public static field enableEagerRootViewAttachment Z
@@ -66,11 +66,6 @@ public class ReactFeatureFlags {
*/
public static boolean enableBridgelessArchitecture = false;
/**
* Does the bridgeless architecture log soft exceptions. Could be useful for tracking down issues.
*/
public static volatile boolean enableBridgelessArchitectureSoftExceptions = false;
/** Does the bridgeless architecture use the new create/reload/destroy routines */
public static volatile boolean enableBridgelessArchitectureNewCreateReloadDestroy = true;
@@ -48,7 +48,6 @@ import com.facebook.react.bridge.queue.QueueThreadExceptionHandler;
import com.facebook.react.bridge.queue.ReactQueueConfiguration;
import com.facebook.react.common.LifecycleState;
import com.facebook.react.common.build.ReactBuildConfig;
import com.facebook.react.config.ReactFeatureFlags;
import com.facebook.react.devsupport.DevSupportManagerBase;
import com.facebook.react.devsupport.DisabledDevSupportManager;
import com.facebook.react.devsupport.InspectorFlags;
@@ -879,16 +878,14 @@ public class ReactHostImpl implements ReactHost {
private void raiseSoftException(String method, String message, @Nullable Throwable throwable) {
log(method, message);
if (ReactFeatureFlags.enableBridgelessArchitectureSoftExceptions) {
if (throwable != null) {
ReactSoftExceptionLogger.logSoftException(
TAG, new ReactNoCrashSoftException(method + ": " + message, throwable));
return;
}
if (throwable != null) {
ReactSoftExceptionLogger.logSoftException(
TAG, new ReactNoCrashSoftException(method + ": " + message));
TAG, new ReactNoCrashSoftException(method + ": " + message, throwable));
return;
}
ReactSoftExceptionLogger.logSoftException(
TAG, new ReactNoCrashSoftException(method + ": " + message));
}
private Task<Boolean> callWithExistingReactInstance(