mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove JSCJavaScriptExecutor/Factory (#41406)
Summary: - `JSCJavaScriptExecutor` & `JSCJavaScriptExecutorFactory` have been deprecated according to https://github.com/facebook/react-native/issues/38594 - `JSCJavaScriptExecutor`'s native implementation is missing - `JSCJavaScriptExecutor` should be bundle into library that contains `JSCJavaScriptExecutorHolder`, e.g. [`V8Executor`](https://github.com/Sunbreak/react-native/blob/0.69-v8/ReactAndroid/src/main/java/io/csie/kudo/reactnative/v8/executor/V8Executor.java) and [`V8ExecutorHolder`](https://github.com/Sunbreak/react-native/blob/0.69-v8/ReactAndroid/src/main/java/com/facebook/v8/executor/OnLoad.cpp) ```mermaid classDiagram class JSCJavaScriptExecutor["JSCJavaScriptExecutor.java"] { -initHybrid()$ } class JSCExecutor["JSCExecutor.java"] { -initHybrid()$ } JSCExecutor <|.. JSCExecutorHolder: Composition class JSCExecutorHolder["JSCExecutorHolder.cpp"] { +initHybrid()$ } class HermesExecutor["HermesExecutor.java"] { -initHybrid()$ } HermesExecutor <|.. HermesExecutorHolder: Composition class HermesExecutorHolder["HermesExecutor.cpp"] { +initHybrid()$ } class ProxyJavaScriptExecutor["ProxyJavaScriptExecutor.java"] { -initHybrid()$ } ProxyJavaScriptExecutor <|.. ProxyJavaScriptExecutorHolder: Composition class ProxyJavaScriptExecutorHolder["ProxyJavaScriptExecutorHolder.cpp"] { +initHybrid()$ } ``` Remove JSCJavaScriptExecutor/Factory ## Changelog: [ANDROID] [REMOVED] - Remove JSCJavaScriptExecutor/Factory Pull Request resolved: https://github.com/facebook/react-native/pull/41406 Test Plan: None Reviewed By: christophpurrer Differential Revision: D51198037 Pulled By: javache fbshipit-source-id: 73f335f76adfe644bef1ee37e8ec474625d37e0d
This commit is contained in:
committed by
Facebook GitHub Bot
parent
99ebcfd3a9
commit
d7fd83ed5d
-31
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.bridge;
|
||||
|
||||
import com.facebook.jni.HybridData;
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
|
||||
/** @deprecated use {@link com.facebook.react.jscexecutor.JSCExecutor} instead. */
|
||||
@DoNotStrip
|
||||
@Deprecated
|
||||
/* package */ class JSCJavaScriptExecutor extends JavaScriptExecutor {
|
||||
static {
|
||||
ReactBridge.staticInit();
|
||||
}
|
||||
|
||||
/* package */ JSCJavaScriptExecutor(ReadableNativeMap jscConfig) {
|
||||
super(initHybrid(jscConfig));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "JSCJavaScriptExecutor";
|
||||
}
|
||||
|
||||
private static native HybridData initHybrid(ReadableNativeMap jscConfig);
|
||||
}
|
||||
-46
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.bridge;
|
||||
|
||||
/** @deprecated use {@link com.facebook.react.jscexecutor.JSCExecutorFactory} instead. */
|
||||
@Deprecated
|
||||
class JSCJavaScriptExecutorFactory implements JavaScriptExecutorFactory {
|
||||
private final String mAppName;
|
||||
private final String mDeviceName;
|
||||
|
||||
public JSCJavaScriptExecutorFactory(String appName, String deviceName) {
|
||||
this.mAppName = appName;
|
||||
this.mDeviceName = deviceName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JavaScriptExecutor create() throws Exception {
|
||||
WritableNativeMap jscConfig = new WritableNativeMap();
|
||||
jscConfig.putString("OwnerIdentity", "ReactNative");
|
||||
jscConfig.putString("AppIdentity", mAppName);
|
||||
jscConfig.putString("DeviceIdentity", mDeviceName);
|
||||
return new JSCJavaScriptExecutor(jscConfig);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startSamplingProfiler() {
|
||||
throw new UnsupportedOperationException(
|
||||
"Starting sampling profiler not supported on " + toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stopSamplingProfiler(String filename) {
|
||||
throw new UnsupportedOperationException(
|
||||
"Stopping sampling profiler not supported on " + toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "JSCExecutor";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user