react-native 0.84.0-nightly-20251106-de5141a3d → 0.84.0-nightly-20251108-7486a2bc5
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/RCTBlobPlugins.mm +14 -14
- 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/RCTImagePlugins.h +1 -0
- package/Libraries/Image/RCTImagePlugins.mm +30 -17
- 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/LinkingIOS/RCTLinkingPlugins.mm +10 -13
- package/Libraries/LogBox/Data/LogBoxData.js +31 -4
- package/Libraries/NativeAnimation/RCTAnimationPlugins.mm +14 -14
- 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/RCTNetworkPlugins.mm +22 -16
- package/Libraries/Network/RCTNetworking.mm +1 -4
- package/Libraries/PushNotificationIOS/RCTPushNotificationManager.mm +1 -4
- package/Libraries/PushNotificationIOS/RCTPushNotificationPlugins.mm +10 -13
- package/Libraries/Settings/RCTSettingsManager.mm +1 -4
- package/Libraries/Settings/RCTSettingsPlugins.mm +10 -13
- 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/Libraries/Vibration/RCTVibrationPlugins.mm +10 -13
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/CoreModulesPlugins.mm +98 -35
- 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/FBReactNativeSpec/FBReactNativeSpecJSI.h +16 -0
- 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/fabric/FabricUIManager.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +13 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +21 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +5 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +5 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +23 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +5 -1
- 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/uimanager/BaseViewManager.java +4 -5
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/VirtualViewContainerStateExperimental.kt +7 -0
- package/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.cpp +12 -0
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +29 -1
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +7 -1
- 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/JReactHostInspectorTarget.cpp +8 -1
- 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/ReactAndroid/src/main/jni/third-party/folly/CMakeLists.txt +1 -0
- package/ReactApple/RCTAnimatedModuleProvider/RCTAnimatedModuleProvider.mm +29 -4
- 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/HostTarget.h +8 -2
- package/ReactCommon/jsinspector-modern/HostTargetTraceRecording.cpp +6 -2
- package/ReactCommon/jsinspector-modern/HostTargetTraceRecording.h +15 -5
- package/ReactCommon/jsinspector-modern/HostTargetTracing.cpp +9 -5
- package/ReactCommon/jsinspector-modern/RuntimeAgent.cpp +3 -2
- 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/TracingAgent.cpp +19 -2
- package/ReactCommon/jsinspector-modern/tests/ConsoleCreateTaskTest.cpp +131 -0
- package/ReactCommon/jsinspector-modern/tests/ReactInstanceIntegrationTest.cpp +1 -0
- package/ReactCommon/jsinspector-modern/tests/TracingTest.cpp +59 -0
- package/ReactCommon/jsinspector-modern/tests/TracingTest.h +20 -7
- package/ReactCommon/jsinspector-modern/tracing/PerformanceTracer.cpp +32 -20
- package/ReactCommon/jsinspector-modern/tracing/PerformanceTracer.h +6 -2
- package/ReactCommon/jsinspector-modern/tracing/TargetTracingAgent.h +5 -0
- package/ReactCommon/jsinspector-modern/tracing/TraceEvent.h +2 -1
- package/ReactCommon/jsinspector-modern/tracing/TraceEventSerializer.cpp +2 -1
- package/ReactCommon/jsinspector-modern/tracing/TraceRecordingState.h +3 -0
- package/ReactCommon/jsinspector-modern/tracing/TracingCategory.h +126 -0
- package/ReactCommon/jsitooling/react/runtime/JSRuntimeBindings.cpp +54 -0
- package/ReactCommon/jsitooling/react/runtime/JSRuntimeBindings.h +20 -0
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +9 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +11 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +113 -77
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +6 -2
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +9 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +19 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +3 -1
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.mm +0 -1
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +11 -1
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +5 -1
- 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 +24 -19
- package/ReactCommon/react/renderer/animated/NativeAnimatedNodesManagerProvider.cpp +11 -6
- 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/ReactCommon/react/runtime/TimerManager.cpp +0 -54
- package/ReactCommon/react/runtime/TimerManager.h +0 -12
- package/flow/bom.js.flow +7 -0
- package/package.json +8 -8
- package/scripts/ios-configure-glog.sh +6 -1
- package/src/private/featureflags/ReactNativeFeatureFlags.js +11 -1
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +3 -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
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<4e1bcac109eecdaf11c62ce8c367b20d>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -38,10 +38,12 @@ class ReactNativeFeatureFlagsAccessor {
|
|
|
38
38
|
bool cxxNativeAnimatedRemoveJsSync();
|
|
39
39
|
bool disableEarlyViewCommandExecution();
|
|
40
40
|
bool disableFabricCommitInCXXAnimated();
|
|
41
|
+
bool disableImageViewPreallocationAndroid();
|
|
41
42
|
bool disableMountItemReorderingAndroid();
|
|
42
43
|
bool disableOldAndroidAttachmentMetricsWorkarounds();
|
|
43
44
|
bool disableSubviewClippingAndroid();
|
|
44
45
|
bool disableTextLayoutManagerCacheAndroid();
|
|
46
|
+
bool disableViewPreallocationAndroid();
|
|
45
47
|
bool enableAccessibilityOrder();
|
|
46
48
|
bool enableAccumulatedUpdatesInRawPropsAndroid();
|
|
47
49
|
bool enableAndroidLinearText();
|
|
@@ -125,7 +127,7 @@ class ReactNativeFeatureFlagsAccessor {
|
|
|
125
127
|
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
|
|
126
128
|
bool wasOverridden_;
|
|
127
129
|
|
|
128
|
-
std::array<std::atomic<const char*>,
|
|
130
|
+
std::array<std::atomic<const char*>, 84> accessedFeatureFlags_;
|
|
129
131
|
|
|
130
132
|
std::atomic<std::optional<bool>> commonTestFlag_;
|
|
131
133
|
std::atomic<std::optional<bool>> cdpInteractionMetricsEnabled_;
|
|
@@ -133,10 +135,12 @@ class ReactNativeFeatureFlagsAccessor {
|
|
|
133
135
|
std::atomic<std::optional<bool>> cxxNativeAnimatedRemoveJsSync_;
|
|
134
136
|
std::atomic<std::optional<bool>> disableEarlyViewCommandExecution_;
|
|
135
137
|
std::atomic<std::optional<bool>> disableFabricCommitInCXXAnimated_;
|
|
138
|
+
std::atomic<std::optional<bool>> disableImageViewPreallocationAndroid_;
|
|
136
139
|
std::atomic<std::optional<bool>> disableMountItemReorderingAndroid_;
|
|
137
140
|
std::atomic<std::optional<bool>> disableOldAndroidAttachmentMetricsWorkarounds_;
|
|
138
141
|
std::atomic<std::optional<bool>> disableSubviewClippingAndroid_;
|
|
139
142
|
std::atomic<std::optional<bool>> disableTextLayoutManagerCacheAndroid_;
|
|
143
|
+
std::atomic<std::optional<bool>> disableViewPreallocationAndroid_;
|
|
140
144
|
std::atomic<std::optional<bool>> enableAccessibilityOrder_;
|
|
141
145
|
std::atomic<std::optional<bool>> enableAccumulatedUpdatesInRawPropsAndroid_;
|
|
142
146
|
std::atomic<std::optional<bool>> enableAndroidLinearText_;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<cce007ecab09ff43ec931cb259542ed9>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -51,6 +51,10 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
|
|
51
51
|
return false;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
bool disableImageViewPreallocationAndroid() override {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
|
|
54
58
|
bool disableMountItemReorderingAndroid() override {
|
|
55
59
|
return false;
|
|
56
60
|
}
|
|
@@ -67,6 +71,10 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
|
|
67
71
|
return false;
|
|
68
72
|
}
|
|
69
73
|
|
|
74
|
+
bool disableViewPreallocationAndroid() override {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
|
|
70
78
|
bool enableAccessibilityOrder() override {
|
|
71
79
|
return false;
|
|
72
80
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<c1ffba92f08189da8b2a2726cd490afc>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -99,6 +99,15 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
|
|
|
99
99
|
return ReactNativeFeatureFlagsDefaults::disableFabricCommitInCXXAnimated();
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
+
bool disableImageViewPreallocationAndroid() override {
|
|
103
|
+
auto value = values_["disableImageViewPreallocationAndroid"];
|
|
104
|
+
if (!value.isNull()) {
|
|
105
|
+
return value.getBool();
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
return ReactNativeFeatureFlagsDefaults::disableImageViewPreallocationAndroid();
|
|
109
|
+
}
|
|
110
|
+
|
|
102
111
|
bool disableMountItemReorderingAndroid() override {
|
|
103
112
|
auto value = values_["disableMountItemReorderingAndroid"];
|
|
104
113
|
if (!value.isNull()) {
|
|
@@ -135,6 +144,15 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
|
|
|
135
144
|
return ReactNativeFeatureFlagsDefaults::disableTextLayoutManagerCacheAndroid();
|
|
136
145
|
}
|
|
137
146
|
|
|
147
|
+
bool disableViewPreallocationAndroid() override {
|
|
148
|
+
auto value = values_["disableViewPreallocationAndroid"];
|
|
149
|
+
if (!value.isNull()) {
|
|
150
|
+
return value.getBool();
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return ReactNativeFeatureFlagsDefaults::disableViewPreallocationAndroid();
|
|
154
|
+
}
|
|
155
|
+
|
|
138
156
|
bool enableAccessibilityOrder() override {
|
|
139
157
|
auto value = values_["enableAccessibilityOrder"];
|
|
140
158
|
if (!value.isNull()) {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<724a7046fefc47616249d6fac8367615>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -31,10 +31,12 @@ class ReactNativeFeatureFlagsProvider {
|
|
|
31
31
|
virtual bool cxxNativeAnimatedRemoveJsSync() = 0;
|
|
32
32
|
virtual bool disableEarlyViewCommandExecution() = 0;
|
|
33
33
|
virtual bool disableFabricCommitInCXXAnimated() = 0;
|
|
34
|
+
virtual bool disableImageViewPreallocationAndroid() = 0;
|
|
34
35
|
virtual bool disableMountItemReorderingAndroid() = 0;
|
|
35
36
|
virtual bool disableOldAndroidAttachmentMetricsWorkarounds() = 0;
|
|
36
37
|
virtual bool disableSubviewClippingAndroid() = 0;
|
|
37
38
|
virtual bool disableTextLayoutManagerCacheAndroid() = 0;
|
|
39
|
+
virtual bool disableViewPreallocationAndroid() = 0;
|
|
38
40
|
virtual bool enableAccessibilityOrder() = 0;
|
|
39
41
|
virtual bool enableAccumulatedUpdatesInRawPropsAndroid() = 0;
|
|
40
42
|
virtual bool enableAndroidLinearText() = 0;
|
package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.mm
CHANGED
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
#import <ReactCommon/CxxTurboModuleUtils.h>
|
|
31
31
|
#import <ReactCommon/RCTTurboModuleWithJSIBindings.h>
|
|
32
32
|
#import <ReactCommon/TurboModulePerfLogger.h>
|
|
33
|
-
#import <react/featureflags/ReactNativeFeatureFlags.h>
|
|
34
33
|
|
|
35
34
|
using namespace facebook;
|
|
36
35
|
using namespace facebook::react;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<19cc3c19f4e6115556fa29320ab47ff2>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -74,6 +74,11 @@ bool NativeReactNativeFeatureFlags::disableFabricCommitInCXXAnimated(
|
|
|
74
74
|
return ReactNativeFeatureFlags::disableFabricCommitInCXXAnimated();
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
bool NativeReactNativeFeatureFlags::disableImageViewPreallocationAndroid(
|
|
78
|
+
jsi::Runtime& /*runtime*/) {
|
|
79
|
+
return ReactNativeFeatureFlags::disableImageViewPreallocationAndroid();
|
|
80
|
+
}
|
|
81
|
+
|
|
77
82
|
bool NativeReactNativeFeatureFlags::disableMountItemReorderingAndroid(
|
|
78
83
|
jsi::Runtime& /*runtime*/) {
|
|
79
84
|
return ReactNativeFeatureFlags::disableMountItemReorderingAndroid();
|
|
@@ -94,6 +99,11 @@ bool NativeReactNativeFeatureFlags::disableTextLayoutManagerCacheAndroid(
|
|
|
94
99
|
return ReactNativeFeatureFlags::disableTextLayoutManagerCacheAndroid();
|
|
95
100
|
}
|
|
96
101
|
|
|
102
|
+
bool NativeReactNativeFeatureFlags::disableViewPreallocationAndroid(
|
|
103
|
+
jsi::Runtime& /*runtime*/) {
|
|
104
|
+
return ReactNativeFeatureFlags::disableViewPreallocationAndroid();
|
|
105
|
+
}
|
|
106
|
+
|
|
97
107
|
bool NativeReactNativeFeatureFlags::enableAccessibilityOrder(
|
|
98
108
|
jsi::Runtime& /*runtime*/) {
|
|
99
109
|
return ReactNativeFeatureFlags::enableAccessibilityOrder();
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<65a06880aea8299c68e57e5b48a2fed8>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -48,6 +48,8 @@ class NativeReactNativeFeatureFlags
|
|
|
48
48
|
|
|
49
49
|
bool disableFabricCommitInCXXAnimated(jsi::Runtime& runtime);
|
|
50
50
|
|
|
51
|
+
bool disableImageViewPreallocationAndroid(jsi::Runtime& runtime);
|
|
52
|
+
|
|
51
53
|
bool disableMountItemReorderingAndroid(jsi::Runtime& runtime);
|
|
52
54
|
|
|
53
55
|
bool disableOldAndroidAttachmentMetricsWorkarounds(jsi::Runtime& runtime);
|
|
@@ -56,6 +58,8 @@ class NativeReactNativeFeatureFlags
|
|
|
56
58
|
|
|
57
59
|
bool disableTextLayoutManagerCacheAndroid(jsi::Runtime& runtime);
|
|
58
60
|
|
|
61
|
+
bool disableViewPreallocationAndroid(jsi::Runtime& runtime);
|
|
62
|
+
|
|
59
63
|
bool enableAccessibilityOrder(jsi::Runtime& runtime);
|
|
60
64
|
|
|
61
65
|
bool enableAccumulatedUpdatesInRawPropsAndroid(jsi::Runtime& runtime);
|
|
@@ -16,6 +16,7 @@ target_compile_options(react_performance_timeline PRIVATE -Wpedantic)
|
|
|
16
16
|
|
|
17
17
|
target_include_directories(react_performance_timeline PUBLIC ${REACT_COMMON_DIR})
|
|
18
18
|
target_link_libraries(react_performance_timeline
|
|
19
|
+
jsinspector
|
|
19
20
|
jsinspector_tracing
|
|
20
21
|
reactperflogger
|
|
21
22
|
react_featureflags
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
#include "PerformanceEntryReporter.h"
|
|
9
9
|
|
|
10
|
+
#include <jsinspector-modern/ConsoleTaskOrchestrator.h>
|
|
10
11
|
#include <jsinspector-modern/tracing/PerformanceTracer.h>
|
|
11
12
|
#include <react/featureflags/ReactNativeFeatureFlags.h>
|
|
12
13
|
#include <react/timing/primitives.h>
|
|
@@ -381,8 +382,15 @@ void PerformanceEntryReporter::traceMeasure(
|
|
|
381
382
|
}
|
|
382
383
|
|
|
383
384
|
if (performanceTracer.isTracing()) {
|
|
385
|
+
auto taskContext =
|
|
386
|
+
jsinspector_modern::ConsoleTaskOrchestrator::getInstance().top();
|
|
387
|
+
|
|
384
388
|
performanceTracer.reportMeasure(
|
|
385
|
-
entry.name,
|
|
389
|
+
entry.name,
|
|
390
|
+
entry.startTime,
|
|
391
|
+
entry.duration,
|
|
392
|
+
std::move(detail),
|
|
393
|
+
taskContext ? taskContext->getSerializedStackTrace() : nullptr);
|
|
386
394
|
}
|
|
387
395
|
}
|
|
388
396
|
}
|
|
@@ -41,6 +41,7 @@ Pod::Spec.new do |s|
|
|
|
41
41
|
resolve_use_frameworks(s, header_mappings_dir: "../../..", module_name: "React_performancetimeline")
|
|
42
42
|
|
|
43
43
|
s.dependency "React-featureflags"
|
|
44
|
+
add_dependency(s, "React-jsinspector", :framework_name => 'jsinspector_modern')
|
|
44
45
|
add_dependency(s, "React-jsinspectortracing", :framework_name => 'jsinspector_moderntracing')
|
|
45
46
|
s.dependency "React-timing"
|
|
46
47
|
s.dependency "React-perflogger"
|
|
@@ -519,6 +519,17 @@ NativeAnimatedNodesManager::ensureEventEmitterListener() noexcept {
|
|
|
519
519
|
}
|
|
520
520
|
|
|
521
521
|
void NativeAnimatedNodesManager::startRenderCallbackIfNeeded(bool isAsync) {
|
|
522
|
+
// This method can be called from either the UI thread or JavaScript thread.
|
|
523
|
+
// It ensures `startOnRenderCallback_` is called exactly once using atomic
|
|
524
|
+
// operations. We use std::atomic_bool rather than std::mutex to avoid
|
|
525
|
+
// potential deadlocks that could occur if we called external code while
|
|
526
|
+
// holding a mutex.
|
|
527
|
+
auto isRenderCallbackStarted = isRenderCallbackStarted_.exchange(true);
|
|
528
|
+
if (isRenderCallbackStarted) {
|
|
529
|
+
// onRender callback is already started.
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
532
|
+
|
|
522
533
|
if (ReactNativeFeatureFlags::useSharedAnimatedBackend()) {
|
|
523
534
|
#ifdef RN_USE_ANIMATION_BACKEND
|
|
524
535
|
if (auto animationBackend = animationBackend_.lock()) {
|
|
@@ -531,16 +542,6 @@ void NativeAnimatedNodesManager::startRenderCallbackIfNeeded(bool isAsync) {
|
|
|
531
542
|
|
|
532
543
|
return;
|
|
533
544
|
}
|
|
534
|
-
// This method can be called from either the UI thread or JavaScript thread.
|
|
535
|
-
// It ensures `startOnRenderCallback_` is called exactly once using atomic
|
|
536
|
-
// operations. We use std::atomic_bool rather than std::mutex to avoid
|
|
537
|
-
// potential deadlocks that could occur if we called external code while
|
|
538
|
-
// holding a mutex.
|
|
539
|
-
auto isRenderCallbackStarted = isRenderCallbackStarted_.exchange(true);
|
|
540
|
-
if (isRenderCallbackStarted) {
|
|
541
|
-
// onRender callback is already started.
|
|
542
|
-
return;
|
|
543
|
-
}
|
|
544
545
|
|
|
545
546
|
if (startOnRenderCallback_) {
|
|
546
547
|
startOnRenderCallback_([this]() { onRender(); }, isAsync);
|
|
@@ -549,25 +550,28 @@ void NativeAnimatedNodesManager::startRenderCallbackIfNeeded(bool isAsync) {
|
|
|
549
550
|
|
|
550
551
|
void NativeAnimatedNodesManager::stopRenderCallbackIfNeeded(
|
|
551
552
|
bool isAsync) noexcept {
|
|
552
|
-
if (ReactNativeFeatureFlags::useSharedAnimatedBackend()) {
|
|
553
|
-
if (auto animationBackend = animationBackend_.lock()) {
|
|
554
|
-
animationBackend->stop(isAsync);
|
|
555
|
-
}
|
|
556
|
-
return;
|
|
557
|
-
}
|
|
558
553
|
// When multiple threads reach this point, only one thread should call
|
|
559
554
|
// stopOnRenderCallback_. This synchronization is primarily needed during
|
|
560
555
|
// destruction of NativeAnimatedNodesManager. In normal operation,
|
|
561
556
|
// stopRenderCallbackIfNeeded is always called from the UI thread.
|
|
562
557
|
auto isRenderCallbackStarted = isRenderCallbackStarted_.exchange(false);
|
|
563
558
|
|
|
559
|
+
if (ReactNativeFeatureFlags::useSharedAnimatedBackend()) {
|
|
560
|
+
if (isRenderCallbackStarted) {
|
|
561
|
+
if (auto animationBackend = animationBackend_.lock()) {
|
|
562
|
+
animationBackend->stop(isAsync);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
return;
|
|
566
|
+
}
|
|
567
|
+
|
|
564
568
|
if (isRenderCallbackStarted) {
|
|
565
569
|
if (stopOnRenderCallback_) {
|
|
566
570
|
stopOnRenderCallback_(isAsync);
|
|
567
|
-
}
|
|
568
571
|
|
|
569
|
-
|
|
570
|
-
|
|
572
|
+
if (frameRateListenerCallback_) {
|
|
573
|
+
frameRateListenerCallback_(false);
|
|
574
|
+
}
|
|
571
575
|
}
|
|
572
576
|
}
|
|
573
577
|
}
|
|
@@ -988,6 +992,7 @@ AnimationMutations NativeAnimatedNodesManager::pullAnimationMutations() {
|
|
|
988
992
|
AnimationMutation{tag, nullptr, propsBuilder.get()});
|
|
989
993
|
containsChange = true;
|
|
990
994
|
}
|
|
995
|
+
updateViewPropsDirect_.clear();
|
|
991
996
|
}
|
|
992
997
|
|
|
993
998
|
if (!containsChange) {
|
|
@@ -80,19 +80,28 @@ NativeAnimatedNodesManagerProvider::getOrCreate(
|
|
|
80
80
|
std::move(directManipulationCallback),
|
|
81
81
|
std::move(fabricCommitCallback),
|
|
82
82
|
uiManager);
|
|
83
|
-
#endif
|
|
84
83
|
|
|
85
84
|
nativeAnimatedNodesManager_ =
|
|
86
85
|
std::make_shared<NativeAnimatedNodesManager>(animationBackend_);
|
|
87
86
|
|
|
87
|
+
nativeAnimatedDelegate_ =
|
|
88
|
+
std::make_shared<UIManagerNativeAnimatedDelegateBackendImpl>(
|
|
89
|
+
animationBackend_);
|
|
90
|
+
|
|
88
91
|
uiManager->unstable_setAnimationBackend(animationBackend_);
|
|
92
|
+
#endif
|
|
89
93
|
} else {
|
|
90
94
|
nativeAnimatedNodesManager_ =
|
|
91
95
|
std::make_shared<NativeAnimatedNodesManager>(
|
|
92
96
|
std::move(directManipulationCallback),
|
|
93
97
|
std::move(fabricCommitCallback),
|
|
94
98
|
std::move(startOnRenderCallback_),
|
|
95
|
-
std::move(stopOnRenderCallback_)
|
|
99
|
+
std::move(stopOnRenderCallback_),
|
|
100
|
+
std::move(frameRateListenerCallback_));
|
|
101
|
+
|
|
102
|
+
nativeAnimatedDelegate_ =
|
|
103
|
+
std::make_shared<UIManagerNativeAnimatedDelegateImpl>(
|
|
104
|
+
nativeAnimatedNodesManager_);
|
|
96
105
|
}
|
|
97
106
|
|
|
98
107
|
addEventEmitterListener(
|
|
@@ -117,10 +126,6 @@ NativeAnimatedNodesManagerProvider::getOrCreate(
|
|
|
117
126
|
return false;
|
|
118
127
|
}));
|
|
119
128
|
|
|
120
|
-
nativeAnimatedDelegate_ =
|
|
121
|
-
std::make_shared<UIManagerNativeAnimatedDelegateImpl>(
|
|
122
|
-
nativeAnimatedNodesManager_);
|
|
123
|
-
|
|
124
129
|
uiManager->setNativeAnimatedDelegate(nativeAnimatedDelegate_);
|
|
125
130
|
|
|
126
131
|
// TODO: remove force casting.
|
|
@@ -10,6 +10,18 @@
|
|
|
10
10
|
|
|
11
11
|
namespace facebook::react {
|
|
12
12
|
|
|
13
|
+
UIManagerNativeAnimatedDelegateBackendImpl::
|
|
14
|
+
UIManagerNativeAnimatedDelegateBackendImpl(
|
|
15
|
+
std::weak_ptr<UIManagerAnimationBackend> animationBackend)
|
|
16
|
+
: animationBackend_(std::move(animationBackend)) {}
|
|
17
|
+
|
|
18
|
+
void UIManagerNativeAnimatedDelegateBackendImpl::runAnimationFrame() {
|
|
19
|
+
if (auto animationBackendStrong = animationBackend_.lock()) {
|
|
20
|
+
animationBackendStrong->onAnimationFrame(
|
|
21
|
+
std::chrono::steady_clock::now().time_since_epoch().count() / 1000);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
13
25
|
static inline Props::Shared cloneProps(
|
|
14
26
|
AnimatedProps& animatedProps,
|
|
15
27
|
const ShadowNode& shadowNode) {
|
|
@@ -87,19 +99,23 @@ AnimationBackend::AnimationBackend(
|
|
|
87
99
|
|
|
88
100
|
void AnimationBackend::onAnimationFrame(double timestamp) {
|
|
89
101
|
std::unordered_map<Tag, AnimatedProps> updates;
|
|
90
|
-
std::unordered_set<const ShadowNodeFamily
|
|
102
|
+
std::unordered_map<SurfaceId, std::unordered_set<const ShadowNodeFamily*>>
|
|
103
|
+
surfaceToFamilies;
|
|
91
104
|
bool hasAnyLayoutUpdates = false;
|
|
92
105
|
for (auto& callback : callbacks) {
|
|
93
106
|
auto muatations = callback(static_cast<float>(timestamp));
|
|
94
107
|
for (auto& mutation : muatations) {
|
|
95
108
|
hasAnyLayoutUpdates |= mutationHasLayoutUpdates(mutation);
|
|
96
|
-
|
|
109
|
+
const auto family = mutation.family;
|
|
110
|
+
if (family != nullptr) {
|
|
111
|
+
surfaceToFamilies[family->getSurfaceId()].insert(family);
|
|
112
|
+
}
|
|
97
113
|
updates[mutation.tag] = std::move(mutation.props);
|
|
98
114
|
}
|
|
99
115
|
}
|
|
100
116
|
|
|
101
117
|
if (hasAnyLayoutUpdates) {
|
|
102
|
-
|
|
118
|
+
commitUpdates(surfaceToFamilies, updates);
|
|
103
119
|
} else {
|
|
104
120
|
synchronouslyUpdateProps(updates);
|
|
105
121
|
}
|
|
@@ -108,41 +124,60 @@ void AnimationBackend::onAnimationFrame(double timestamp) {
|
|
|
108
124
|
void AnimationBackend::start(const Callback& callback, bool isAsync) {
|
|
109
125
|
callbacks.push_back(callback);
|
|
110
126
|
// TODO: startOnRenderCallback_ should provide the timestamp from the platform
|
|
111
|
-
startOnRenderCallback_
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
127
|
+
if (startOnRenderCallback_) {
|
|
128
|
+
startOnRenderCallback_(
|
|
129
|
+
[this]() {
|
|
130
|
+
onAnimationFrame(
|
|
131
|
+
std::chrono::steady_clock::now().time_since_epoch().count() /
|
|
132
|
+
1000);
|
|
133
|
+
},
|
|
134
|
+
isAsync);
|
|
135
|
+
}
|
|
117
136
|
}
|
|
118
137
|
void AnimationBackend::stop(bool isAsync) {
|
|
119
|
-
stopOnRenderCallback_
|
|
138
|
+
if (stopOnRenderCallback_) {
|
|
139
|
+
stopOnRenderCallback_(isAsync);
|
|
140
|
+
}
|
|
120
141
|
callbacks.clear();
|
|
121
142
|
}
|
|
122
143
|
|
|
123
|
-
void AnimationBackend::
|
|
124
|
-
const std::
|
|
144
|
+
void AnimationBackend::commitUpdates(
|
|
145
|
+
const std::unordered_map<
|
|
146
|
+
SurfaceId,
|
|
147
|
+
std::unordered_set<const ShadowNodeFamily*>>& surfaceToFamilies,
|
|
125
148
|
std::unordered_map<Tag, AnimatedProps>& updates) {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
{
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
149
|
+
for (const auto& surfaceEntry : surfaceToFamilies) {
|
|
150
|
+
const auto& surfaceId = surfaceEntry.first;
|
|
151
|
+
const auto& surfaceFamilies = surfaceEntry.second;
|
|
152
|
+
uiManager_->getShadowTreeRegistry().visit(
|
|
153
|
+
surfaceId, [&surfaceFamilies, &updates](const ShadowTree& shadowTree) {
|
|
154
|
+
shadowTree.commit(
|
|
155
|
+
[&surfaceFamilies,
|
|
156
|
+
&updates](const RootShadowNode& oldRootShadowNode) {
|
|
157
|
+
return std::static_pointer_cast<RootShadowNode>(
|
|
158
|
+
oldRootShadowNode.cloneMultiple(
|
|
159
|
+
surfaceFamilies,
|
|
160
|
+
[&surfaceFamilies, &updates](
|
|
161
|
+
const ShadowNode& shadowNode,
|
|
162
|
+
const ShadowNodeFragment& fragment) {
|
|
163
|
+
auto newProps =
|
|
164
|
+
ShadowNodeFragment::propsPlaceholder();
|
|
165
|
+
if (surfaceFamilies.contains(
|
|
166
|
+
&shadowNode.getFamily())) {
|
|
167
|
+
auto& animatedProps =
|
|
168
|
+
updates.at(shadowNode.getTag());
|
|
169
|
+
newProps = cloneProps(animatedProps, shadowNode);
|
|
170
|
+
}
|
|
171
|
+
return shadowNode.clone(
|
|
172
|
+
{.props = newProps,
|
|
173
|
+
.children = fragment.children,
|
|
174
|
+
.state = shadowNode.getState(),
|
|
175
|
+
.runtimeShadowNodeReference = false});
|
|
176
|
+
}));
|
|
177
|
+
},
|
|
178
|
+
{.mountSynchronously = true});
|
|
179
|
+
});
|
|
180
|
+
}
|
|
146
181
|
}
|
|
147
182
|
|
|
148
183
|
void AnimationBackend::synchronouslyUpdateProps(
|
|
@@ -18,6 +18,18 @@
|
|
|
18
18
|
|
|
19
19
|
namespace facebook::react {
|
|
20
20
|
|
|
21
|
+
class AnimationBackend;
|
|
22
|
+
|
|
23
|
+
class UIManagerNativeAnimatedDelegateBackendImpl : public UIManagerNativeAnimatedDelegate {
|
|
24
|
+
public:
|
|
25
|
+
explicit UIManagerNativeAnimatedDelegateBackendImpl(std::weak_ptr<UIManagerAnimationBackend> animationBackend);
|
|
26
|
+
|
|
27
|
+
void runAnimationFrame() override;
|
|
28
|
+
|
|
29
|
+
private:
|
|
30
|
+
std::weak_ptr<UIManagerAnimationBackend> animationBackend_;
|
|
31
|
+
};
|
|
32
|
+
|
|
21
33
|
struct AnimationMutation {
|
|
22
34
|
Tag tag;
|
|
23
35
|
const ShadowNodeFamily *family;
|
|
@@ -47,8 +59,8 @@ class AnimationBackend : public UIManagerAnimationBackend {
|
|
|
47
59
|
DirectManipulationCallback &&directManipulationCallback,
|
|
48
60
|
FabricCommitCallback &&fabricCommitCallback,
|
|
49
61
|
UIManager *uiManager);
|
|
50
|
-
void
|
|
51
|
-
const std::unordered_set<const ShadowNodeFamily
|
|
62
|
+
void commitUpdates(
|
|
63
|
+
const std::unordered_map<SurfaceId, std::unordered_set<const ShadowNodeFamily *>> &surfaceToFamilies,
|
|
52
64
|
std::unordered_map<Tag, AnimatedProps> &updates);
|
|
53
65
|
void synchronouslyUpdateProps(const std::unordered_map<Tag, AnimatedProps> &updates);
|
|
54
66
|
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
#include
|
|
8
|
+
#include "EventQueueProcessor.h"
|
|
9
|
+
|
|
9
10
|
#include <logger/react_native_log.h>
|
|
10
11
|
#include <react/featureflags/ReactNativeFeatureFlags.h>
|
|
12
|
+
|
|
11
13
|
#include "EventEmitter.h"
|
|
12
14
|
#include "EventLogger.h"
|
|
13
|
-
#include "EventQueue.h"
|
|
14
|
-
#include "ShadowNodeFamily.h"
|
|
15
15
|
|
|
16
16
|
namespace facebook::react {
|
|
17
17
|
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
#include <jsi/hermes.h>
|
|
19
19
|
#include <jsi/instrumentation.h>
|
|
20
20
|
#include <jsinspector-modern/HostTarget.h>
|
|
21
|
-
#include <jsireact/JSIExecutor.h>
|
|
22
21
|
#include <react/featureflags/ReactNativeFeatureFlags.h>
|
|
23
22
|
#include <react/renderer/core/ShadowNode.h>
|
|
24
23
|
#include <react/renderer/runtimescheduler/RuntimeSchedulerBinding.h>
|
|
24
|
+
#include <react/runtime/JSRuntimeBindings.h>
|
|
25
25
|
#include <react/timing/primitives.h>
|
|
26
26
|
#include <react/utils/jsi-utils.h>
|
|
27
27
|
#include <iostream>
|
|
@@ -48,6 +48,12 @@ std::shared_ptr<RuntimeScheduler> createRuntimeScheduler(
|
|
|
48
48
|
return scheduler;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
std::string getSyntheticBundlePath(uint32_t bundleId) {
|
|
52
|
+
std::array<char, 32> buffer{};
|
|
53
|
+
std::snprintf(buffer.data(), buffer.size(), "seg-%u.js", bundleId);
|
|
54
|
+
return buffer.data();
|
|
55
|
+
}
|
|
56
|
+
|
|
51
57
|
} // namespace
|
|
52
58
|
|
|
53
59
|
ReactInstance::ReactInstance(
|
|
@@ -365,12 +371,8 @@ void ReactInstance::registerSegment(
|
|
|
365
371
|
}
|
|
366
372
|
LOG(WARNING) << "Starting to evaluate segment " << segmentId
|
|
367
373
|
<< " in ReactInstance::registerSegment";
|
|
368
|
-
#pragma clang diagnostic push
|
|
369
|
-
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
|
370
374
|
runtime.evaluateJavaScript(
|
|
371
|
-
std::move(script),
|
|
372
|
-
JSExecutor::getSyntheticBundlePath(segmentId, segmentPath));
|
|
373
|
-
#pragma clang diagnostic pop
|
|
375
|
+
std::move(script), getSyntheticBundlePath(segmentId));
|
|
374
376
|
LOG(WARNING) << "Finished evaluating segment " << segmentId
|
|
375
377
|
<< " in ReactInstance::registerSegment";
|
|
376
378
|
if (hasLogger) {
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
#include <jserrorhandler/JsErrorHandler.h>
|
|
14
14
|
#include <jsi/jsi.h>
|
|
15
15
|
#include <jsinspector-modern/ReactCdp.h>
|
|
16
|
-
#include <jsireact/JSIExecutor.h>
|
|
17
16
|
#include <react/renderer/runtimescheduler/RuntimeScheduler.h>
|
|
18
17
|
#include <react/runtime/BufferedRuntimeExecutor.h>
|
|
19
18
|
#include <react/runtime/JSRuntimeFactory.h>
|