From 4595351310f353aad5a5f7af0fe2989650675cdc Mon Sep 17 00:00:00 2001 From: Arushi Kesarwani Date: Wed, 17 Apr 2024 09:53:35 -0700 Subject: [PATCH] Remove getJavaScriptContextHolder() from BridgelessReactContext (#44124) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44124 This API was introduced as part of Backwards Compat effort recently but now this backwards comptability is supported through BridgelessCatalystInstance. The major OSS usages are through Catalyst Instance and not through Bridgeless React Context which is why deleting this makes sense so that people do not start depending on this. Changelog: [Android][Removed] - Remove getJavaScriptContextHolder() from BridgelessReactContext since now it can be accessed through BridgelessCatalystInstance in Bridgeless mode Reviewed By: RSNara Differential Revision: D56205699 fbshipit-source-id: 175463e17c526359c2e04fec4b2104aea3949d5d --- .../facebook/react/runtime/BridgelessReactContext.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessReactContext.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessReactContext.java index 7af5a365c07561..8026224189b895 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessReactContext.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessReactContext.java @@ -13,7 +13,6 @@ import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.Callback; import com.facebook.react.bridge.CatalystInstance; -import com.facebook.react.bridge.JavaScriptContextHolder; import com.facebook.react.bridge.JavaScriptModule; import com.facebook.react.bridge.JavaScriptModuleRegistry; import com.facebook.react.bridge.NativeArray; @@ -21,8 +20,6 @@ import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.UIManager; import com.facebook.react.bridge.WritableNativeArray; -import com.facebook.react.common.annotations.FrameworkAPI; -import com.facebook.react.common.annotations.UnstableReactNativeAPI; import com.facebook.react.config.ReactFeatureFlags; import com.facebook.react.devsupport.interfaces.DevSupportManager; import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; @@ -157,13 +154,6 @@ public Collection getNativeModules() { return mReactHost.getNativeModule(nativeModuleInterface); } - @Override - @FrameworkAPI - @UnstableReactNativeAPI - public @Nullable JavaScriptContextHolder getJavaScriptContextHolder() { - return mReactHost.getJavaScriptContextHolder(); - } - @Override public void handleException(Exception e) { mReactHost.handleHostException(e);