mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Delete JS TurboModule Codegen Gating
Summary: Changelog: [Internal] Reviewed By: fkgozali Differential Revision: D25915171 fbshipit-source-id: b59e21f834a7172055e180eddb9bf15737a6cf0f
This commit is contained in:
committed by
Facebook GitHub Bot
parent
8ed6659907
commit
a156ee9b73
@@ -26,9 +26,6 @@ public class ReactFeatureFlags {
|
||||
/** Should we dispatch TurboModule methods with promise returns to the NativeModules thread? */
|
||||
public static volatile boolean enableTurboModulePromiseAsyncDispatch = false;
|
||||
|
||||
/** Enable TurboModule JS Codegen. */
|
||||
public static volatile boolean useTurboModuleJSCodegen = false;
|
||||
|
||||
/*
|
||||
* This feature flag enables logs for Fabric
|
||||
*/
|
||||
|
||||
+2
-4
@@ -60,8 +60,7 @@ public class TurboModuleManager implements JSIModule, TurboModuleRegistry {
|
||||
runtimeExecutor,
|
||||
(CallInvokerHolderImpl) jsCallInvokerHolder,
|
||||
(CallInvokerHolderImpl) nativeCallInvokerHolder,
|
||||
delegate,
|
||||
ReactFeatureFlags.useTurboModuleJSCodegen);
|
||||
delegate);
|
||||
installJSIBindings();
|
||||
|
||||
mEagerInitModuleNames =
|
||||
@@ -293,8 +292,7 @@ public class TurboModuleManager implements JSIModule, TurboModuleRegistry {
|
||||
RuntimeExecutor runtimeExecutor,
|
||||
CallInvokerHolderImpl jsCallInvokerHolder,
|
||||
CallInvokerHolderImpl nativeCallInvokerHolder,
|
||||
TurboModuleManagerDelegate tmmDelegate,
|
||||
boolean enableTurboModuleJSCodegen);
|
||||
TurboModuleManagerDelegate tmmDelegate);
|
||||
|
||||
private native void installJSIBindings();
|
||||
|
||||
|
||||
+6
-12
@@ -26,23 +26,20 @@ TurboModuleManager::TurboModuleManager(
|
||||
RuntimeExecutor runtimeExecutor,
|
||||
std::shared_ptr<CallInvoker> jsCallInvoker,
|
||||
std::shared_ptr<CallInvoker> nativeCallInvoker,
|
||||
jni::alias_ref<TurboModuleManagerDelegate::javaobject> delegate,
|
||||
bool enableJSCodegen)
|
||||
jni::alias_ref<TurboModuleManagerDelegate::javaobject> delegate)
|
||||
: javaPart_(jni::make_global(jThis)),
|
||||
runtimeExecutor_(runtimeExecutor),
|
||||
jsCallInvoker_(jsCallInvoker),
|
||||
nativeCallInvoker_(nativeCallInvoker),
|
||||
delegate_(jni::make_global(delegate)),
|
||||
turboModuleCache_(std::make_shared<TurboModuleCache>()),
|
||||
enableJSCodegen_(enableJSCodegen) {}
|
||||
turboModuleCache_(std::make_shared<TurboModuleCache>()) {}
|
||||
|
||||
jni::local_ref<TurboModuleManager::jhybriddata> TurboModuleManager::initHybrid(
|
||||
jni::alias_ref<jhybridobject> jThis,
|
||||
jni::alias_ref<JRuntimeExecutor::javaobject> runtimeExecutor,
|
||||
jni::alias_ref<CallInvokerHolder::javaobject> jsCallInvokerHolder,
|
||||
jni::alias_ref<CallInvokerHolder::javaobject> nativeCallInvokerHolder,
|
||||
jni::alias_ref<TurboModuleManagerDelegate::javaobject> delegate,
|
||||
bool enableJSCodegen) {
|
||||
jni::alias_ref<TurboModuleManagerDelegate::javaobject> delegate) {
|
||||
auto jsCallInvoker = jsCallInvokerHolder->cthis()->getCallInvoker();
|
||||
auto nativeCallInvoker = nativeCallInvokerHolder->cthis()->getCallInvoker();
|
||||
|
||||
@@ -51,8 +48,7 @@ jni::local_ref<TurboModuleManager::jhybriddata> TurboModuleManager::initHybrid(
|
||||
runtimeExecutor->cthis()->get(),
|
||||
jsCallInvoker,
|
||||
nativeCallInvoker,
|
||||
delegate,
|
||||
enableJSCodegen);
|
||||
delegate);
|
||||
}
|
||||
|
||||
void TurboModuleManager::registerNatives() {
|
||||
@@ -74,8 +70,7 @@ void TurboModuleManager::installJSIBindings() {
|
||||
jsCallInvoker_ = std::weak_ptr<CallInvoker>(jsCallInvoker_),
|
||||
nativeCallInvoker_ = std::weak_ptr<CallInvoker>(nativeCallInvoker_),
|
||||
delegate_ = jni::make_weak(delegate_),
|
||||
javaPart_ = jni::make_weak(javaPart_)](
|
||||
const std::string &name) -> std::shared_ptr<TurboModule> {
|
||||
javaPart_ = jni::make_weak(javaPart_)](const std::string &name) -> std::shared_ptr<TurboModule> {
|
||||
auto turboModuleCache = turboModuleCache_.lock();
|
||||
auto jsCallInvoker = jsCallInvoker_.lock();
|
||||
auto nativeCallInvoker = nativeCallInvoker_.lock();
|
||||
@@ -146,8 +141,7 @@ void TurboModuleManager::installJSIBindings() {
|
||||
return nullptr;
|
||||
};
|
||||
|
||||
TurboModuleBinding::install(
|
||||
runtime, std::move(turboModuleProvider), enableJSCodegen_);
|
||||
TurboModuleBinding::install(runtime, std::move(turboModuleProvider));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+2
-5
@@ -32,8 +32,7 @@ class TurboModuleManager : public jni::HybridClass<TurboModuleManager> {
|
||||
jni::alias_ref<JRuntimeExecutor::javaobject> runtimeExecutor,
|
||||
jni::alias_ref<CallInvokerHolder::javaobject> jsCallInvokerHolder,
|
||||
jni::alias_ref<CallInvokerHolder::javaobject> nativeCallInvokerHolder,
|
||||
jni::alias_ref<TurboModuleManagerDelegate::javaobject> delegate,
|
||||
bool enableJSCodegen);
|
||||
jni::alias_ref<TurboModuleManagerDelegate::javaobject> delegate);
|
||||
static void registerNatives();
|
||||
|
||||
private:
|
||||
@@ -54,7 +53,6 @@ class TurboModuleManager : public jni::HybridClass<TurboModuleManager> {
|
||||
* they want to be long-lived or short-lived.
|
||||
*/
|
||||
std::shared_ptr<TurboModuleCache> turboModuleCache_;
|
||||
bool enableJSCodegen_;
|
||||
|
||||
void installJSIBindings();
|
||||
explicit TurboModuleManager(
|
||||
@@ -62,8 +60,7 @@ class TurboModuleManager : public jni::HybridClass<TurboModuleManager> {
|
||||
RuntimeExecutor runtimeExecutor,
|
||||
std::shared_ptr<CallInvoker> jsCallInvoker,
|
||||
std::shared_ptr<CallInvoker> nativeCallInvoker,
|
||||
jni::alias_ref<TurboModuleManagerDelegate::javaobject> delegate,
|
||||
bool enableJSCodegen);
|
||||
jni::alias_ref<TurboModuleManagerDelegate::javaobject> delegate);
|
||||
};
|
||||
|
||||
} // namespace react
|
||||
|
||||
Reference in New Issue
Block a user