react-native 0.74.0 → 0.74.1
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/AppDelegate/RCTAppDelegate+Protected.h +16 -0
- package/Libraries/AppDelegate/RCTAppDelegate.mm +32 -1
- package/Libraries/AppDelegate/React-RCTAppDelegate.podspec +1 -0
- package/Libraries/Components/Touchable/TouchableBounce.js +1 -0
- package/Libraries/Components/Touchable/TouchableOpacity.js +1 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTUtils.m +28 -8
- package/React/Base/RCTVersion.m +1 -1
- package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.mm +0 -3
- package/React/Fabric/Mounting/ComponentViews/Root/RCTRootComponentView.mm +22 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +5 -1
- package/React/Fabric/RCTScheduler.h +2 -0
- package/React/Fabric/RCTScheduler.mm +6 -0
- package/React/Fabric/RCTSurfacePresenter.mm +5 -0
- package/React/Modules/RCTUIManager.m +8 -9
- package/React/Views/RCTComponentData.m +14 -1
- package/ReactAndroid/api/ReactAndroid.api +1 -2
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/ReactActivity.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.java +24 -9
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt +15 -0
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +19 -7
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +31 -11
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +7 -3
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +7 -3
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +34 -12
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +7 -3
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessCatalystInstance.kt +11 -18
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.java +10 -0
- package/ReactAndroid/src/main/jni/react/fabric/Binding.cpp +38 -3
- package/ReactAndroid/src/main/jni/react/fabric/Binding.h +8 -0
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +43 -15
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +10 -4
- package/ReactCommon/ReactCommon.podspec +1 -0
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/jsc/JSCRuntime.cpp +2 -0
- package/ReactCommon/jsinspector-modern/React-jsinspector.podspec +2 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +13 -5
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +16 -6
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +62 -26
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +8 -4
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +13 -5
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +4 -2
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +16 -6
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +7 -3
- package/ReactCommon/react/renderer/mounting/MountingTransaction.cpp +13 -0
- package/ReactCommon/react/renderer/mounting/MountingTransaction.h +9 -0
- package/ReactCommon/react/renderer/scheduler/Scheduler.cpp +7 -2
- package/ReactCommon/react/renderer/scheduler/SchedulerDelegate.h +11 -0
- package/package.json +11 -11
- package/scripts/cocoapods/privacy_manifest_utils.rb +172 -0
- package/scripts/cocoapods/utils.rb +1 -38
- package/scripts/react_native_pods.rb +12 -3
- package/sdks/.hermesversion +1 -1
- package/sdks/hermesc/osx-bin/hermes +0 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/src/private/featureflags/NativeReactNativeFeatureFlags.js +4 -2
- package/src/private/featureflags/ReactNativeFeatureFlags.js +16 -6
- package/template/package.json +5 -5
- package/third-party-podspecs/RCT-Folly.podspec +1 -0
|
@@ -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<<e02f6a9473a98f27ee44ff303db9e0b7>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -25,10 +25,12 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
|
|
|
25
25
|
private val accessedFeatureFlags = mutableSetOf<String>()
|
|
26
26
|
|
|
27
27
|
private var commonTestFlagCache: Boolean? = null
|
|
28
|
+
private var androidEnablePendingFabricTransactionsCache: Boolean? = null
|
|
29
|
+
private var batchRenderingUpdatesInEventLoopCache: Boolean? = null
|
|
30
|
+
private var destroyFabricSurfacesInReactInstanceManagerCache: Boolean? = null
|
|
28
31
|
private var enableBackgroundExecutorCache: Boolean? = null
|
|
29
32
|
private var useModernRuntimeSchedulerCache: Boolean? = null
|
|
30
33
|
private var enableMicrotasksCache: Boolean? = null
|
|
31
|
-
private var batchRenderingUpdatesInEventLoopCache: Boolean? = null
|
|
32
34
|
private var enableSpannableBuildingUnificationCache: Boolean? = null
|
|
33
35
|
private var enableCustomDrawOrderFabricCache: Boolean? = null
|
|
34
36
|
private var enableFixForClippedSubviewsCrashCache: Boolean? = null
|
|
@@ -45,6 +47,36 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
|
|
|
45
47
|
return cached
|
|
46
48
|
}
|
|
47
49
|
|
|
50
|
+
override fun androidEnablePendingFabricTransactions(): Boolean {
|
|
51
|
+
var cached = androidEnablePendingFabricTransactionsCache
|
|
52
|
+
if (cached == null) {
|
|
53
|
+
cached = currentProvider.androidEnablePendingFabricTransactions()
|
|
54
|
+
accessedFeatureFlags.add("androidEnablePendingFabricTransactions")
|
|
55
|
+
androidEnablePendingFabricTransactionsCache = cached
|
|
56
|
+
}
|
|
57
|
+
return cached
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
override fun batchRenderingUpdatesInEventLoop(): Boolean {
|
|
61
|
+
var cached = batchRenderingUpdatesInEventLoopCache
|
|
62
|
+
if (cached == null) {
|
|
63
|
+
cached = currentProvider.batchRenderingUpdatesInEventLoop()
|
|
64
|
+
accessedFeatureFlags.add("batchRenderingUpdatesInEventLoop")
|
|
65
|
+
batchRenderingUpdatesInEventLoopCache = cached
|
|
66
|
+
}
|
|
67
|
+
return cached
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
override fun destroyFabricSurfacesInReactInstanceManager(): Boolean {
|
|
71
|
+
var cached = destroyFabricSurfacesInReactInstanceManagerCache
|
|
72
|
+
if (cached == null) {
|
|
73
|
+
cached = currentProvider.destroyFabricSurfacesInReactInstanceManager()
|
|
74
|
+
accessedFeatureFlags.add("destroyFabricSurfacesInReactInstanceManager")
|
|
75
|
+
destroyFabricSurfacesInReactInstanceManagerCache = cached
|
|
76
|
+
}
|
|
77
|
+
return cached
|
|
78
|
+
}
|
|
79
|
+
|
|
48
80
|
override fun enableBackgroundExecutor(): Boolean {
|
|
49
81
|
var cached = enableBackgroundExecutorCache
|
|
50
82
|
if (cached == null) {
|
|
@@ -75,16 +107,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
|
|
|
75
107
|
return cached
|
|
76
108
|
}
|
|
77
109
|
|
|
78
|
-
override fun batchRenderingUpdatesInEventLoop(): Boolean {
|
|
79
|
-
var cached = batchRenderingUpdatesInEventLoopCache
|
|
80
|
-
if (cached == null) {
|
|
81
|
-
cached = currentProvider.batchRenderingUpdatesInEventLoop()
|
|
82
|
-
accessedFeatureFlags.add("batchRenderingUpdatesInEventLoop")
|
|
83
|
-
batchRenderingUpdatesInEventLoopCache = cached
|
|
84
|
-
}
|
|
85
|
-
return cached
|
|
86
|
-
}
|
|
87
|
-
|
|
88
110
|
override fun enableSpannableBuildingUnification(): Boolean {
|
|
89
111
|
var cached = enableSpannableBuildingUnificationCache
|
|
90
112
|
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<<9190129a45a19b25dd23126f05b03356>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -25,14 +25,18 @@ import com.facebook.proguard.annotations.DoNotStrip
|
|
|
25
25
|
public interface ReactNativeFeatureFlagsProvider {
|
|
26
26
|
@DoNotStrip public fun commonTestFlag(): Boolean
|
|
27
27
|
|
|
28
|
+
@DoNotStrip public fun androidEnablePendingFabricTransactions(): Boolean
|
|
29
|
+
|
|
30
|
+
@DoNotStrip public fun batchRenderingUpdatesInEventLoop(): Boolean
|
|
31
|
+
|
|
32
|
+
@DoNotStrip public fun destroyFabricSurfacesInReactInstanceManager(): Boolean
|
|
33
|
+
|
|
28
34
|
@DoNotStrip public fun enableBackgroundExecutor(): Boolean
|
|
29
35
|
|
|
30
36
|
@DoNotStrip public fun useModernRuntimeScheduler(): Boolean
|
|
31
37
|
|
|
32
38
|
@DoNotStrip public fun enableMicrotasks(): Boolean
|
|
33
39
|
|
|
34
|
-
@DoNotStrip public fun batchRenderingUpdatesInEventLoop(): Boolean
|
|
35
|
-
|
|
36
40
|
@DoNotStrip public fun enableSpannableBuildingUnification(): Boolean
|
|
37
41
|
|
|
38
42
|
@DoNotStrip public fun enableCustomDrawOrderFabric(): Boolean
|
|
@@ -92,25 +92,20 @@ public class BridgelessCatalystInstance(private val reactHost: ReactHostImpl) :
|
|
|
92
92
|
throw UnsupportedOperationException("Unimplemented method 'initialize'")
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
override fun getReactQueueConfiguration(): ReactQueueConfiguration
|
|
96
|
-
|
|
97
|
-
}
|
|
95
|
+
override fun getReactQueueConfiguration(): ReactQueueConfiguration =
|
|
96
|
+
reactHost.reactQueueConfiguration!!
|
|
98
97
|
|
|
99
|
-
override fun <T : JavaScriptModule> getJSModule(jsInterface: Class<T>): T
|
|
100
|
-
|
|
101
|
-
}
|
|
98
|
+
override fun <T : JavaScriptModule> getJSModule(jsInterface: Class<T>): T =
|
|
99
|
+
reactHost.currentReactContext?.getJSModule(jsInterface)!!
|
|
102
100
|
|
|
103
|
-
override fun <T : NativeModule> hasNativeModule(nativeModuleInterface: Class<T>): Boolean
|
|
104
|
-
|
|
105
|
-
}
|
|
101
|
+
override fun <T : NativeModule> hasNativeModule(nativeModuleInterface: Class<T>): Boolean =
|
|
102
|
+
reactHost.hasNativeModule(nativeModuleInterface)
|
|
106
103
|
|
|
107
|
-
override fun <T : NativeModule> getNativeModule(nativeModuleInterface: Class<T>): T?
|
|
108
|
-
|
|
109
|
-
}
|
|
104
|
+
override fun <T : NativeModule> getNativeModule(nativeModuleInterface: Class<T>): T? =
|
|
105
|
+
reactHost.getNativeModule(nativeModuleInterface)
|
|
110
106
|
|
|
111
|
-
override fun getNativeModule(moduleName: String): NativeModule?
|
|
112
|
-
|
|
113
|
-
}
|
|
107
|
+
override fun getNativeModule(moduleName: String): NativeModule? =
|
|
108
|
+
reactHost.getNativeModule(moduleName)
|
|
114
109
|
|
|
115
110
|
@Deprecated(
|
|
116
111
|
message =
|
|
@@ -119,9 +114,7 @@ public class BridgelessCatalystInstance(private val reactHost: ReactHostImpl) :
|
|
|
119
114
|
throw UnsupportedOperationException("Unimplemented method 'getJSIModule'")
|
|
120
115
|
}
|
|
121
116
|
|
|
122
|
-
override fun getNativeModules(): Collection<NativeModule>
|
|
123
|
-
throw UnsupportedOperationException("Unimplemented method 'getNativeModules'")
|
|
124
|
-
}
|
|
117
|
+
override fun getNativeModules(): Collection<NativeModule> = reactHost.getNativeModules()
|
|
125
118
|
|
|
126
119
|
override fun extendNativeModules(modules: NativeModuleRegistry) {
|
|
127
120
|
throw UnsupportedOperationException("Unimplemented method 'extendNativeModules'")
|
|
@@ -592,6 +592,16 @@ public class ReactHostImpl implements ReactHost {
|
|
|
592
592
|
return null;
|
|
593
593
|
}
|
|
594
594
|
|
|
595
|
+
/* package */
|
|
596
|
+
@Nullable
|
|
597
|
+
NativeModule getNativeModule(String nativeModuleName) {
|
|
598
|
+
final ReactInstance reactInstance = mReactInstanceTaskRef.get().getResult();
|
|
599
|
+
if (reactInstance != null) {
|
|
600
|
+
return reactInstance.getNativeModule(nativeModuleName);
|
|
601
|
+
}
|
|
602
|
+
return null;
|
|
603
|
+
}
|
|
604
|
+
|
|
595
605
|
/* package */
|
|
596
606
|
@Nullable
|
|
597
607
|
RuntimeExecutor getRuntimeExecutor() {
|
|
@@ -474,8 +474,7 @@ std::shared_ptr<FabricMountingManager> Binding::getMountingManager(
|
|
|
474
474
|
|
|
475
475
|
void Binding::schedulerDidFinishTransaction(
|
|
476
476
|
const MountingCoordinator::Shared& mountingCoordinator) {
|
|
477
|
-
|
|
478
|
-
if (!mountingManager) {
|
|
477
|
+
if (!ReactNativeFeatureFlags::androidEnablePendingFabricTransactions()) {
|
|
479
478
|
return;
|
|
480
479
|
}
|
|
481
480
|
|
|
@@ -483,7 +482,43 @@ void Binding::schedulerDidFinishTransaction(
|
|
|
483
482
|
if (!mountingTransaction.has_value()) {
|
|
484
483
|
return;
|
|
485
484
|
}
|
|
486
|
-
|
|
485
|
+
|
|
486
|
+
std::unique_lock<std::mutex> lock(pendingTransactionsMutex_);
|
|
487
|
+
auto pendingTransaction = std::find_if(
|
|
488
|
+
pendingTransactions_.begin(),
|
|
489
|
+
pendingTransactions_.end(),
|
|
490
|
+
[&](const auto& transaction) {
|
|
491
|
+
return transaction.getSurfaceId() ==
|
|
492
|
+
mountingTransaction->getSurfaceId();
|
|
493
|
+
});
|
|
494
|
+
|
|
495
|
+
if (pendingTransaction != pendingTransactions_.end()) {
|
|
496
|
+
pendingTransaction->mergeWith(std::move(*mountingTransaction));
|
|
497
|
+
} else {
|
|
498
|
+
pendingTransactions_.push_back(std::move(*mountingTransaction));
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
void Binding::schedulerShouldRenderTransactions(
|
|
503
|
+
const MountingCoordinator::Shared& mountingCoordinator) {
|
|
504
|
+
auto mountingManager =
|
|
505
|
+
getMountingManager("schedulerShouldRenderTransactions");
|
|
506
|
+
if (!mountingManager) {
|
|
507
|
+
return;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
if (ReactNativeFeatureFlags::androidEnablePendingFabricTransactions()) {
|
|
511
|
+
std::unique_lock<std::mutex> lock(pendingTransactionsMutex_);
|
|
512
|
+
for (auto& transaction : pendingTransactions_) {
|
|
513
|
+
mountingManager->executeMount(transaction);
|
|
514
|
+
}
|
|
515
|
+
pendingTransactions_.clear();
|
|
516
|
+
} else {
|
|
517
|
+
auto mountingTransaction = mountingCoordinator->pullTransaction();
|
|
518
|
+
if (mountingTransaction.has_value()) {
|
|
519
|
+
mountingManager->executeMount(*mountingTransaction);
|
|
520
|
+
}
|
|
521
|
+
}
|
|
487
522
|
}
|
|
488
523
|
|
|
489
524
|
void Binding::schedulerDidRequestPreliminaryViewAllocation(
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
#pragma once
|
|
9
9
|
|
|
10
10
|
#include <memory>
|
|
11
|
+
#include <mutex>
|
|
11
12
|
#include <shared_mutex>
|
|
12
13
|
#include <unordered_map>
|
|
13
14
|
|
|
@@ -101,6 +102,9 @@ class Binding : public jni::HybridClass<Binding, JBinding>,
|
|
|
101
102
|
void schedulerDidFinishTransaction(
|
|
102
103
|
const MountingCoordinator::Shared& mountingCoordinator) override;
|
|
103
104
|
|
|
105
|
+
void schedulerShouldRenderTransactions(
|
|
106
|
+
const MountingCoordinator::Shared& mountingCoordinator) override;
|
|
107
|
+
|
|
104
108
|
void schedulerDidRequestPreliminaryViewAllocation(
|
|
105
109
|
const SurfaceId surfaceId,
|
|
106
110
|
const ShadowNode& shadowNode) override;
|
|
@@ -146,6 +150,10 @@ class Binding : public jni::HybridClass<Binding, JBinding>,
|
|
|
146
150
|
std::shared_mutex
|
|
147
151
|
surfaceHandlerRegistryMutex_; // Protects `surfaceHandlerRegistry_`.
|
|
148
152
|
|
|
153
|
+
// Track pending transactions, one per surfaceId
|
|
154
|
+
std::mutex pendingTransactionsMutex_;
|
|
155
|
+
std::vector<MountingTransaction> pendingTransactions_;
|
|
156
|
+
|
|
149
157
|
float pointScaleFactor_ = 1;
|
|
150
158
|
|
|
151
159
|
std::shared_ptr<const ReactNativeConfig> reactNativeConfig_{nullptr};
|
|
@@ -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<<7ab741aec808bc3a138470fe18ef8b8a>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -45,6 +45,24 @@ class ReactNativeFeatureFlagsProviderHolder
|
|
|
45
45
|
return method(javaProvider_);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
bool androidEnablePendingFabricTransactions() override {
|
|
49
|
+
static const auto method =
|
|
50
|
+
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("androidEnablePendingFabricTransactions");
|
|
51
|
+
return method(javaProvider_);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
bool batchRenderingUpdatesInEventLoop() override {
|
|
55
|
+
static const auto method =
|
|
56
|
+
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("batchRenderingUpdatesInEventLoop");
|
|
57
|
+
return method(javaProvider_);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
bool destroyFabricSurfacesInReactInstanceManager() override {
|
|
61
|
+
static const auto method =
|
|
62
|
+
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("destroyFabricSurfacesInReactInstanceManager");
|
|
63
|
+
return method(javaProvider_);
|
|
64
|
+
}
|
|
65
|
+
|
|
48
66
|
bool enableBackgroundExecutor() override {
|
|
49
67
|
static const auto method =
|
|
50
68
|
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableBackgroundExecutor");
|
|
@@ -63,12 +81,6 @@ class ReactNativeFeatureFlagsProviderHolder
|
|
|
63
81
|
return method(javaProvider_);
|
|
64
82
|
}
|
|
65
83
|
|
|
66
|
-
bool batchRenderingUpdatesInEventLoop() override {
|
|
67
|
-
static const auto method =
|
|
68
|
-
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("batchRenderingUpdatesInEventLoop");
|
|
69
|
-
return method(javaProvider_);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
84
|
bool enableSpannableBuildingUnification() override {
|
|
73
85
|
static const auto method =
|
|
74
86
|
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableSpannableBuildingUnification");
|
|
@@ -108,6 +120,21 @@ bool JReactNativeFeatureFlagsCxxInterop::commonTestFlag(
|
|
|
108
120
|
return ReactNativeFeatureFlags::commonTestFlag();
|
|
109
121
|
}
|
|
110
122
|
|
|
123
|
+
bool JReactNativeFeatureFlagsCxxInterop::androidEnablePendingFabricTransactions(
|
|
124
|
+
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
125
|
+
return ReactNativeFeatureFlags::androidEnablePendingFabricTransactions();
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
bool JReactNativeFeatureFlagsCxxInterop::batchRenderingUpdatesInEventLoop(
|
|
129
|
+
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
130
|
+
return ReactNativeFeatureFlags::batchRenderingUpdatesInEventLoop();
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
bool JReactNativeFeatureFlagsCxxInterop::destroyFabricSurfacesInReactInstanceManager(
|
|
134
|
+
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
135
|
+
return ReactNativeFeatureFlags::destroyFabricSurfacesInReactInstanceManager();
|
|
136
|
+
}
|
|
137
|
+
|
|
111
138
|
bool JReactNativeFeatureFlagsCxxInterop::enableBackgroundExecutor(
|
|
112
139
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
113
140
|
return ReactNativeFeatureFlags::enableBackgroundExecutor();
|
|
@@ -123,11 +150,6 @@ bool JReactNativeFeatureFlagsCxxInterop::enableMicrotasks(
|
|
|
123
150
|
return ReactNativeFeatureFlags::enableMicrotasks();
|
|
124
151
|
}
|
|
125
152
|
|
|
126
|
-
bool JReactNativeFeatureFlagsCxxInterop::batchRenderingUpdatesInEventLoop(
|
|
127
|
-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
128
|
-
return ReactNativeFeatureFlags::batchRenderingUpdatesInEventLoop();
|
|
129
|
-
}
|
|
130
|
-
|
|
131
153
|
bool JReactNativeFeatureFlagsCxxInterop::enableSpannableBuildingUnification(
|
|
132
154
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
133
155
|
return ReactNativeFeatureFlags::enableSpannableBuildingUnification();
|
|
@@ -173,6 +195,15 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
|
|
|
173
195
|
makeNativeMethod(
|
|
174
196
|
"commonTestFlag",
|
|
175
197
|
JReactNativeFeatureFlagsCxxInterop::commonTestFlag),
|
|
198
|
+
makeNativeMethod(
|
|
199
|
+
"androidEnablePendingFabricTransactions",
|
|
200
|
+
JReactNativeFeatureFlagsCxxInterop::androidEnablePendingFabricTransactions),
|
|
201
|
+
makeNativeMethod(
|
|
202
|
+
"batchRenderingUpdatesInEventLoop",
|
|
203
|
+
JReactNativeFeatureFlagsCxxInterop::batchRenderingUpdatesInEventLoop),
|
|
204
|
+
makeNativeMethod(
|
|
205
|
+
"destroyFabricSurfacesInReactInstanceManager",
|
|
206
|
+
JReactNativeFeatureFlagsCxxInterop::destroyFabricSurfacesInReactInstanceManager),
|
|
176
207
|
makeNativeMethod(
|
|
177
208
|
"enableBackgroundExecutor",
|
|
178
209
|
JReactNativeFeatureFlagsCxxInterop::enableBackgroundExecutor),
|
|
@@ -182,9 +213,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
|
|
|
182
213
|
makeNativeMethod(
|
|
183
214
|
"enableMicrotasks",
|
|
184
215
|
JReactNativeFeatureFlagsCxxInterop::enableMicrotasks),
|
|
185
|
-
makeNativeMethod(
|
|
186
|
-
"batchRenderingUpdatesInEventLoop",
|
|
187
|
-
JReactNativeFeatureFlagsCxxInterop::batchRenderingUpdatesInEventLoop),
|
|
188
216
|
makeNativeMethod(
|
|
189
217
|
"enableSpannableBuildingUnification",
|
|
190
218
|
JReactNativeFeatureFlagsCxxInterop::enableSpannableBuildingUnification),
|
|
@@ -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<<0d37cc1fb8217b0f4a849e178ec2ec68>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -33,6 +33,15 @@ class JReactNativeFeatureFlagsCxxInterop
|
|
|
33
33
|
static bool commonTestFlag(
|
|
34
34
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
35
35
|
|
|
36
|
+
static bool androidEnablePendingFabricTransactions(
|
|
37
|
+
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
38
|
+
|
|
39
|
+
static bool batchRenderingUpdatesInEventLoop(
|
|
40
|
+
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
41
|
+
|
|
42
|
+
static bool destroyFabricSurfacesInReactInstanceManager(
|
|
43
|
+
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
44
|
+
|
|
36
45
|
static bool enableBackgroundExecutor(
|
|
37
46
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
38
47
|
|
|
@@ -42,9 +51,6 @@ class JReactNativeFeatureFlagsCxxInterop
|
|
|
42
51
|
static bool enableMicrotasks(
|
|
43
52
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
44
53
|
|
|
45
|
-
static bool batchRenderingUpdatesInEventLoop(
|
|
46
|
-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
47
|
-
|
|
48
54
|
static bool enableSpannableBuildingUnification(
|
|
49
55
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
50
56
|
|
|
@@ -36,6 +36,7 @@ Pod::Spec.new do |s|
|
|
|
36
36
|
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
|
|
37
37
|
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\" \"$(PODS_ROOT)/Headers/Private/React-Core\"",
|
|
38
38
|
"USE_HEADERMAP" => "YES",
|
|
39
|
+
"DEFINES_MODULE" => "YES",
|
|
39
40
|
"CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
|
|
40
41
|
"GCC_WARN_PEDANTIC" => "YES" }
|
|
41
42
|
if ENV['USE_FRAMEWORKS']
|
|
@@ -370,11 +370,13 @@ JSCRuntime::JSCRuntime(JSGlobalContextRef ctx)
|
|
|
370
370
|
{
|
|
371
371
|
#ifndef NDEBUG
|
|
372
372
|
#ifdef _JSC_HAS_INSPECTABLE
|
|
373
|
+
#if (__OSX_AVAILABLE_STARTING(MAC_NA, IPHONE_16_4))
|
|
373
374
|
if (__builtin_available(macOS 13.3, iOS 16.4, tvOS 16.4, *)) {
|
|
374
375
|
JSGlobalContextSetInspectable(ctx_, true);
|
|
375
376
|
}
|
|
376
377
|
#endif
|
|
377
378
|
#endif
|
|
379
|
+
#endif
|
|
378
380
|
}
|
|
379
381
|
|
|
380
382
|
JSCRuntime::~JSCRuntime() {
|
|
@@ -38,7 +38,8 @@ Pod::Spec.new do |s|
|
|
|
38
38
|
s.compiler_flags = folly_compiler_flags
|
|
39
39
|
s.pod_target_xcconfig = {
|
|
40
40
|
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/..\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\"",
|
|
41
|
-
"CLANG_CXX_LANGUAGE_STANDARD" => "c++20"
|
|
41
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
|
|
42
|
+
"DEFINES_MODULE" => "YES"
|
|
42
43
|
}.merge!(use_frameworks ? {
|
|
43
44
|
"PUBLIC_HEADERS_FOLDER_PATH" => "#{module_name}.framework/Headers/#{header_dir}"
|
|
44
45
|
} : {})
|
|
@@ -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<<7ba277e9902ca2a0b171daf223644b89>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -25,6 +25,18 @@ bool ReactNativeFeatureFlags::commonTestFlag() {
|
|
|
25
25
|
return getAccessor().commonTestFlag();
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
bool ReactNativeFeatureFlags::androidEnablePendingFabricTransactions() {
|
|
29
|
+
return getAccessor().androidEnablePendingFabricTransactions();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
bool ReactNativeFeatureFlags::batchRenderingUpdatesInEventLoop() {
|
|
33
|
+
return getAccessor().batchRenderingUpdatesInEventLoop();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
bool ReactNativeFeatureFlags::destroyFabricSurfacesInReactInstanceManager() {
|
|
37
|
+
return getAccessor().destroyFabricSurfacesInReactInstanceManager();
|
|
38
|
+
}
|
|
39
|
+
|
|
28
40
|
bool ReactNativeFeatureFlags::enableBackgroundExecutor() {
|
|
29
41
|
return getAccessor().enableBackgroundExecutor();
|
|
30
42
|
}
|
|
@@ -37,10 +49,6 @@ bool ReactNativeFeatureFlags::enableMicrotasks() {
|
|
|
37
49
|
return getAccessor().enableMicrotasks();
|
|
38
50
|
}
|
|
39
51
|
|
|
40
|
-
bool ReactNativeFeatureFlags::batchRenderingUpdatesInEventLoop() {
|
|
41
|
-
return getAccessor().batchRenderingUpdatesInEventLoop();
|
|
42
|
-
}
|
|
43
|
-
|
|
44
52
|
bool ReactNativeFeatureFlags::enableSpannableBuildingUnification() {
|
|
45
53
|
return getAccessor().enableSpannableBuildingUnification();
|
|
46
54
|
}
|
|
@@ -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<<bf4d30ecf78c8d2f65741c16d8d07bde>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -38,6 +38,21 @@ class ReactNativeFeatureFlags {
|
|
|
38
38
|
*/
|
|
39
39
|
static bool commonTestFlag();
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* To be used with batchRenderingUpdatesInEventLoop. When enbled, the Android mounting layer will concatenate pending transactions to ensure they're applied atomatically
|
|
43
|
+
*/
|
|
44
|
+
static bool androidEnablePendingFabricTransactions();
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* When enabled, the RuntimeScheduler processing the event loop will batch all rendering updates and dispatch them together at the end of each iteration of the loop.
|
|
48
|
+
*/
|
|
49
|
+
static bool batchRenderingUpdatesInEventLoop();
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* When enabled, ReactInstanceManager will clean up Fabric surfaces on destroy().
|
|
53
|
+
*/
|
|
54
|
+
static bool destroyFabricSurfacesInReactInstanceManager();
|
|
55
|
+
|
|
41
56
|
/**
|
|
42
57
|
* Enables the use of a background executor to compute layout and commit updates on Fabric (this system is deprecated and should not be used).
|
|
43
58
|
*/
|
|
@@ -53,11 +68,6 @@ class ReactNativeFeatureFlags {
|
|
|
53
68
|
*/
|
|
54
69
|
static bool enableMicrotasks();
|
|
55
70
|
|
|
56
|
-
/**
|
|
57
|
-
* When enabled, the RuntimeScheduler processing the event loop will batch all rendering updates and dispatch them together at the end of each iteration of the loop.
|
|
58
|
-
*/
|
|
59
|
-
static bool batchRenderingUpdatesInEventLoop();
|
|
60
|
-
|
|
61
71
|
/**
|
|
62
72
|
* Uses new, deduplicated logic for constructing Android Spannables from text fragments
|
|
63
73
|
*/
|