react-native 0.84.0-nightly-20251107-f8198f662 → 0.84.0-nightly-20251109-b7012ba92
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/Blob/RCTBlobPlugins.mm +14 -14
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Image/RCTImagePlugins.h +1 -0
- package/Libraries/Image/RCTImagePlugins.mm +30 -17
- package/Libraries/LinkingIOS/RCTLinkingPlugins.mm +10 -13
- package/Libraries/LogBox/Data/LogBoxData.js +31 -4
- package/Libraries/NativeAnimation/RCTAnimationPlugins.mm +14 -14
- package/Libraries/Network/RCTNetworkPlugins.mm +22 -16
- package/Libraries/PushNotificationIOS/RCTPushNotificationPlugins.mm +10 -13
- package/Libraries/Settings/RCTSettingsPlugins.mm +10 -13
- package/Libraries/Vibration/RCTVibrationPlugins.mm +10 -13
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/CoreModulesPlugins.mm +98 -35
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +16 -0
- package/ReactAndroid/gradle.properties +1 -1
- 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/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/uimanager/drawable/OutlineDrawable.kt +1 -1
- 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/runtime/jni/JReactHostInspectorTarget.cpp +8 -1
- package/ReactAndroid/src/main/jni/third-party/folly/CMakeLists.txt +1 -0
- package/ReactApple/RCTAnimatedModuleProvider/RCTAnimatedModuleProvider.mm +29 -4
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- 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/TracingAgent.cpp +19 -2
- 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 +19 -18
- 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/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/renderer/animated/NativeAnimatedNodesManager.cpp +3 -3
- package/ReactCommon/react/renderer/animated/NativeAnimatedNodesManagerProvider.cpp +2 -1
- package/ReactCommon/react/runtime/TimerManager.cpp +0 -54
- package/ReactCommon/react/runtime/TimerManager.h +0 -12
- package/package.json +9 -9
- package/sdks/hermes-engine/version.properties +1 -1
- package/src/private/featureflags/ReactNativeFeatureFlags.js +11 -1
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +3 -1
|
@@ -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<<405bf283e4631e166cd57f5dfe30d5f9>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -26,10 +26,12 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
|
|
26
26
|
private var cxxNativeAnimatedRemoveJsSyncCache: Boolean? = null
|
|
27
27
|
private var disableEarlyViewCommandExecutionCache: Boolean? = null
|
|
28
28
|
private var disableFabricCommitInCXXAnimatedCache: Boolean? = null
|
|
29
|
+
private var disableImageViewPreallocationAndroidCache: Boolean? = null
|
|
29
30
|
private var disableMountItemReorderingAndroidCache: Boolean? = null
|
|
30
31
|
private var disableOldAndroidAttachmentMetricsWorkaroundsCache: Boolean? = null
|
|
31
32
|
private var disableSubviewClippingAndroidCache: Boolean? = null
|
|
32
33
|
private var disableTextLayoutManagerCacheAndroidCache: Boolean? = null
|
|
34
|
+
private var disableViewPreallocationAndroidCache: Boolean? = null
|
|
33
35
|
private var enableAccessibilityOrderCache: Boolean? = null
|
|
34
36
|
private var enableAccumulatedUpdatesInRawPropsAndroidCache: Boolean? = null
|
|
35
37
|
private var enableAndroidLinearTextCache: Boolean? = null
|
|
@@ -157,6 +159,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
|
|
157
159
|
return cached
|
|
158
160
|
}
|
|
159
161
|
|
|
162
|
+
override fun disableImageViewPreallocationAndroid(): Boolean {
|
|
163
|
+
var cached = disableImageViewPreallocationAndroidCache
|
|
164
|
+
if (cached == null) {
|
|
165
|
+
cached = ReactNativeFeatureFlagsCxxInterop.disableImageViewPreallocationAndroid()
|
|
166
|
+
disableImageViewPreallocationAndroidCache = cached
|
|
167
|
+
}
|
|
168
|
+
return cached
|
|
169
|
+
}
|
|
170
|
+
|
|
160
171
|
override fun disableMountItemReorderingAndroid(): Boolean {
|
|
161
172
|
var cached = disableMountItemReorderingAndroidCache
|
|
162
173
|
if (cached == null) {
|
|
@@ -193,6 +204,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
|
|
193
204
|
return cached
|
|
194
205
|
}
|
|
195
206
|
|
|
207
|
+
override fun disableViewPreallocationAndroid(): Boolean {
|
|
208
|
+
var cached = disableViewPreallocationAndroidCache
|
|
209
|
+
if (cached == null) {
|
|
210
|
+
cached = ReactNativeFeatureFlagsCxxInterop.disableViewPreallocationAndroid()
|
|
211
|
+
disableViewPreallocationAndroidCache = cached
|
|
212
|
+
}
|
|
213
|
+
return cached
|
|
214
|
+
}
|
|
215
|
+
|
|
196
216
|
override fun enableAccessibilityOrder(): Boolean {
|
|
197
217
|
var cached = enableAccessibilityOrderCache
|
|
198
218
|
if (cached == null) {
|
|
@@ -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<<bffd645aa55b941acff92ca4efe6192a>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -40,6 +40,8 @@ public object ReactNativeFeatureFlagsCxxInterop {
|
|
|
40
40
|
|
|
41
41
|
@DoNotStrip @JvmStatic public external fun disableFabricCommitInCXXAnimated(): Boolean
|
|
42
42
|
|
|
43
|
+
@DoNotStrip @JvmStatic public external fun disableImageViewPreallocationAndroid(): Boolean
|
|
44
|
+
|
|
43
45
|
@DoNotStrip @JvmStatic public external fun disableMountItemReorderingAndroid(): Boolean
|
|
44
46
|
|
|
45
47
|
@DoNotStrip @JvmStatic public external fun disableOldAndroidAttachmentMetricsWorkarounds(): Boolean
|
|
@@ -48,6 +50,8 @@ public object ReactNativeFeatureFlagsCxxInterop {
|
|
|
48
50
|
|
|
49
51
|
@DoNotStrip @JvmStatic public external fun disableTextLayoutManagerCacheAndroid(): Boolean
|
|
50
52
|
|
|
53
|
+
@DoNotStrip @JvmStatic public external fun disableViewPreallocationAndroid(): Boolean
|
|
54
|
+
|
|
51
55
|
@DoNotStrip @JvmStatic public external fun enableAccessibilityOrder(): Boolean
|
|
52
56
|
|
|
53
57
|
@DoNotStrip @JvmStatic public external fun enableAccumulatedUpdatesInRawPropsAndroid(): Boolean
|
|
@@ -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<<a25d191472f7777804175ef9f56521d6>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -35,6 +35,8 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
|
|
|
35
35
|
|
|
36
36
|
override fun disableFabricCommitInCXXAnimated(): Boolean = false
|
|
37
37
|
|
|
38
|
+
override fun disableImageViewPreallocationAndroid(): Boolean = false
|
|
39
|
+
|
|
38
40
|
override fun disableMountItemReorderingAndroid(): Boolean = false
|
|
39
41
|
|
|
40
42
|
override fun disableOldAndroidAttachmentMetricsWorkarounds(): Boolean = true
|
|
@@ -43,6 +45,8 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
|
|
|
43
45
|
|
|
44
46
|
override fun disableTextLayoutManagerCacheAndroid(): Boolean = false
|
|
45
47
|
|
|
48
|
+
override fun disableViewPreallocationAndroid(): Boolean = false
|
|
49
|
+
|
|
46
50
|
override fun enableAccessibilityOrder(): Boolean = false
|
|
47
51
|
|
|
48
52
|
override fun enableAccumulatedUpdatesInRawPropsAndroid(): Boolean = false
|
|
@@ -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<<e8531e8c374d0ea1e604a2f3d5000078>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -30,10 +30,12 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
|
|
30
30
|
private var cxxNativeAnimatedRemoveJsSyncCache: Boolean? = null
|
|
31
31
|
private var disableEarlyViewCommandExecutionCache: Boolean? = null
|
|
32
32
|
private var disableFabricCommitInCXXAnimatedCache: Boolean? = null
|
|
33
|
+
private var disableImageViewPreallocationAndroidCache: Boolean? = null
|
|
33
34
|
private var disableMountItemReorderingAndroidCache: Boolean? = null
|
|
34
35
|
private var disableOldAndroidAttachmentMetricsWorkaroundsCache: Boolean? = null
|
|
35
36
|
private var disableSubviewClippingAndroidCache: Boolean? = null
|
|
36
37
|
private var disableTextLayoutManagerCacheAndroidCache: Boolean? = null
|
|
38
|
+
private var disableViewPreallocationAndroidCache: Boolean? = null
|
|
37
39
|
private var enableAccessibilityOrderCache: Boolean? = null
|
|
38
40
|
private var enableAccumulatedUpdatesInRawPropsAndroidCache: Boolean? = null
|
|
39
41
|
private var enableAndroidLinearTextCache: Boolean? = null
|
|
@@ -167,6 +169,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
|
|
167
169
|
return cached
|
|
168
170
|
}
|
|
169
171
|
|
|
172
|
+
override fun disableImageViewPreallocationAndroid(): Boolean {
|
|
173
|
+
var cached = disableImageViewPreallocationAndroidCache
|
|
174
|
+
if (cached == null) {
|
|
175
|
+
cached = currentProvider.disableImageViewPreallocationAndroid()
|
|
176
|
+
accessedFeatureFlags.add("disableImageViewPreallocationAndroid")
|
|
177
|
+
disableImageViewPreallocationAndroidCache = cached
|
|
178
|
+
}
|
|
179
|
+
return cached
|
|
180
|
+
}
|
|
181
|
+
|
|
170
182
|
override fun disableMountItemReorderingAndroid(): Boolean {
|
|
171
183
|
var cached = disableMountItemReorderingAndroidCache
|
|
172
184
|
if (cached == null) {
|
|
@@ -207,6 +219,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
|
|
207
219
|
return cached
|
|
208
220
|
}
|
|
209
221
|
|
|
222
|
+
override fun disableViewPreallocationAndroid(): Boolean {
|
|
223
|
+
var cached = disableViewPreallocationAndroidCache
|
|
224
|
+
if (cached == null) {
|
|
225
|
+
cached = currentProvider.disableViewPreallocationAndroid()
|
|
226
|
+
accessedFeatureFlags.add("disableViewPreallocationAndroid")
|
|
227
|
+
disableViewPreallocationAndroidCache = cached
|
|
228
|
+
}
|
|
229
|
+
return cached
|
|
230
|
+
}
|
|
231
|
+
|
|
210
232
|
override fun enableAccessibilityOrder(): Boolean {
|
|
211
233
|
var cached = enableAccessibilityOrderCache
|
|
212
234
|
if (cached == null) {
|
|
@@ -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<<2325f5410537941e25998ca8c59bf51d>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -35,6 +35,8 @@ public interface ReactNativeFeatureFlagsProvider {
|
|
|
35
35
|
|
|
36
36
|
@DoNotStrip public fun disableFabricCommitInCXXAnimated(): Boolean
|
|
37
37
|
|
|
38
|
+
@DoNotStrip public fun disableImageViewPreallocationAndroid(): Boolean
|
|
39
|
+
|
|
38
40
|
@DoNotStrip public fun disableMountItemReorderingAndroid(): Boolean
|
|
39
41
|
|
|
40
42
|
@DoNotStrip public fun disableOldAndroidAttachmentMetricsWorkarounds(): Boolean
|
|
@@ -43,6 +45,8 @@ public interface ReactNativeFeatureFlagsProvider {
|
|
|
43
45
|
|
|
44
46
|
@DoNotStrip public fun disableTextLayoutManagerCacheAndroid(): Boolean
|
|
45
47
|
|
|
48
|
+
@DoNotStrip public fun disableViewPreallocationAndroid(): Boolean
|
|
49
|
+
|
|
46
50
|
@DoNotStrip public fun enableAccessibilityOrder(): Boolean
|
|
47
51
|
|
|
48
52
|
@DoNotStrip public fun enableAccumulatedUpdatesInRawPropsAndroid(): Boolean
|
|
@@ -474,14 +474,13 @@ public abstract class BaseViewManager<T extends View, C extends LayoutShadowNode
|
|
|
474
474
|
public void setImportantForAccessibility(
|
|
475
475
|
@NonNull T view, @Nullable String importantForAccessibility) {
|
|
476
476
|
if (importantForAccessibility == null || importantForAccessibility.equals("auto")) {
|
|
477
|
-
|
|
477
|
+
view.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_AUTO);
|
|
478
478
|
} else if (importantForAccessibility.equals("yes")) {
|
|
479
|
-
|
|
479
|
+
view.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
|
|
480
480
|
} else if (importantForAccessibility.equals("no")) {
|
|
481
|
-
|
|
481
|
+
view.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
|
|
482
482
|
} else if (importantForAccessibility.equals("no-hide-descendants")) {
|
|
483
|
-
|
|
484
|
-
view, ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
|
|
483
|
+
view.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
|
|
485
484
|
}
|
|
486
485
|
}
|
|
487
486
|
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
#include <react/renderer/scheduler/SchedulerToolbox.h>
|
|
30
30
|
#include <react/renderer/uimanager/primitives.h>
|
|
31
31
|
#include <react/utils/ContextContainer.h>
|
|
32
|
+
#include <string_view>
|
|
32
33
|
|
|
33
34
|
namespace facebook::react {
|
|
34
35
|
|
|
@@ -672,6 +673,17 @@ void FabricUIManagerBinding::schedulerShouldRenderTransactions(
|
|
|
672
673
|
|
|
673
674
|
void FabricUIManagerBinding::schedulerDidRequestPreliminaryViewAllocation(
|
|
674
675
|
const ShadowNode& shadowNode) {
|
|
676
|
+
using namespace std::literals::string_view_literals;
|
|
677
|
+
|
|
678
|
+
if (ReactNativeFeatureFlags::disableViewPreallocationAndroid()) {
|
|
679
|
+
return;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
if (ReactNativeFeatureFlags::disableImageViewPreallocationAndroid() &&
|
|
683
|
+
std::string_view(shadowNode.getComponentName()) == "Image"sv) {
|
|
684
|
+
return;
|
|
685
|
+
}
|
|
686
|
+
|
|
675
687
|
auto mountingManager = getMountingManager("preallocateView");
|
|
676
688
|
if (!mountingManager) {
|
|
677
689
|
return;
|
|
@@ -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<<95ebd4929bf0f98aa059ad4b8139f7b3>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -75,6 +75,12 @@ class ReactNativeFeatureFlagsJavaProvider
|
|
|
75
75
|
return method(javaProvider_);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
bool disableImageViewPreallocationAndroid() override {
|
|
79
|
+
static const auto method =
|
|
80
|
+
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("disableImageViewPreallocationAndroid");
|
|
81
|
+
return method(javaProvider_);
|
|
82
|
+
}
|
|
83
|
+
|
|
78
84
|
bool disableMountItemReorderingAndroid() override {
|
|
79
85
|
static const auto method =
|
|
80
86
|
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("disableMountItemReorderingAndroid");
|
|
@@ -99,6 +105,12 @@ class ReactNativeFeatureFlagsJavaProvider
|
|
|
99
105
|
return method(javaProvider_);
|
|
100
106
|
}
|
|
101
107
|
|
|
108
|
+
bool disableViewPreallocationAndroid() override {
|
|
109
|
+
static const auto method =
|
|
110
|
+
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("disableViewPreallocationAndroid");
|
|
111
|
+
return method(javaProvider_);
|
|
112
|
+
}
|
|
113
|
+
|
|
102
114
|
bool enableAccessibilityOrder() override {
|
|
103
115
|
static const auto method =
|
|
104
116
|
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableAccessibilityOrder");
|
|
@@ -565,6 +577,11 @@ bool JReactNativeFeatureFlagsCxxInterop::disableFabricCommitInCXXAnimated(
|
|
|
565
577
|
return ReactNativeFeatureFlags::disableFabricCommitInCXXAnimated();
|
|
566
578
|
}
|
|
567
579
|
|
|
580
|
+
bool JReactNativeFeatureFlagsCxxInterop::disableImageViewPreallocationAndroid(
|
|
581
|
+
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
582
|
+
return ReactNativeFeatureFlags::disableImageViewPreallocationAndroid();
|
|
583
|
+
}
|
|
584
|
+
|
|
568
585
|
bool JReactNativeFeatureFlagsCxxInterop::disableMountItemReorderingAndroid(
|
|
569
586
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
570
587
|
return ReactNativeFeatureFlags::disableMountItemReorderingAndroid();
|
|
@@ -585,6 +602,11 @@ bool JReactNativeFeatureFlagsCxxInterop::disableTextLayoutManagerCacheAndroid(
|
|
|
585
602
|
return ReactNativeFeatureFlags::disableTextLayoutManagerCacheAndroid();
|
|
586
603
|
}
|
|
587
604
|
|
|
605
|
+
bool JReactNativeFeatureFlagsCxxInterop::disableViewPreallocationAndroid(
|
|
606
|
+
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
607
|
+
return ReactNativeFeatureFlags::disableViewPreallocationAndroid();
|
|
608
|
+
}
|
|
609
|
+
|
|
588
610
|
bool JReactNativeFeatureFlagsCxxInterop::enableAccessibilityOrder(
|
|
589
611
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
590
612
|
return ReactNativeFeatureFlags::enableAccessibilityOrder();
|
|
@@ -994,6 +1016,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
|
|
|
994
1016
|
makeNativeMethod(
|
|
995
1017
|
"disableFabricCommitInCXXAnimated",
|
|
996
1018
|
JReactNativeFeatureFlagsCxxInterop::disableFabricCommitInCXXAnimated),
|
|
1019
|
+
makeNativeMethod(
|
|
1020
|
+
"disableImageViewPreallocationAndroid",
|
|
1021
|
+
JReactNativeFeatureFlagsCxxInterop::disableImageViewPreallocationAndroid),
|
|
997
1022
|
makeNativeMethod(
|
|
998
1023
|
"disableMountItemReorderingAndroid",
|
|
999
1024
|
JReactNativeFeatureFlagsCxxInterop::disableMountItemReorderingAndroid),
|
|
@@ -1006,6 +1031,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
|
|
|
1006
1031
|
makeNativeMethod(
|
|
1007
1032
|
"disableTextLayoutManagerCacheAndroid",
|
|
1008
1033
|
JReactNativeFeatureFlagsCxxInterop::disableTextLayoutManagerCacheAndroid),
|
|
1034
|
+
makeNativeMethod(
|
|
1035
|
+
"disableViewPreallocationAndroid",
|
|
1036
|
+
JReactNativeFeatureFlagsCxxInterop::disableViewPreallocationAndroid),
|
|
1009
1037
|
makeNativeMethod(
|
|
1010
1038
|
"enableAccessibilityOrder",
|
|
1011
1039
|
JReactNativeFeatureFlagsCxxInterop::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<<155f615584a7738dc5b89205c2ecad8b>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -48,6 +48,9 @@ class JReactNativeFeatureFlagsCxxInterop
|
|
|
48
48
|
static bool disableFabricCommitInCXXAnimated(
|
|
49
49
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
50
50
|
|
|
51
|
+
static bool disableImageViewPreallocationAndroid(
|
|
52
|
+
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
53
|
+
|
|
51
54
|
static bool disableMountItemReorderingAndroid(
|
|
52
55
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
53
56
|
|
|
@@ -60,6 +63,9 @@ class JReactNativeFeatureFlagsCxxInterop
|
|
|
60
63
|
static bool disableTextLayoutManagerCacheAndroid(
|
|
61
64
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
62
65
|
|
|
66
|
+
static bool disableViewPreallocationAndroid(
|
|
67
|
+
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
68
|
+
|
|
63
69
|
static bool enableAccessibilityOrder(
|
|
64
70
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
65
71
|
|
|
@@ -146,7 +146,14 @@ HostTarget* JReactHostInspectorTarget::getInspectorTarget() {
|
|
|
146
146
|
|
|
147
147
|
bool JReactHostInspectorTarget::startBackgroundTrace() {
|
|
148
148
|
if (inspectorTarget_) {
|
|
149
|
-
return inspectorTarget_->startTracing(
|
|
149
|
+
return inspectorTarget_->startTracing(
|
|
150
|
+
tracing::Mode::Background,
|
|
151
|
+
{
|
|
152
|
+
tracing::Category::HiddenTimeline,
|
|
153
|
+
tracing::Category::RuntimeExecution,
|
|
154
|
+
tracing::Category::Timeline,
|
|
155
|
+
tracing::Category::UserTiming,
|
|
156
|
+
});
|
|
150
157
|
} else {
|
|
151
158
|
jni::throwNewJavaException(
|
|
152
159
|
"java/lang/IllegalStateException",
|
|
@@ -26,6 +26,26 @@
|
|
|
26
26
|
std::function<void()> _onRender;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
- (void)dealloc
|
|
30
|
+
{
|
|
31
|
+
if (_displayLink != nil) {
|
|
32
|
+
#if TARGET_OS_OSX
|
|
33
|
+
RCTPlatformDisplayLink *displayLink = _displayLink;
|
|
34
|
+
#else
|
|
35
|
+
CADisplayLink *displayLink = _displayLink;
|
|
36
|
+
#endif
|
|
37
|
+
_displayLink = nil;
|
|
38
|
+
if ([NSThread isMainThread]) {
|
|
39
|
+
[displayLink invalidate];
|
|
40
|
+
} else {
|
|
41
|
+
dispatch_sync(dispatch_get_main_queue(), ^{
|
|
42
|
+
[displayLink invalidate];
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
_onRender = nullptr;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
29
49
|
- (void)_onDisplayLinkTick
|
|
30
50
|
{
|
|
31
51
|
if (_displayLink != nullptr && _onRender != nullptr) {
|
|
@@ -69,11 +89,16 @@
|
|
|
69
89
|
const auto stop_render = [weakSelf]() {
|
|
70
90
|
RCTAnimatedModuleProvider *strongSelf = weakSelf;
|
|
71
91
|
if (strongSelf) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
92
|
+
#if TARGET_OS_OSX
|
|
93
|
+
RCTPlatformDisplayLink *displayLink = strongSelf->_displayLink;
|
|
94
|
+
#else
|
|
95
|
+
CADisplayLink *displayLink = strongSelf->_displayLink;
|
|
96
|
+
#endif
|
|
97
|
+
strongSelf->_displayLink = nil;
|
|
98
|
+
if (displayLink != nil) {
|
|
99
|
+
[displayLink invalidate];
|
|
76
100
|
}
|
|
101
|
+
strongSelf->_onRender = nullptr;
|
|
77
102
|
}
|
|
78
103
|
};
|
|
79
104
|
|
|
@@ -22,7 +22,7 @@ constexpr struct {
|
|
|
22
22
|
int32_t Major = 0;
|
|
23
23
|
int32_t Minor = 84;
|
|
24
24
|
int32_t Patch = 0;
|
|
25
|
-
std::string_view Prerelease = "nightly-
|
|
25
|
+
std::string_view Prerelease = "nightly-20251109-b7012ba92";
|
|
26
26
|
} ReactNativeVersion;
|
|
27
27
|
|
|
28
28
|
} // namespace facebook::react
|
|
@@ -17,8 +17,10 @@
|
|
|
17
17
|
#include "WeakList.h"
|
|
18
18
|
|
|
19
19
|
#include <optional>
|
|
20
|
+
#include <set>
|
|
20
21
|
#include <string>
|
|
21
22
|
|
|
23
|
+
#include <jsinspector-modern/tracing/TracingCategory.h>
|
|
22
24
|
#include <jsinspector-modern/tracing/TracingMode.h>
|
|
23
25
|
#include <jsinspector-modern/tracing/TracingState.h>
|
|
24
26
|
|
|
@@ -203,9 +205,11 @@ class HostTargetController final {
|
|
|
203
205
|
* Starts trace recording for this HostTarget.
|
|
204
206
|
*
|
|
205
207
|
* \param mode In which mode to start the trace recording.
|
|
208
|
+
* \param enabledCategories The set of categories to enable.
|
|
209
|
+
*
|
|
206
210
|
* \return false if already tracing, true otherwise.
|
|
207
211
|
*/
|
|
208
|
-
bool startTracing(tracing::Mode mode);
|
|
212
|
+
bool startTracing(tracing::Mode mode, std::set<tracing::Category> enabledCategories);
|
|
209
213
|
|
|
210
214
|
/**
|
|
211
215
|
* Stops previously started trace recording.
|
|
@@ -292,9 +296,11 @@ class JSINSPECTOR_EXPORT HostTarget : public EnableExecutorFromThis<HostTarget>
|
|
|
292
296
|
* Starts trace recording for this HostTarget.
|
|
293
297
|
*
|
|
294
298
|
* \param mode In which mode to start the trace recording.
|
|
299
|
+
* \param enabledCategories The set of categories to enable.
|
|
300
|
+
*
|
|
295
301
|
* \return false if already tracing, true otherwise.
|
|
296
302
|
*/
|
|
297
|
-
bool startTracing(tracing::Mode mode);
|
|
303
|
+
bool startTracing(tracing::Mode mode, std::set<tracing::Category> enabledCategories);
|
|
298
304
|
|
|
299
305
|
/**
|
|
300
306
|
* Stops previously started trace recording.
|
|
@@ -11,9 +11,12 @@
|
|
|
11
11
|
namespace facebook::react::jsinspector_modern {
|
|
12
12
|
|
|
13
13
|
HostTargetTraceRecording::HostTargetTraceRecording(
|
|
14
|
+
HostTarget& hostTarget,
|
|
14
15
|
tracing::Mode tracingMode,
|
|
15
|
-
|
|
16
|
-
:
|
|
16
|
+
std::set<tracing::Category> enabledCategories)
|
|
17
|
+
: hostTarget_(hostTarget),
|
|
18
|
+
tracingMode_(tracingMode),
|
|
19
|
+
enabledCategories_(std::move(enabledCategories)) {}
|
|
17
20
|
|
|
18
21
|
void HostTargetTraceRecording::setTracedInstance(
|
|
19
22
|
InstanceTarget* instanceTarget) {
|
|
@@ -32,6 +35,7 @@ void HostTargetTraceRecording::start() {
|
|
|
32
35
|
state_ = tracing::TraceRecordingState{
|
|
33
36
|
.mode = tracingMode_,
|
|
34
37
|
.startTime = HighResTimeStamp::now(),
|
|
38
|
+
.enabledCategories = enabledCategories_,
|
|
35
39
|
};
|
|
36
40
|
hostTracingAgent_ = hostTarget_.createTracingAgent(*state_);
|
|
37
41
|
}
|
|
@@ -12,8 +12,10 @@
|
|
|
12
12
|
#include "InstanceTarget.h"
|
|
13
13
|
|
|
14
14
|
#include <jsinspector-modern/tracing/TraceRecordingState.h>
|
|
15
|
+
#include <jsinspector-modern/tracing/TracingCategory.h>
|
|
15
16
|
|
|
16
17
|
#include <optional>
|
|
18
|
+
#include <set>
|
|
17
19
|
|
|
18
20
|
namespace facebook::react::jsinspector_modern {
|
|
19
21
|
|
|
@@ -28,7 +30,10 @@ namespace facebook::react::jsinspector_modern {
|
|
|
28
30
|
*/
|
|
29
31
|
class HostTargetTraceRecording {
|
|
30
32
|
public:
|
|
31
|
-
explicit HostTargetTraceRecording(
|
|
33
|
+
explicit HostTargetTraceRecording(
|
|
34
|
+
HostTarget &hostTarget,
|
|
35
|
+
tracing::Mode tracingMode,
|
|
36
|
+
std::set<tracing::Category> enabledCategories);
|
|
32
37
|
|
|
33
38
|
inline bool isBackgroundInitiated() const
|
|
34
39
|
{
|
|
@@ -61,14 +66,14 @@ class HostTargetTraceRecording {
|
|
|
61
66
|
|
|
62
67
|
private:
|
|
63
68
|
/**
|
|
64
|
-
* The
|
|
69
|
+
* The Host for which this Trace Recording is going to happen.
|
|
65
70
|
*/
|
|
66
|
-
|
|
71
|
+
HostTarget &hostTarget_;
|
|
67
72
|
|
|
68
73
|
/**
|
|
69
|
-
* The
|
|
74
|
+
* The mode in which this trace recording was initialized.
|
|
70
75
|
*/
|
|
71
|
-
|
|
76
|
+
tracing::Mode tracingMode_;
|
|
72
77
|
|
|
73
78
|
/**
|
|
74
79
|
* The state of the current Trace Recording.
|
|
@@ -81,6 +86,11 @@ class HostTargetTraceRecording {
|
|
|
81
86
|
* Only allocated if the recording is enabled.
|
|
82
87
|
*/
|
|
83
88
|
std::shared_ptr<HostTracingAgent> hostTracingAgent_;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The list of categories that are enabled for this recording.
|
|
92
|
+
*/
|
|
93
|
+
std::set<tracing::Category> enabledCategories_;
|
|
84
94
|
};
|
|
85
95
|
|
|
86
96
|
} // namespace facebook::react::jsinspector_modern
|
|
@@ -12,8 +12,10 @@
|
|
|
12
12
|
|
|
13
13
|
namespace facebook::react::jsinspector_modern {
|
|
14
14
|
|
|
15
|
-
bool HostTargetController::startTracing(
|
|
16
|
-
|
|
15
|
+
bool HostTargetController::startTracing(
|
|
16
|
+
tracing::Mode tracingMode,
|
|
17
|
+
std::set<tracing::Category> enabledCategories) {
|
|
18
|
+
return target_.startTracing(tracingMode, std::move(enabledCategories));
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
tracing::TraceRecordingState HostTargetController::stopTracing() {
|
|
@@ -27,7 +29,9 @@ std::shared_ptr<HostTracingAgent> HostTarget::createTracingAgent(
|
|
|
27
29
|
return agent;
|
|
28
30
|
}
|
|
29
31
|
|
|
30
|
-
bool HostTarget::startTracing(
|
|
32
|
+
bool HostTarget::startTracing(
|
|
33
|
+
tracing::Mode tracingMode,
|
|
34
|
+
std::set<tracing::Category> enabledCategories) {
|
|
31
35
|
if (traceRecording_ != nullptr) {
|
|
32
36
|
if (traceRecording_->isBackgroundInitiated() &&
|
|
33
37
|
tracingMode == tracing::Mode::CDP) {
|
|
@@ -37,8 +41,8 @@ bool HostTarget::startTracing(tracing::Mode tracingMode) {
|
|
|
37
41
|
}
|
|
38
42
|
}
|
|
39
43
|
|
|
40
|
-
traceRecording_ =
|
|
41
|
-
std::
|
|
44
|
+
traceRecording_ = std::make_unique<HostTargetTraceRecording>(
|
|
45
|
+
*this, tracingMode, std::move(enabledCategories));
|
|
42
46
|
traceRecording_->setTracedInstance(currentInstance_.get());
|
|
43
47
|
traceRecording_->start();
|
|
44
48
|
|
|
@@ -152,13 +152,14 @@ RuntimeTracingAgent::RuntimeTracingAgent(
|
|
|
152
152
|
tracing::TraceRecordingState& state,
|
|
153
153
|
RuntimeTargetController& targetController)
|
|
154
154
|
: tracing::TargetTracingAgent(state), targetController_(targetController) {
|
|
155
|
-
if (state.
|
|
155
|
+
if (state.enabledCategories.contains(tracing::Category::JavaScriptSampling)) {
|
|
156
156
|
targetController_.enableSamplingProfiler();
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
RuntimeTracingAgent::~RuntimeTracingAgent() {
|
|
161
|
-
if (state_.
|
|
161
|
+
if (state_.enabledCategories.contains(
|
|
162
|
+
tracing::Category::JavaScriptSampling)) {
|
|
162
163
|
targetController_.disableSamplingProfiler();
|
|
163
164
|
auto profile = targetController_.collectSamplingProfile();
|
|
164
165
|
|
|
@@ -59,8 +59,25 @@ bool TracingAgent::handleRequest(const cdp::PreparsedRequest& req) {
|
|
|
59
59
|
return true;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
/**
|
|
63
|
+
* This logic has to be updated with the next upgrade of Chrome
|
|
64
|
+
* DevTools Frotnend fork.
|
|
65
|
+
*
|
|
66
|
+
* At the moment of writing this, our fork uses categories field, which is
|
|
67
|
+
* marked as depreacted in CDP spec.
|
|
68
|
+
*
|
|
69
|
+
* Latest versions of Chrome DevTools in stable channel of Chromium are
|
|
70
|
+
* already using traceConfig field.
|
|
71
|
+
*/
|
|
72
|
+
std::set<tracing::Category> enabledCategories;
|
|
73
|
+
if (req.params.isObject() && req.params.count("categories") != 0 &&
|
|
74
|
+
req.params["categories"].isString()) {
|
|
75
|
+
enabledCategories = tracing::parseSerializedTracingCategories(
|
|
76
|
+
req.params["categories"].getString());
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
bool didNotHaveAlreadyRunningRecording = hostTargetController_.startTracing(
|
|
80
|
+
tracing::Mode::CDP, std::move(enabledCategories));
|
|
64
81
|
if (!didNotHaveAlreadyRunningRecording) {
|
|
65
82
|
frontendChannel_(
|
|
66
83
|
cdp::jsonError(
|