react-native 0.84.0-nightly-20251106-de5141a3d → 0.84.0-nightly-20251107-f8198f662
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries/Animated/createAnimatedComponent.js +1 -0
- package/Libraries/Blob/RCTBlobManager.mm +1 -4
- package/Libraries/Blob/RCTFileReaderModule.mm +1 -4
- package/Libraries/Components/Button.js +0 -3
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Image/RCTBundleAssetImageLoader.mm +1 -4
- package/Libraries/Image/RCTGIFImageDecoder.mm +1 -4
- package/Libraries/Image/RCTImageEditingManager.mm +1 -4
- package/Libraries/Image/RCTImageLoader.mm +1 -4
- package/Libraries/Image/RCTImageStoreManager.mm +1 -4
- package/Libraries/Image/RCTImageViewManager.mm +1 -4
- package/Libraries/Image/RCTLocalAssetImageLoader.mm +1 -4
- package/Libraries/LinkingIOS/RCTLinkingManager.mm +1 -4
- package/Libraries/NativeAnimation/RCTNativeAnimatedModule.mm +1 -4
- package/Libraries/NativeAnimation/RCTNativeAnimatedTurboModule.mm +1 -4
- package/Libraries/Network/RCTDataRequestHandler.mm +1 -4
- package/Libraries/Network/RCTFileRequestHandler.mm +1 -4
- package/Libraries/Network/RCTHTTPRequestHandler.mm +1 -4
- package/Libraries/Network/RCTNetworking.mm +1 -4
- package/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm +1 -4
- package/Libraries/Settings/RCTSettingsManager.mm +1 -4
- package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +2 -2
- package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +1 -1
- package/Libraries/StyleSheet/PlatformColorValueTypes.js.flow +4 -2
- package/Libraries/Text/BaseText/RCTBaseTextViewManager.mm +1 -4
- package/Libraries/Text/RawText/RCTRawTextViewManager.mm +1 -4
- package/Libraries/Text/Text/RCTTextViewManager.mm +1 -4
- package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputViewManager.mm +1 -4
- package/Libraries/Text/TextInput/RCTBaseTextInputViewManager.mm +1 -4
- package/Libraries/Text/TextInput/RCTInputAccessoryViewManager.mm +1 -4
- package/Libraries/Text/TextInput/Singleline/RCTSinglelineTextInputViewManager.mm +1 -4
- package/Libraries/Text/VirtualText/RCTVirtualTextViewManager.mm +1 -4
- package/Libraries/Vibration/RCTVibration.mm +1 -4
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/RCTAccessibilityManager.mm +1 -4
- package/React/CoreModules/RCTActionSheetManager.mm +1 -4
- package/React/CoreModules/RCTAlertManager.mm +1 -4
- package/React/CoreModules/RCTAppState.mm +1 -4
- package/React/CoreModules/RCTAppearance.mm +1 -4
- package/React/CoreModules/RCTClipboard.mm +1 -4
- package/React/CoreModules/RCTDevLoadingView.mm +1 -4
- package/React/CoreModules/RCTDevMenu.mm +1 -4
- package/React/CoreModules/RCTDevSettings.mm +1 -4
- package/React/CoreModules/RCTDevToolsRuntimeSettingsModule.mm +1 -5
- package/React/CoreModules/RCTDeviceInfo.mm +1 -4
- package/React/CoreModules/RCTEventDispatcher.mm +1 -4
- package/React/CoreModules/RCTExceptionsManager.mm +1 -4
- package/React/CoreModules/RCTI18nManager.mm +1 -4
- package/React/CoreModules/RCTKeyboardObserver.mm +1 -4
- package/React/CoreModules/RCTLogBox.mm +1 -4
- package/React/CoreModules/RCTPerfMonitor.mm +1 -4
- package/React/CoreModules/RCTPlatform.mm +1 -4
- package/React/CoreModules/RCTRedBox.mm +1 -4
- package/React/CoreModules/RCTSourceCode.mm +1 -4
- package/React/CoreModules/RCTStatusBarManager.mm +1 -4
- package/React/CoreModules/RCTTiming.mm +1 -4
- package/React/CoreModules/RCTWebSocketModule.mm +1 -4
- package/React/Modules/RCTUIManager.mm +1 -4
- package/React/Views/RCTActivityIndicatorViewManager.m +1 -4
- package/React/Views/RCTDebuggingOverlayManager.m +1 -4
- package/React/Views/RCTModalHostViewManager.m +1 -4
- package/React/Views/RCTModalManager.m +1 -4
- package/React/Views/RCTSwitchManager.m +1 -4
- package/React/Views/RCTViewManager.m +1 -4
- package/React/Views/RefreshControl/RCTRefreshControlManager.m +1 -4
- package/React/Views/SafeAreaView/RCTSafeAreaViewManager.m +1 -4
- package/React/Views/ScrollView/RCTScrollContentViewManager.m +1 -4
- package/React/Views/ScrollView/RCTScrollViewManager.m +1 -4
- package/ReactAndroid/api/ReactAndroid.api +0 -13
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/ReactPackageTurboModuleManagerDelegate.kt +2 -3
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstanceImpl.java +2 -6
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/ModuleHolder.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/NativeModuleRegistry.kt +1 -16
- package/ReactAndroid/src/main/java/com/facebook/react/internal/turbomodule/core/TurboModuleManager.kt +2 -35
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/VirtualViewContainerStateExperimental.kt +7 -0
- package/ReactAndroid/src/main/jni/react/jni/CatalystInstanceImpl.cpp +3 -13
- package/ReactAndroid/src/main/jni/react/jni/CatalystInstanceImpl.h +1 -4
- package/ReactAndroid/src/main/jni/react/jni/CxxModuleWrapperBase.h +0 -24
- package/ReactAndroid/src/main/jni/react/jni/JavaModuleWrapper.cpp +0 -1
- package/ReactAndroid/src/main/jni/react/jni/ModuleRegistryBuilder.cpp +1 -29
- package/ReactAndroid/src/main/jni/react/jni/ModuleRegistryBuilder.h +1 -2
- package/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp +0 -2
- package/ReactAndroid/src/main/jni/react/runtime/jni/JReactInstance.cpp +2 -1
- package/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/TurboModuleManager.cpp +1 -35
- package/ReactCommon/cxxreact/ReactMarker.cpp +0 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/jsiexecutor/CMakeLists.txt +3 -1
- package/ReactCommon/jsiexecutor/React-jsiexecutor.podspec +2 -0
- package/ReactCommon/jsiexecutor/jsireact/JSIExecutor.cpp +0 -40
- package/ReactCommon/jsiexecutor/jsireact/JSIExecutor.h +1 -6
- package/ReactCommon/jsinspector-modern/ConsoleTask.cpp +27 -0
- package/ReactCommon/jsinspector-modern/ConsoleTask.h +38 -0
- package/ReactCommon/jsinspector-modern/ConsoleTaskContext.cpp +46 -0
- package/ReactCommon/jsinspector-modern/ConsoleTaskContext.h +102 -0
- package/ReactCommon/jsinspector-modern/ConsoleTaskOrchestrator.cpp +55 -0
- package/ReactCommon/jsinspector-modern/ConsoleTaskOrchestrator.h +48 -0
- package/ReactCommon/jsinspector-modern/RuntimeAgent.h +1 -1
- package/ReactCommon/jsinspector-modern/RuntimeTarget.cpp +12 -0
- package/ReactCommon/jsinspector-modern/RuntimeTarget.h +16 -13
- package/ReactCommon/jsinspector-modern/RuntimeTargetConsole.cpp +106 -1
- package/ReactCommon/jsinspector-modern/tests/ConsoleCreateTaskTest.cpp +131 -0
- package/ReactCommon/jsinspector-modern/tests/ReactInstanceIntegrationTest.cpp +1 -0
- package/ReactCommon/jsinspector-modern/tracing/PerformanceTracer.cpp +13 -2
- package/ReactCommon/jsinspector-modern/tracing/PerformanceTracer.h +6 -2
- package/ReactCommon/jsinspector-modern/tracing/TargetTracingAgent.h +5 -0
- package/ReactCommon/jsitooling/react/runtime/JSRuntimeBindings.cpp +54 -0
- package/ReactCommon/jsitooling/react/runtime/JSRuntimeBindings.h +20 -0
- package/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTSampleTurboModule.mm +1 -4
- package/ReactCommon/react/performance/timeline/CMakeLists.txt +1 -0
- package/ReactCommon/react/performance/timeline/PerformanceEntryReporter.cpp +9 -1
- package/ReactCommon/react/performance/timeline/React-performancetimeline.podspec +1 -0
- package/ReactCommon/react/renderer/animated/NativeAnimatedNodesManager.cpp +21 -16
- package/ReactCommon/react/renderer/animated/NativeAnimatedNodesManagerProvider.cpp +9 -5
- package/ReactCommon/react/renderer/animationbackend/AnimationBackend.cpp +67 -32
- package/ReactCommon/react/renderer/animationbackend/AnimationBackend.h +14 -2
- package/ReactCommon/react/renderer/core/EventDispatcher.cpp +1 -1
- package/ReactCommon/react/renderer/core/EventQueueProcessor.cpp +3 -3
- package/ReactCommon/react/runtime/ReactInstance.cpp +8 -6
- package/ReactCommon/react/runtime/ReactInstance.h +0 -1
- package/flow/bom.js.flow +7 -0
- package/package.json +8 -8
- package/scripts/ios-configure-glog.sh +6 -1
- package/types_generated/Libraries/Components/Button.d.ts +1 -4
- package/types_generated/Libraries/StyleSheet/PlatformColorValueTypes.d.ts +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/CxxModuleWrapper.kt +0 -25
- package/ReactAndroid/src/main/java/com/facebook/react/bridge/CxxModuleWrapperBase.kt +0 -61
- package/ReactAndroid/src/main/jni/react/jni/CxxModuleWrapper.h +0 -37
|
@@ -48,10 +48,7 @@ static NSString *interfaceIdiom(UIUserInterfaceIdiom idiom)
|
|
|
48
48
|
ModuleConstants<JS::NativePlatformConstantsIOS::Constants> _constants;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
{
|
|
53
|
-
return @"PlatformConstants";
|
|
54
|
-
}
|
|
51
|
+
RCT_EXPORT_MODULE(PlatformConstants)
|
|
55
52
|
|
|
56
53
|
+ (BOOL)requiresMainQueueSetup
|
|
57
54
|
{
|
|
@@ -480,10 +480,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : (NSCoder *)aDecoder)
|
|
|
480
480
|
@synthesize moduleRegistry = _moduleRegistry;
|
|
481
481
|
@synthesize bundleManager = _bundleManager;
|
|
482
482
|
|
|
483
|
-
|
|
484
|
-
{
|
|
485
|
-
return @"RedBox";
|
|
486
|
-
}
|
|
483
|
+
RCT_EXPORT_MODULE()
|
|
487
484
|
|
|
488
485
|
- (void)registerErrorCustomizer:(id<RCTErrorCustomizer>)errorCustomizer
|
|
489
486
|
{
|
|
@@ -107,10 +107,7 @@ static const NSTimeInterval kIdleCallbackFrameDeadline = 0.001;
|
|
|
107
107
|
@synthesize paused = _paused;
|
|
108
108
|
@synthesize pauseCallback = _pauseCallback;
|
|
109
109
|
|
|
110
|
-
|
|
111
|
-
{
|
|
112
|
-
return @"Timing";
|
|
113
|
-
}
|
|
110
|
+
RCT_EXPORT_MODULE()
|
|
114
111
|
|
|
115
112
|
- (instancetype)initWithDelegate:(id<RCTTimingDelegate>)delegate
|
|
116
113
|
{
|
|
@@ -179,10 +179,7 @@ NSString *const RCTUIManagerWillUpdateViewsDueToContentSizeMultiplierChangeNotif
|
|
|
179
179
|
@synthesize bridge = _bridge;
|
|
180
180
|
@synthesize moduleRegistry = _moduleRegistry;
|
|
181
181
|
|
|
182
|
-
|
|
183
|
-
{
|
|
184
|
-
return @"RCTUIManager";
|
|
185
|
-
}
|
|
182
|
+
RCT_EXPORT_MODULE()
|
|
186
183
|
|
|
187
184
|
+ (BOOL)requiresMainQueueSetup
|
|
188
185
|
{
|
|
@@ -680,19 +680,6 @@ public final class com/facebook/react/bridge/CxxCallbackImpl : com/facebook/jni/
|
|
|
680
680
|
public fun invoke ([Ljava/lang/Object;)V
|
|
681
681
|
}
|
|
682
682
|
|
|
683
|
-
public class com/facebook/react/bridge/CxxModuleWrapper : com/facebook/react/bridge/CxxModuleWrapperBase {
|
|
684
|
-
protected fun <init> (Lcom/facebook/jni/HybridData;)V
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
public class com/facebook/react/bridge/CxxModuleWrapperBase : com/facebook/react/bridge/NativeModule {
|
|
688
|
-
protected fun <init> (Lcom/facebook/jni/HybridData;)V
|
|
689
|
-
public fun canOverrideExistingModule ()Z
|
|
690
|
-
public fun getName ()Ljava/lang/String;
|
|
691
|
-
public fun initialize ()V
|
|
692
|
-
public fun invalidate ()V
|
|
693
|
-
protected final fun resetModule (Lcom/facebook/jni/HybridData;)V
|
|
694
|
-
}
|
|
695
|
-
|
|
696
683
|
public final class com/facebook/react/bridge/DefaultJSExceptionHandler : com/facebook/react/bridge/JSExceptionHandler {
|
|
697
684
|
public fun <init> ()V
|
|
698
685
|
public fun handleException (Ljava/lang/Exception;)V
|
package/ReactAndroid/src/main/java/com/facebook/react/ReactPackageTurboModuleManagerDelegate.kt
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
package com.facebook.react
|
|
9
9
|
|
|
10
10
|
import com.facebook.jni.HybridData
|
|
11
|
-
import com.facebook.react.bridge.CxxModuleWrapper
|
|
12
11
|
import com.facebook.react.bridge.ModuleSpec
|
|
13
12
|
import com.facebook.react.bridge.NativeModule
|
|
14
13
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
@@ -103,7 +102,7 @@ public abstract class ReactPackageTurboModuleManagerDelegate : TurboModuleManage
|
|
|
103
102
|
moduleClass.name,
|
|
104
103
|
reactModule.canOverrideExistingModule,
|
|
105
104
|
true,
|
|
106
|
-
|
|
105
|
+
false,
|
|
107
106
|
ReactModuleInfo.classIsTurboModule(moduleClass),
|
|
108
107
|
)
|
|
109
108
|
else
|
|
@@ -112,7 +111,7 @@ public abstract class ReactPackageTurboModuleManagerDelegate : TurboModuleManage
|
|
|
112
111
|
moduleClass.name,
|
|
113
112
|
module.canOverrideExistingModule(),
|
|
114
113
|
true,
|
|
115
|
-
|
|
114
|
+
false,
|
|
116
115
|
ReactModuleInfo.classIsTurboModule(moduleClass),
|
|
117
116
|
)
|
|
118
117
|
|
|
@@ -157,7 +157,6 @@ public class CatalystInstanceImpl implements CatalystInstance {
|
|
|
157
157
|
mReactQueueConfiguration.getJSQueueThread(),
|
|
158
158
|
mNativeModulesQueueThread,
|
|
159
159
|
mNativeModuleRegistry.getJavaModules(this),
|
|
160
|
-
mNativeModuleRegistry.getCxxModules(),
|
|
161
160
|
mInspectorTarget);
|
|
162
161
|
FLog.d(ReactConstants.TAG, "Initializing React Xplat Bridge after initializeBridge");
|
|
163
162
|
Systrace.endSection(TRACE_TAG_REACT);
|
|
@@ -212,13 +211,11 @@ public class CatalystInstanceImpl implements CatalystInstance {
|
|
|
212
211
|
// Extend the Java-visible registry of modules
|
|
213
212
|
mNativeModuleRegistry.registerModules(modules);
|
|
214
213
|
Collection<JavaModuleWrapper> javaModules = modules.getJavaModules(this);
|
|
215
|
-
Collection<ModuleHolder> cxxModules = modules.getCxxModules();
|
|
216
214
|
// Extend the Cxx-visible registry of modules wrapped in appropriate interfaces
|
|
217
|
-
jniExtendNativeModules(javaModules
|
|
215
|
+
jniExtendNativeModules(javaModules);
|
|
218
216
|
}
|
|
219
217
|
|
|
220
|
-
private native void jniExtendNativeModules(
|
|
221
|
-
Collection<JavaModuleWrapper> javaModules, Collection<ModuleHolder> cxxModules);
|
|
218
|
+
private native void jniExtendNativeModules(Collection<JavaModuleWrapper> javaModules);
|
|
222
219
|
|
|
223
220
|
private native void initializeBridge(
|
|
224
221
|
InstanceCallback callback,
|
|
@@ -226,7 +223,6 @@ public class CatalystInstanceImpl implements CatalystInstance {
|
|
|
226
223
|
MessageQueueThread jsQueue,
|
|
227
224
|
MessageQueueThread moduleQueue,
|
|
228
225
|
Collection<JavaModuleWrapper> javaModules,
|
|
229
|
-
Collection<ModuleHolder> cxxModules,
|
|
230
226
|
@Nullable ReactInstanceManagerInspectorTarget inspectorTarget);
|
|
231
227
|
|
|
232
228
|
@Override
|
|
@@ -60,7 +60,7 @@ public class ModuleHolder {
|
|
|
60
60
|
nativeModule.javaClass.simpleName,
|
|
61
61
|
nativeModule.canOverrideExistingModule(),
|
|
62
62
|
true,
|
|
63
|
-
|
|
63
|
+
false,
|
|
64
64
|
ReactModuleInfo.classIsTurboModule(nativeModule.javaClass),
|
|
65
65
|
)
|
|
66
66
|
|
|
@@ -108,7 +108,7 @@ public class ModuleHolder {
|
|
|
108
108
|
get() = reactModuleInfo.isTurboModule
|
|
109
109
|
|
|
110
110
|
public val isCxxModule: Boolean
|
|
111
|
-
get() =
|
|
111
|
+
get() = false
|
|
112
112
|
|
|
113
113
|
public val className: String
|
|
114
114
|
get() = reactModuleInfo.className
|
|
@@ -36,25 +36,10 @@ public class NativeModuleRegistry(
|
|
|
36
36
|
@JvmName("getJavaModules") // This is needed because this method is accessed by JNI
|
|
37
37
|
internal fun getJavaModules(jsInstance: JSInstance): List<JavaModuleWrapper> = buildList {
|
|
38
38
|
for ((_, value) in modules) {
|
|
39
|
-
|
|
40
|
-
add(JavaModuleWrapper(jsInstance, value))
|
|
41
|
-
}
|
|
39
|
+
add(JavaModuleWrapper(jsInstance, value))
|
|
42
40
|
}
|
|
43
41
|
}
|
|
44
42
|
|
|
45
|
-
@get:JvmName(
|
|
46
|
-
"getCxxModules"
|
|
47
|
-
) // This is needed till there are Java Consumer of this API inside React
|
|
48
|
-
// Native
|
|
49
|
-
internal val cxxModules: List<ModuleHolder>
|
|
50
|
-
get() = buildList {
|
|
51
|
-
for ((_, value) in modules) {
|
|
52
|
-
if (value.isCxxModule) {
|
|
53
|
-
add(value)
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
43
|
/** Adds any new modules to the current module registry */
|
|
59
44
|
@JvmName(
|
|
60
45
|
"registerModules"
|
|
@@ -11,7 +11,6 @@ import androidx.annotation.GuardedBy
|
|
|
11
11
|
import com.facebook.common.logging.FLog
|
|
12
12
|
import com.facebook.jni.HybridData
|
|
13
13
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
14
|
-
import com.facebook.react.bridge.CxxModuleWrapper
|
|
15
14
|
import com.facebook.react.bridge.NativeModule
|
|
16
15
|
import com.facebook.react.bridge.RuntimeExecutor
|
|
17
16
|
import com.facebook.react.common.annotations.FrameworkAPI
|
|
@@ -110,39 +109,7 @@ public class TurboModuleManager(
|
|
|
110
109
|
}
|
|
111
110
|
|
|
112
111
|
val module = getModule(moduleName)
|
|
113
|
-
return if (module !is
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// used from TurboModuleManager.cpp
|
|
117
|
-
@Suppress("unused")
|
|
118
|
-
@DoNotStrip
|
|
119
|
-
private fun getLegacyCxxModule(moduleName: String): CxxModuleWrapper? {
|
|
120
|
-
/*
|
|
121
|
-
* This API is invoked from global.nativeModuleProxy.
|
|
122
|
-
* Only call getModule if the native module is a legacy module.
|
|
123
|
-
*/
|
|
124
|
-
if (!isLegacyModule(moduleName)) {
|
|
125
|
-
return null
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
val module = getModule(moduleName)
|
|
129
|
-
return if (module is CxxModuleWrapper && module !is TurboModule) module else null
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
// used from TurboModuleManager.cpp
|
|
133
|
-
@Suppress("unused")
|
|
134
|
-
@DoNotStrip
|
|
135
|
-
private fun getTurboLegacyCxxModule(moduleName: String): CxxModuleWrapper? {
|
|
136
|
-
/*
|
|
137
|
-
* This API is invoked from global.__turboModuleProxy.
|
|
138
|
-
* Only call getModule if the native module is a turbo module.
|
|
139
|
-
*/
|
|
140
|
-
if (!isTurboModule(moduleName)) {
|
|
141
|
-
return null
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
val module = getModule(moduleName)
|
|
145
|
-
return if (module is CxxModuleWrapper && module is TurboModule) module else null
|
|
112
|
+
return if (module !is TurboModule) module else null
|
|
146
113
|
}
|
|
147
114
|
|
|
148
115
|
// used from TurboModuleManager.cpp
|
|
@@ -158,7 +125,7 @@ public class TurboModuleManager(
|
|
|
158
125
|
}
|
|
159
126
|
|
|
160
127
|
val module = getModule(moduleName)
|
|
161
|
-
return if (module
|
|
128
|
+
return if (module is TurboModule) module else null
|
|
162
129
|
}
|
|
163
130
|
|
|
164
131
|
/**
|
|
@@ -49,6 +49,13 @@ internal class VirtualViewContainerStateExperimental(scrollView: ViewGroup) :
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
override fun remove(virtualView: VirtualView) {
|
|
53
|
+
super.remove(virtualView)
|
|
54
|
+
HPV.remove(virtualView.virtualViewID)
|
|
55
|
+
P.remove(virtualView.virtualViewID)
|
|
56
|
+
V.remove(virtualView.virtualViewID)
|
|
57
|
+
}
|
|
58
|
+
|
|
52
59
|
/**
|
|
53
60
|
* Perform mode update check on a single VirtualView. Does not check other VirtualViews in the
|
|
54
61
|
* collection. Use carefully
|
|
@@ -164,8 +164,6 @@ void CatalystInstanceImpl::initializeBridge(
|
|
|
164
164
|
jni::alias_ref<JavaMessageQueueThread::javaobject> nativeModulesQueue,
|
|
165
165
|
jni::alias_ref<jni::JCollection<JavaModuleWrapper::javaobject>::javaobject>
|
|
166
166
|
javaModules,
|
|
167
|
-
jni::alias_ref<jni::JCollection<ModuleHolder::javaobject>::javaobject>
|
|
168
|
-
cxxModules,
|
|
169
167
|
jni::alias_ref<ReactInstanceManagerInspectorTarget::javaobject>
|
|
170
168
|
inspectorTarget) {
|
|
171
169
|
set_react_native_logfunc(&log);
|
|
@@ -194,10 +192,7 @@ void CatalystInstanceImpl::initializeBridge(
|
|
|
194
192
|
// stack.
|
|
195
193
|
|
|
196
194
|
moduleRegistry_ = std::make_shared<ModuleRegistry>(buildNativeModuleList(
|
|
197
|
-
std::weak_ptr<Instance>(instance_),
|
|
198
|
-
javaModules,
|
|
199
|
-
cxxModules,
|
|
200
|
-
moduleMessageQueue_));
|
|
195
|
+
std::weak_ptr<Instance>(instance_), javaModules, moduleMessageQueue_));
|
|
201
196
|
|
|
202
197
|
instance_->initializeBridge(
|
|
203
198
|
std::make_unique<InstanceCallbackImpl>(callback),
|
|
@@ -211,14 +206,9 @@ void CatalystInstanceImpl::initializeBridge(
|
|
|
211
206
|
|
|
212
207
|
void CatalystInstanceImpl::extendNativeModules(
|
|
213
208
|
jni::alias_ref<jni::JCollection<JavaModuleWrapper::javaobject>::javaobject>
|
|
214
|
-
javaModules
|
|
215
|
-
jni::alias_ref<jni::JCollection<ModuleHolder::javaobject>::javaobject>
|
|
216
|
-
cxxModules) {
|
|
209
|
+
javaModules) {
|
|
217
210
|
moduleRegistry_->registerModules(buildNativeModuleList(
|
|
218
|
-
std::weak_ptr<Instance>(instance_),
|
|
219
|
-
javaModules,
|
|
220
|
-
cxxModules,
|
|
221
|
-
moduleMessageQueue_));
|
|
211
|
+
std::weak_ptr<Instance>(instance_), javaModules, moduleMessageQueue_));
|
|
222
212
|
}
|
|
223
213
|
|
|
224
214
|
void CatalystInstanceImpl::jniSetSourceURL(const std::string& sourceURL) {
|
|
@@ -60,12 +60,9 @@ class [[deprecated("This API will be removed along with the legacy architecture.
|
|
|
60
60
|
jni::alias_ref<JavaMessageQueueThread::javaobject> jsQueue,
|
|
61
61
|
jni::alias_ref<JavaMessageQueueThread::javaobject> nativeModulesQueue,
|
|
62
62
|
jni::alias_ref<jni::JCollection<JavaModuleWrapper::javaobject>::javaobject> javaModules,
|
|
63
|
-
jni::alias_ref<jni::JCollection<ModuleHolder::javaobject>::javaobject> cxxModules,
|
|
64
63
|
jni::alias_ref<ReactInstanceManagerInspectorTarget::javaobject> inspectorTarget);
|
|
65
64
|
|
|
66
|
-
void extendNativeModules(
|
|
67
|
-
jni::alias_ref<jni::JCollection<JavaModuleWrapper::javaobject>::javaobject> javaModules,
|
|
68
|
-
jni::alias_ref<jni::JCollection<ModuleHolder::javaobject>::javaobject> cxxModules);
|
|
65
|
+
void extendNativeModules(jni::alias_ref<jni::JCollection<JavaModuleWrapper::javaobject>::javaobject> javaModules);
|
|
69
66
|
|
|
70
67
|
/**
|
|
71
68
|
* Sets the source URL of the underlying bridge without loading any JS code.
|
|
@@ -7,10 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
9
9
|
|
|
10
|
-
#include <memory>
|
|
11
|
-
#include <string>
|
|
12
|
-
|
|
13
|
-
#include <cxxreact/CxxModule.h>
|
|
14
10
|
#include <fbjni/fbjni.h>
|
|
15
11
|
|
|
16
12
|
namespace facebook::react {
|
|
@@ -19,24 +15,4 @@ struct JNativeModule : jni::JavaClass<JNativeModule> {
|
|
|
19
15
|
constexpr static const char *const kJavaDescriptor = "Lcom/facebook/react/bridge/NativeModule;";
|
|
20
16
|
};
|
|
21
17
|
|
|
22
|
-
/**
|
|
23
|
-
* The C++ part of a CxxModuleWrapper is not a unique class, but it
|
|
24
|
-
* must extend this base class.
|
|
25
|
-
*/
|
|
26
|
-
class CxxModuleWrapperBase : public jni::HybridClass<CxxModuleWrapperBase, JNativeModule> {
|
|
27
|
-
public:
|
|
28
|
-
constexpr static const char *const kJavaDescriptor = "Lcom/facebook/react/bridge/CxxModuleWrapperBase;";
|
|
29
|
-
|
|
30
|
-
static void registerNatives()
|
|
31
|
-
{
|
|
32
|
-
registerHybrid({makeNativeMethod("getName", CxxModuleWrapperBase::getName)});
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// JNI method
|
|
36
|
-
virtual std::string getName() = 0;
|
|
37
|
-
|
|
38
|
-
// Called by ModuleRegistryBuilder
|
|
39
|
-
virtual std::unique_ptr<xplat::module::CxxModule> getModule() = 0;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
18
|
} // namespace facebook::react
|
|
@@ -24,30 +24,13 @@ std::string ModuleHolder::getName() const {
|
|
|
24
24
|
|
|
25
25
|
xplat::module::CxxModule::Provider ModuleHolder::getProvider(
|
|
26
26
|
const std::string& moduleName) const {
|
|
27
|
-
return [self = jni::make_global(self()), moduleName] {
|
|
28
|
-
static auto getModule =
|
|
29
|
-
ModuleHolder::javaClassStatic()->getMethod<JNativeModule::javaobject()>(
|
|
30
|
-
"getModule");
|
|
31
|
-
// This is the call which uses the lazy Java Provider to instantiate the
|
|
32
|
-
// Java CxxModuleWrapper which contains the CxxModule.
|
|
33
|
-
auto module = getModule(self);
|
|
34
|
-
|
|
35
|
-
CHECK(module->isInstanceOf(CxxModuleWrapperBase::javaClassStatic()))
|
|
36
|
-
<< "NativeModule '" << moduleName << "' isn't a C++ module";
|
|
37
|
-
|
|
38
|
-
auto cxxModule =
|
|
39
|
-
jni::static_ref_cast<CxxModuleWrapperBase::javaobject>(module);
|
|
40
|
-
// Then, we grab the CxxModule from the wrapper, which is no longer needed.
|
|
41
|
-
return cxxModule->cthis()->getModule();
|
|
42
|
-
};
|
|
27
|
+
return [self = jni::make_global(self()), moduleName] { return nullptr; };
|
|
43
28
|
}
|
|
44
29
|
|
|
45
30
|
std::vector<std::unique_ptr<NativeModule>> buildNativeModuleList(
|
|
46
31
|
std::weak_ptr<Instance> winstance,
|
|
47
32
|
jni::alias_ref<jni::JCollection<JavaModuleWrapper::javaobject>::javaobject>
|
|
48
33
|
javaModules,
|
|
49
|
-
jni::alias_ref<jni::JCollection<ModuleHolder::javaobject>::javaobject>
|
|
50
|
-
cxxModules,
|
|
51
34
|
std::shared_ptr<MessageQueueThread> moduleMessageQueue) {
|
|
52
35
|
std::vector<std::unique_ptr<NativeModule>> modules;
|
|
53
36
|
if (javaModules) {
|
|
@@ -57,17 +40,6 @@ std::vector<std::unique_ptr<NativeModule>> buildNativeModuleList(
|
|
|
57
40
|
winstance, jm, moduleMessageQueue));
|
|
58
41
|
}
|
|
59
42
|
}
|
|
60
|
-
if (cxxModules) {
|
|
61
|
-
for (const auto& cm : *cxxModules) {
|
|
62
|
-
std::string moduleName = cm->getName();
|
|
63
|
-
modules.emplace_back(
|
|
64
|
-
std::make_unique<CxxNativeModule>(
|
|
65
|
-
winstance,
|
|
66
|
-
moduleName,
|
|
67
|
-
cm->getProvider(moduleName),
|
|
68
|
-
moduleMessageQueue));
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
43
|
return modules;
|
|
72
44
|
}
|
|
73
45
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#include <cxxreact/ModuleRegistry.h>
|
|
12
12
|
#include <fbjni/fbjni.h>
|
|
13
13
|
|
|
14
|
-
#include "
|
|
14
|
+
#include "CxxModuleWrapperBase.h"
|
|
15
15
|
#include "JavaModuleWrapper.h"
|
|
16
16
|
|
|
17
17
|
#ifndef RCT_REMOVE_LEGACY_ARCH
|
|
@@ -33,7 +33,6 @@ class [[deprecated("This API will be removed along with the legacy architecture.
|
|
|
33
33
|
std::vector<std::unique_ptr<NativeModule>> buildNativeModuleList(
|
|
34
34
|
std::weak_ptr<Instance> winstance,
|
|
35
35
|
jni::alias_ref<jni::JCollection<JavaModuleWrapper::javaobject>::javaobject> javaModules,
|
|
36
|
-
jni::alias_ref<jni::JCollection<ModuleHolder::javaobject>::javaobject> cxxModules,
|
|
37
36
|
std::shared_ptr<MessageQueueThread> moduleMessageQueue);
|
|
38
37
|
} // namespace facebook::react
|
|
39
38
|
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
#include <fbjni/fbjni.h>
|
|
12
12
|
|
|
13
13
|
#include "CatalystInstanceImpl.h"
|
|
14
|
-
#include "CxxModuleWrapperBase.h"
|
|
15
14
|
#include "InspectorNetworkRequestListener.h"
|
|
16
15
|
#include "JavaScriptExecutorHolder.h"
|
|
17
16
|
#include "ReactInstanceManagerInspectorTarget.h"
|
|
@@ -42,7 +41,6 @@ extern "C" JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
|
|
|
42
41
|
CatalystInstanceImpl::registerNatives();
|
|
43
42
|
#pragma clang diagnostic pop
|
|
44
43
|
#endif
|
|
45
|
-
CxxModuleWrapperBase::registerNatives();
|
|
46
44
|
ReactInstanceManagerInspectorTarget::registerNatives();
|
|
47
45
|
InspectorNetworkRequestListener::registerNatives();
|
|
48
46
|
});
|
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
#include <glog/logging.h>
|
|
14
14
|
#include <jni.h>
|
|
15
15
|
#include <jsi/jsi.h>
|
|
16
|
-
#include <jsireact/JSIExecutor.h>
|
|
17
16
|
#include <react/jni/JRuntimeExecutor.h>
|
|
18
17
|
#include <react/jni/JSLogging.h>
|
|
19
18
|
#include <react/renderer/runtimescheduler/RuntimeSchedulerCallInvoker.h>
|
|
20
19
|
#include <react/runtime/BridgelessNativeMethodCallInvoker.h>
|
|
20
|
+
#include <react/runtime/JSRuntimeBindings.h>
|
|
21
|
+
|
|
21
22
|
#include "JavaTimerRegistry.h"
|
|
22
23
|
|
|
23
24
|
namespace facebook::react {
|