mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove getRuntimeExecutor() from ReactContext (#44102)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44102 Remove `getRuntimeExecutor()` from ReactContext since now it can be accessed through BridgelessCatalystInstance.getRuntimeExecutor() directly Changelog: [Android][Removed] - Remove getRuntimeExecutor() from ReactContext since now it can be accessed through BridgelessCatalystInstance in Bridgeless mode Reviewed By: RSNara Differential Revision: D56151365 fbshipit-source-id: 42bb6a6a3d729339cfb83ffdd3f7cbec314b687a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
1d1b40cbbe
commit
f7b9aafd10
-16
@@ -27,8 +27,6 @@ import com.facebook.react.bridge.queue.ReactQueueConfiguration;
|
||||
import com.facebook.react.common.LifecycleState;
|
||||
import com.facebook.react.common.ReactConstants;
|
||||
import com.facebook.react.common.annotations.DeprecatedInNewArchitecture;
|
||||
import com.facebook.react.common.annotations.FrameworkAPI;
|
||||
import com.facebook.react.common.annotations.UnstableReactNativeAPI;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.Collection;
|
||||
import java.util.concurrent.CopyOnWriteArraySet;
|
||||
@@ -212,20 +210,6 @@ public abstract class ReactContext extends ContextWrapper {
|
||||
return mCatalystInstance.getNativeModule(nativeModuleInterface);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the RuntimeExecutor, a thread-safe handler for accessing the runtime.
|
||||
* @experimental
|
||||
*/
|
||||
@Nullable
|
||||
@FrameworkAPI
|
||||
@UnstableReactNativeAPI
|
||||
public RuntimeExecutor getRuntimeExecutor() {
|
||||
if (mCatalystInstance == null) {
|
||||
raiseCatalystInstanceMissingException();
|
||||
}
|
||||
return mCatalystInstance.getRuntimeExecutor();
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls RCTDeviceEventEmitter.emit to JavaScript, with given event name and an optional list of
|
||||
* arguments.
|
||||
|
||||
-12
@@ -19,7 +19,6 @@ import com.facebook.react.bridge.JavaScriptModuleRegistry;
|
||||
import com.facebook.react.bridge.NativeArray;
|
||||
import com.facebook.react.bridge.NativeModule;
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
import com.facebook.react.bridge.RuntimeExecutor;
|
||||
import com.facebook.react.bridge.UIManager;
|
||||
import com.facebook.react.bridge.WritableNativeArray;
|
||||
import com.facebook.react.common.annotations.FrameworkAPI;
|
||||
@@ -158,17 +157,6 @@ class BridgelessReactContext extends ReactApplicationContext implements EventDis
|
||||
return mReactHost.getNativeModule(nativeModuleInterface);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the RuntimeExecutor, a thread-safe handler for accessing the runtime. If the runtime is
|
||||
* not initialized yet, it will return null.
|
||||
*/
|
||||
@Override
|
||||
@FrameworkAPI
|
||||
@UnstableReactNativeAPI
|
||||
public @Nullable RuntimeExecutor getRuntimeExecutor() {
|
||||
return mReactHost.getRuntimeExecutor();
|
||||
}
|
||||
|
||||
@Override
|
||||
@FrameworkAPI
|
||||
@UnstableReactNativeAPI
|
||||
|
||||
Reference in New Issue
Block a user