mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove unreferenced JSEngineResolutionAlgorithm from ReactHost API (#45269)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/45269 There's no callers to this property, and we already create a `jsRuntimeFactory` above in DefaultReactHost, which will actually decide which VM to use. Changelog: [Android][Removed] Unused jsEngineResolutionAlgorithm from ReactHost Reviewed By: cortinico Differential Revision: D59333435 fbshipit-source-id: 21be4d138bca64c0cb78de366bf2e247b4f37650
This commit is contained in:
committed by
Facebook GitHub Bot
parent
bf11d1efcd
commit
f1b6218608
@@ -216,7 +216,6 @@ public abstract interface class com/facebook/react/ReactHost {
|
||||
public abstract fun destroy (Ljava/lang/String;Ljava/lang/Exception;)Lcom/facebook/react/interfaces/TaskInterface;
|
||||
public abstract fun getCurrentReactContext ()Lcom/facebook/react/bridge/ReactContext;
|
||||
public abstract fun getDevSupportManager ()Lcom/facebook/react/devsupport/interfaces/DevSupportManager;
|
||||
public abstract fun getJsEngineResolutionAlgorithm ()Lcom/facebook/react/JSEngineResolutionAlgorithm;
|
||||
public abstract fun getLifecycleState ()Lcom/facebook/react/common/LifecycleState;
|
||||
public abstract fun getMemoryPressureRouter ()Lcom/facebook/react/MemoryPressureRouter;
|
||||
public abstract fun getReactQueueConfiguration ()Lcom/facebook/react/bridge/queue/ReactQueueConfiguration;
|
||||
@@ -236,7 +235,6 @@ public abstract interface class com/facebook/react/ReactHost {
|
||||
public abstract fun reload (Ljava/lang/String;)Lcom/facebook/react/interfaces/TaskInterface;
|
||||
public abstract fun removeBeforeDestroyListener (Lkotlin/jvm/functions/Function0;)V
|
||||
public abstract fun removeReactInstanceEventListener (Lcom/facebook/react/ReactInstanceEventListener;)V
|
||||
public abstract fun setJsEngineResolutionAlgorithm (Lcom/facebook/react/JSEngineResolutionAlgorithm;)V
|
||||
public abstract fun start ()Lcom/facebook/react/interfaces/TaskInterface;
|
||||
}
|
||||
|
||||
@@ -3795,7 +3793,6 @@ public class com/facebook/react/runtime/ReactHostImpl : com/facebook/react/React
|
||||
public fun destroy (Ljava/lang/String;Ljava/lang/Exception;)Lcom/facebook/react/interfaces/TaskInterface;
|
||||
public fun getCurrentReactContext ()Lcom/facebook/react/bridge/ReactContext;
|
||||
public fun getDevSupportManager ()Lcom/facebook/react/devsupport/interfaces/DevSupportManager;
|
||||
public fun getJsEngineResolutionAlgorithm ()Lcom/facebook/react/JSEngineResolutionAlgorithm;
|
||||
public fun getLifecycleState ()Lcom/facebook/react/common/LifecycleState;
|
||||
public fun getMemoryPressureRouter ()Lcom/facebook/react/MemoryPressureRouter;
|
||||
public fun getReactQueueConfiguration ()Lcom/facebook/react/bridge/queue/ReactQueueConfiguration;
|
||||
@@ -3815,7 +3812,6 @@ public class com/facebook/react/runtime/ReactHostImpl : com/facebook/react/React
|
||||
public fun reload (Ljava/lang/String;)Lcom/facebook/react/interfaces/TaskInterface;
|
||||
public fun removeBeforeDestroyListener (Lkotlin/jvm/functions/Function0;)V
|
||||
public fun removeReactInstanceEventListener (Lcom/facebook/react/ReactInstanceEventListener;)V
|
||||
public fun setJsEngineResolutionAlgorithm (Lcom/facebook/react/JSEngineResolutionAlgorithm;)V
|
||||
public fun start ()Lcom/facebook/react/interfaces/TaskInterface;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,9 +45,6 @@ public interface ReactHost {
|
||||
/** [ReactQueueConfiguration] for caller to post jobs in React Native threads */
|
||||
public val reactQueueConfiguration: ReactQueueConfiguration?
|
||||
|
||||
/** [JSEngineResolutionAlgorithm] used by this host. */
|
||||
public var jsEngineResolutionAlgorithm: JSEngineResolutionAlgorithm?
|
||||
|
||||
/** Routes memory pressure events to interested components */
|
||||
public val memoryPressureRouter: MemoryPressureRouter
|
||||
|
||||
|
||||
+6
-15
@@ -8,7 +8,6 @@
|
||||
package com.facebook.react.defaults
|
||||
|
||||
import android.content.Context
|
||||
import com.facebook.react.JSEngineResolutionAlgorithm
|
||||
import com.facebook.react.ReactHost
|
||||
import com.facebook.react.ReactNativeHost
|
||||
import com.facebook.react.ReactPackage
|
||||
@@ -87,20 +86,12 @@ public object DefaultReactHost {
|
||||
// TODO: T164788699 find alternative of accessing ReactHostImpl for initialising reactHost
|
||||
reactHost =
|
||||
ReactHostImpl(
|
||||
context,
|
||||
defaultReactHostDelegate,
|
||||
componentFactory,
|
||||
true /* allowPackagerServerAccess */,
|
||||
useDevSupport,
|
||||
)
|
||||
.apply {
|
||||
jsEngineResolutionAlgorithm =
|
||||
if (isHermesEnabled) {
|
||||
JSEngineResolutionAlgorithm.HERMES
|
||||
} else {
|
||||
JSEngineResolutionAlgorithm.JSC
|
||||
}
|
||||
}
|
||||
context,
|
||||
defaultReactHostDelegate,
|
||||
componentFactory,
|
||||
true /* allowPackagerServerAccess */,
|
||||
useDevSupport,
|
||||
)
|
||||
}
|
||||
return reactHost as ReactHost
|
||||
}
|
||||
|
||||
-12
@@ -1708,18 +1708,6 @@ public class ReactHostImpl implements ReactHost {
|
||||
return mDestroyTask;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public JSEngineResolutionAlgorithm getJsEngineResolutionAlgorithm() {
|
||||
return mJSEngineResolutionAlgorithm;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setJsEngineResolutionAlgorithm(
|
||||
@Nullable JSEngineResolutionAlgorithm jsEngineResolutionAlgorithm) {
|
||||
mJSEngineResolutionAlgorithm = jsEngineResolutionAlgorithm;
|
||||
}
|
||||
|
||||
private @Nullable ReactHostInspectorTarget getOrCreateReactHostInspectorTarget() {
|
||||
if (mReactHostInspectorTarget == null && InspectorFlags.getFuseboxEnabled()) {
|
||||
// NOTE: ReactHostInspectorTarget only retains a weak reference to `this`.
|
||||
|
||||
Reference in New Issue
Block a user