Skip to content

Commit

Permalink
Remove getRuntimeExecutor() from ReactContext (#44102)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #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
  • Loading branch information
arushikesarwani94 authored and facebook-github-bot committed Apr 17, 2024
1 parent 1d1b40c commit f7b9aaf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
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;
Expand Down Expand Up @@ -212,20 +210,6 @@ public <T extends NativeModule> T getNativeModule(Class<T> nativeModuleInterface
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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
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;
Expand Down Expand Up @@ -158,17 +157,6 @@ public Collection<NativeModule> getNativeModules() {
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
Expand Down

0 comments on commit f7b9aaf

Please sign in to comment.