Remove inspectorEnableCxxInspectorPackagerConnection flag (#44662)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44662

- Remove `inspectorEnableCxxInspectorPackagerConnection` feature flag.
- Replace existing checks with `getEnableModernCDPRegistry()`.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D57730921

fbshipit-source-id: fd13b84a826a4fa5973053a721d311c7d68dd2f5
This commit is contained in:
Alex Hunt
2024-05-26 10:48:48 -07:00
committed by Facebook GitHub Bot
parent e363eeb53e
commit a908387b73
31 changed files with 34 additions and 185 deletions
@@ -182,9 +182,10 @@ static void sendEventToAllConnections(NSString *event)
NSString *key = [inspectorURL absoluteString];
id<RCTInspectorPackagerConnectionProtocol> connection = socketConnections[key];
if (!connection || !connection.isConnected) {
if (facebook::react::jsinspector_modern::InspectorFlags::getInstance().getEnableCxxInspectorPackagerConnection()) {
if (facebook::react::jsinspector_modern::InspectorFlags::getInstance().getEnableModernCDPRegistry()) {
connection = [[RCTCxxInspectorPackagerConnection alloc] initWithURL:inspectorURL];
} else {
// TODO(T190163403): Remove legacy RCTInspectorPackagerConnection
connection = [[RCTInspectorPackagerConnection alloc] initWithURL:inspectorURL];
}
@@ -2182,7 +2182,6 @@ public abstract interface class com/facebook/react/devsupport/HMRClient : com/fa
public final class com/facebook/react/devsupport/InspectorFlags {
public static final field INSTANCE Lcom/facebook/react/devsupport/InspectorFlags;
public static final fun getEnableCxxInspectorPackagerConnection ()Z
public static final fun getEnableModernCDPRegistry ()Z
}
@@ -210,10 +210,11 @@ public class DevServerHelper {
new AsyncTask<Void, Void, Void>() {
@Override
protected Void doInBackground(Void... params) {
if (InspectorFlags.getEnableCxxInspectorPackagerConnection()) {
if (InspectorFlags.getEnableModernCDPRegistry()) {
mInspectorPackagerConnection =
new CxxInspectorPackagerConnection(getInspectorDeviceUrl(), mPackageName);
} else {
// TODO(T190163403): Remove legacy InspectorPackagerConnection
mInspectorPackagerConnection =
new InspectorPackagerConnection(getInspectorDeviceUrl(), mPackageName);
}
@@ -17,6 +17,4 @@ public object InspectorFlags {
}
@DoNotStrip @JvmStatic public external fun getEnableModernCDPRegistry(): Boolean
@DoNotStrip @JvmStatic public external fun getEnableCxxInspectorPackagerConnection(): Boolean
}
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<0ae7be647ca12c3efcc34f6098155550>>
* @generated SignedSource<<53200319e16c1f14028d9cb8a2c87078>>
*/
/**
@@ -106,12 +106,6 @@ public object ReactNativeFeatureFlags {
@JvmStatic
public fun forceBatchingMountItemsOnAndroid(): Boolean = accessor.forceBatchingMountItemsOnAndroid()
/**
* Flag determining if the C++ implementation of InspectorPackagerConnection should be used instead of the per-platform one. This flag is global and should not be changed across React Host lifetimes.
*/
@JvmStatic
public fun inspectorEnableCxxInspectorPackagerConnection(): Boolean = accessor.inspectorEnableCxxInspectorPackagerConnection()
/**
* Flag determining if the modern CDP backend should be enabled. This flag is global and should not be changed across React Host lifetimes.
*/
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<5323fb8be9ec7ee6ac43d7f01bca020e>>
* @generated SignedSource<<54a79c6e6f4946c4c36692fbc19b927a>>
*/
/**
@@ -33,7 +33,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
private var enableUIConsistencyCache: Boolean? = null
private var fixStoppedSurfaceRemoveDeleteTreeUIFrameCallbackLeakCache: Boolean? = null
private var forceBatchingMountItemsOnAndroidCache: Boolean? = null
private var inspectorEnableCxxInspectorPackagerConnectionCache: Boolean? = null
private var inspectorEnableModernCDPRegistryCache: Boolean? = null
private var lazyAnimationCallbacksCache: Boolean? = null
private var preventDoubleTextMeasureCache: Boolean? = null
@@ -159,15 +158,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
return cached
}
override fun inspectorEnableCxxInspectorPackagerConnection(): Boolean {
var cached = inspectorEnableCxxInspectorPackagerConnectionCache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.inspectorEnableCxxInspectorPackagerConnection()
inspectorEnableCxxInspectorPackagerConnectionCache = cached
}
return cached
}
override fun inspectorEnableModernCDPRegistry(): Boolean {
var cached = inspectorEnableModernCDPRegistryCache
if (cached == null) {
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<e68ae1e7b4f0d7714722fb7b442c66c9>>
* @generated SignedSource<<4eee31ea22fc4116e9070f714dc59daf>>
*/
/**
@@ -54,8 +54,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
@DoNotStrip @JvmStatic public external fun forceBatchingMountItemsOnAndroid(): Boolean
@DoNotStrip @JvmStatic public external fun inspectorEnableCxxInspectorPackagerConnection(): Boolean
@DoNotStrip @JvmStatic public external fun inspectorEnableModernCDPRegistry(): Boolean
@DoNotStrip @JvmStatic public external fun lazyAnimationCallbacks(): Boolean
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<64ab913d2c940a7abfcd2aac32be1b72>>
* @generated SignedSource<<f29998f04860c4af0eb027b2e660c4b4>>
*/
/**
@@ -49,8 +49,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
override fun forceBatchingMountItemsOnAndroid(): Boolean = false
override fun inspectorEnableCxxInspectorPackagerConnection(): Boolean = false
override fun inspectorEnableModernCDPRegistry(): Boolean = false
override fun lazyAnimationCallbacks(): Boolean = false
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<00a695402781a9f3c45ba0594a785b57>>
* @generated SignedSource<<a2706af43bfe0803eab9a70d24cd79c9>>
*/
/**
@@ -37,7 +37,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
private var enableUIConsistencyCache: Boolean? = null
private var fixStoppedSurfaceRemoveDeleteTreeUIFrameCallbackLeakCache: Boolean? = null
private var forceBatchingMountItemsOnAndroidCache: Boolean? = null
private var inspectorEnableCxxInspectorPackagerConnectionCache: Boolean? = null
private var inspectorEnableModernCDPRegistryCache: Boolean? = null
private var lazyAnimationCallbacksCache: Boolean? = null
private var preventDoubleTextMeasureCache: Boolean? = null
@@ -176,16 +175,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
return cached
}
override fun inspectorEnableCxxInspectorPackagerConnection(): Boolean {
var cached = inspectorEnableCxxInspectorPackagerConnectionCache
if (cached == null) {
cached = currentProvider.inspectorEnableCxxInspectorPackagerConnection()
accessedFeatureFlags.add("inspectorEnableCxxInspectorPackagerConnection")
inspectorEnableCxxInspectorPackagerConnectionCache = cached
}
return cached
}
override fun inspectorEnableModernCDPRegistry(): Boolean {
var cached = inspectorEnableModernCDPRegistryCache
if (cached == null) {
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<e63ccfcb6e8d1db840cefb3d0a6df6cd>>
* @generated SignedSource<<fff46073d92efbec147cd2f1dad110cb>>
*/
/**
@@ -49,8 +49,6 @@ public interface ReactNativeFeatureFlagsProvider {
@DoNotStrip public fun forceBatchingMountItemsOnAndroid(): Boolean
@DoNotStrip public fun inspectorEnableCxxInspectorPackagerConnection(): Boolean
@DoNotStrip public fun inspectorEnableModernCDPRegistry(): Boolean
@DoNotStrip public fun lazyAnimationCallbacks(): Boolean
@@ -16,20 +16,11 @@ bool JInspectorFlags::getEnableModernCDPRegistry(jni::alias_ref<jclass>) {
return inspectorFlags.getEnableModernCDPRegistry();
}
bool JInspectorFlags::getEnableCxxInspectorPackagerConnection(
jni::alias_ref<jclass>) {
auto& inspectorFlags = InspectorFlags::getInstance();
return inspectorFlags.getEnableCxxInspectorPackagerConnection();
}
void JInspectorFlags::registerNatives() {
javaClassLocal()->registerNatives({
makeNativeMethod(
"getEnableModernCDPRegistry",
JInspectorFlags::getEnableModernCDPRegistry),
makeNativeMethod(
"getEnableCxxInspectorPackagerConnection",
JInspectorFlags::getEnableCxxInspectorPackagerConnection),
});
}
@@ -21,8 +21,6 @@ class JInspectorFlags : public jni::JavaClass<JInspectorFlags> {
static bool getEnableModernCDPRegistry(jni::alias_ref<jclass>);
static bool getEnableCxxInspectorPackagerConnection(jni::alias_ref<jclass>);
static void registerNatives();
private:
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<5d0f0b1953af3f0dd2ee66fed2b1115a>>
* @generated SignedSource<<f2a88e318efcf92bf7cd2b07e3ed5faf>>
*/
/**
@@ -117,12 +117,6 @@ class ReactNativeFeatureFlagsProviderHolder
return method(javaProvider_);
}
bool inspectorEnableCxxInspectorPackagerConnection() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("inspectorEnableCxxInspectorPackagerConnection");
return method(javaProvider_);
}
bool inspectorEnableModernCDPRegistry() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("inspectorEnableModernCDPRegistry");
@@ -234,11 +228,6 @@ bool JReactNativeFeatureFlagsCxxInterop::forceBatchingMountItemsOnAndroid(
return ReactNativeFeatureFlags::forceBatchingMountItemsOnAndroid();
}
bool JReactNativeFeatureFlagsCxxInterop::inspectorEnableCxxInspectorPackagerConnection(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::inspectorEnableCxxInspectorPackagerConnection();
}
bool JReactNativeFeatureFlagsCxxInterop::inspectorEnableModernCDPRegistry(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::inspectorEnableModernCDPRegistry();
@@ -330,9 +319,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"forceBatchingMountItemsOnAndroid",
JReactNativeFeatureFlagsCxxInterop::forceBatchingMountItemsOnAndroid),
makeNativeMethod(
"inspectorEnableCxxInspectorPackagerConnection",
JReactNativeFeatureFlagsCxxInterop::inspectorEnableCxxInspectorPackagerConnection),
makeNativeMethod(
"inspectorEnableModernCDPRegistry",
JReactNativeFeatureFlagsCxxInterop::inspectorEnableModernCDPRegistry),
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<d2f016e3a0648f6fd0b6c1f45b9a1f62>>
* @generated SignedSource<<48f683554e70183664d5a1bf6a7ab328>>
*/
/**
@@ -69,9 +69,6 @@ class JReactNativeFeatureFlagsCxxInterop
static bool forceBatchingMountItemsOnAndroid(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool inspectorEnableCxxInspectorPackagerConnection(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool inspectorEnableModernCDPRegistry(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
@@ -21,15 +21,6 @@ bool InspectorFlags::getEnableModernCDPRegistry() const {
return loadFlagsAndAssertUnchanged().enableModernCDPRegistry;
}
bool InspectorFlags::getEnableCxxInspectorPackagerConnection() const {
auto& values = loadFlagsAndAssertUnchanged();
return values.enableCxxInspectorPackagerConnection ||
// If we are using the modern CDP registry, then we must also use the C++
// InspectorPackagerConnection implementation.
values.enableModernCDPRegistry;
}
void InspectorFlags::dangerouslyResetFlags() {
*this = InspectorFlags{};
}
@@ -37,20 +28,13 @@ void InspectorFlags::dangerouslyResetFlags() {
const InspectorFlags::Values& InspectorFlags::loadFlagsAndAssertUnchanged()
const {
InspectorFlags::Values newValues = {
.enableCxxInspectorPackagerConnection =
#ifdef REACT_NATIVE_FORCE_ENABLE_FUSEBOX
true,
#else
ReactNativeFeatureFlags::
inspectorEnableCxxInspectorPackagerConnection(),
#endif
.enableModernCDPRegistry =
#ifdef REACT_NATIVE_FORCE_ENABLE_FUSEBOX
true,
#elif defined(HERMES_ENABLE_DEBUGGER)
ReactNativeFeatureFlags::inspectorEnableModernCDPRegistry(),
#else
false,
false,
#endif
};
@@ -24,12 +24,6 @@ class InspectorFlags {
*/
bool getEnableModernCDPRegistry() const;
/**
* Flag determining if the C++ implementation of InspectorPackagerConnection
* should be used instead of the per-platform one.
*/
bool getEnableCxxInspectorPackagerConnection() const;
/**
* Reset flags to their upstream values. The caller must ensure any resources
* that have read previous flag values have been cleaned up.
@@ -38,7 +32,6 @@ class InspectorFlags {
private:
struct Values {
bool enableCxxInspectorPackagerConnection;
bool enableModernCDPRegistry;
bool operator==(const Values&) const = default;
};
@@ -235,14 +235,8 @@ INSTANTIATE_TEST_SUITE_P(
ReactInstanceVaryingInspectorFlags,
ReactInstanceIntegrationTestWithFlags,
::testing::Values(
InspectorFlagOverrides{
.enableCxxInspectorPackagerConnection = false,
.enableModernCDPRegistry = false},
InspectorFlagOverrides{
.enableCxxInspectorPackagerConnection = true,
.enableModernCDPRegistry = false},
InspectorFlagOverrides{
.enableCxxInspectorPackagerConnection = true,
.enableModernCDPRegistry = true}));
InspectorFlagOverrides{.enableModernCDPRegistry = false},
InspectorFlagOverrides{.enableModernCDPRegistry = false},
InspectorFlagOverrides{.enableModernCDPRegistry = true}));
} // namespace facebook::react::jsinspector_modern
@@ -25,7 +25,6 @@ namespace facebook::react::jsinspector_modern {
using namespace ::testing;
struct FeatureFlags {
const bool enableCxxInspectorPackagerConnection = true;
const bool enableModernCDPRegistry = true;
};
@@ -26,12 +26,6 @@ class ReactNativeFeatureFlagsOverrides
const InspectorFlagOverrides& overrides)
: overrides_(overrides) {}
bool inspectorEnableCxxInspectorPackagerConnection() override {
return overrides_.enableCxxInspectorPackagerConnection.value_or(
ReactNativeFeatureFlagsDefaults::
inspectorEnableCxxInspectorPackagerConnection());
}
bool inspectorEnableModernCDPRegistry() override {
return overrides_.enableModernCDPRegistry.value_or(
ReactNativeFeatureFlagsDefaults::inspectorEnableModernCDPRegistry());
@@ -19,7 +19,6 @@ namespace facebook::react::jsinspector_modern {
struct InspectorFlagOverrides {
// NOTE: Keep these entries in sync with ReactNativeFeatureFlagsOverrides in
// the implementation file.
std::optional<bool> enableCxxInspectorPackagerConnection;
std::optional<bool> enableModernCDPRegistry;
};
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<71ea09d31186aea96ff207b1015f155e>>
* @generated SignedSource<<4445b86f8e66d2ec2b1cdbd2d99a551e>>
*/
/**
@@ -73,10 +73,6 @@ bool ReactNativeFeatureFlags::forceBatchingMountItemsOnAndroid() {
return getAccessor().forceBatchingMountItemsOnAndroid();
}
bool ReactNativeFeatureFlags::inspectorEnableCxxInspectorPackagerConnection() {
return getAccessor().inspectorEnableCxxInspectorPackagerConnection();
}
bool ReactNativeFeatureFlags::inspectorEnableModernCDPRegistry() {
return getAccessor().inspectorEnableModernCDPRegistry();
}
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<c53481eb714387bf0a390fba1c02c331>>
* @generated SignedSource<<afcccd6ebe0986b3c4585298d1dc41a2>>
*/
/**
@@ -102,11 +102,6 @@ class ReactNativeFeatureFlags {
*/
RN_EXPORT static bool forceBatchingMountItemsOnAndroid();
/**
* Flag determining if the C++ implementation of InspectorPackagerConnection should be used instead of the per-platform one. This flag is global and should not be changed across React Host lifetimes.
*/
RN_EXPORT static bool inspectorEnableCxxInspectorPackagerConnection();
/**
* Flag determining if the modern CDP backend should be enabled. This flag is global and should not be changed across React Host lifetimes.
*/
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<2e874e6368f85709ecbb4c1e086ae7a9>>
* @generated SignedSource<<a1e228f62a883630e427d5984cc9fba0>>
*/
/**
@@ -263,24 +263,6 @@ bool ReactNativeFeatureFlagsAccessor::forceBatchingMountItemsOnAndroid() {
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::inspectorEnableCxxInspectorPackagerConnection() {
auto flagValue = inspectorEnableCxxInspectorPackagerConnection_.load();
if (!flagValue.has_value()) {
// This block is not exclusive but it is not necessary.
// If multiple threads try to initialize the feature flag, we would only
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(13, "inspectorEnableCxxInspectorPackagerConnection");
flagValue = currentProvider_->inspectorEnableCxxInspectorPackagerConnection();
inspectorEnableCxxInspectorPackagerConnection_ = flagValue;
}
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::inspectorEnableModernCDPRegistry() {
auto flagValue = inspectorEnableModernCDPRegistry_.load();
@@ -290,7 +272,7 @@ bool ReactNativeFeatureFlagsAccessor::inspectorEnableModernCDPRegistry() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(14, "inspectorEnableModernCDPRegistry");
markFlagAsAccessed(13, "inspectorEnableModernCDPRegistry");
flagValue = currentProvider_->inspectorEnableModernCDPRegistry();
inspectorEnableModernCDPRegistry_ = flagValue;
@@ -308,7 +290,7 @@ bool ReactNativeFeatureFlagsAccessor::lazyAnimationCallbacks() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(15, "lazyAnimationCallbacks");
markFlagAsAccessed(14, "lazyAnimationCallbacks");
flagValue = currentProvider_->lazyAnimationCallbacks();
lazyAnimationCallbacks_ = flagValue;
@@ -326,7 +308,7 @@ bool ReactNativeFeatureFlagsAccessor::preventDoubleTextMeasure() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(16, "preventDoubleTextMeasure");
markFlagAsAccessed(15, "preventDoubleTextMeasure");
flagValue = currentProvider_->preventDoubleTextMeasure();
preventDoubleTextMeasure_ = flagValue;
@@ -344,7 +326,7 @@ bool ReactNativeFeatureFlagsAccessor::setAndroidLayoutDirection() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(17, "setAndroidLayoutDirection");
markFlagAsAccessed(16, "setAndroidLayoutDirection");
flagValue = currentProvider_->setAndroidLayoutDirection();
setAndroidLayoutDirection_ = flagValue;
@@ -362,7 +344,7 @@ bool ReactNativeFeatureFlagsAccessor::useModernRuntimeScheduler() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(18, "useModernRuntimeScheduler");
markFlagAsAccessed(17, "useModernRuntimeScheduler");
flagValue = currentProvider_->useModernRuntimeScheduler();
useModernRuntimeScheduler_ = flagValue;
@@ -380,7 +362,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(19, "useNativeViewConfigsInBridgelessMode");
markFlagAsAccessed(18, "useNativeViewConfigsInBridgelessMode");
flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
useNativeViewConfigsInBridgelessMode_ = flagValue;
@@ -398,7 +380,7 @@ bool ReactNativeFeatureFlagsAccessor::useStateAlignmentMechanism() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(20, "useStateAlignmentMechanism");
markFlagAsAccessed(19, "useStateAlignmentMechanism");
flagValue = currentProvider_->useStateAlignmentMechanism();
useStateAlignmentMechanism_ = flagValue;
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<7d1c4c90d5e1feb0015376f20943ee51>>
* @generated SignedSource<<fcfe3b796552cf37e27790af0d424802>>
*/
/**
@@ -44,7 +44,6 @@ class ReactNativeFeatureFlagsAccessor {
bool enableUIConsistency();
bool fixStoppedSurfaceRemoveDeleteTreeUIFrameCallbackLeak();
bool forceBatchingMountItemsOnAndroid();
bool inspectorEnableCxxInspectorPackagerConnection();
bool inspectorEnableModernCDPRegistry();
bool lazyAnimationCallbacks();
bool preventDoubleTextMeasure();
@@ -62,7 +61,7 @@ class ReactNativeFeatureFlagsAccessor {
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
bool wasOverridden_;
std::array<std::atomic<const char*>, 21> accessedFeatureFlags_;
std::array<std::atomic<const char*>, 20> accessedFeatureFlags_;
std::atomic<std::optional<bool>> commonTestFlag_;
std::atomic<std::optional<bool>> allowCollapsableChildren_;
@@ -77,7 +76,6 @@ class ReactNativeFeatureFlagsAccessor {
std::atomic<std::optional<bool>> enableUIConsistency_;
std::atomic<std::optional<bool>> fixStoppedSurfaceRemoveDeleteTreeUIFrameCallbackLeak_;
std::atomic<std::optional<bool>> forceBatchingMountItemsOnAndroid_;
std::atomic<std::optional<bool>> inspectorEnableCxxInspectorPackagerConnection_;
std::atomic<std::optional<bool>> inspectorEnableModernCDPRegistry_;
std::atomic<std::optional<bool>> lazyAnimationCallbacks_;
std::atomic<std::optional<bool>> preventDoubleTextMeasure_;
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<54a1827a45d7dd15b5e8a26d49ad6d30>>
* @generated SignedSource<<d106a5f9684bbeb5add66a57623956be>>
*/
/**
@@ -79,10 +79,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
return false;
}
bool inspectorEnableCxxInspectorPackagerConnection() override {
return false;
}
bool inspectorEnableModernCDPRegistry() override {
return false;
}
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<de25e5a8394c37217e0cfd98715493fc>>
* @generated SignedSource<<c9172b168942d85d3b04221574a60430>>
*/
/**
@@ -38,7 +38,6 @@ class ReactNativeFeatureFlagsProvider {
virtual bool enableUIConsistency() = 0;
virtual bool fixStoppedSurfaceRemoveDeleteTreeUIFrameCallbackLeak() = 0;
virtual bool forceBatchingMountItemsOnAndroid() = 0;
virtual bool inspectorEnableCxxInspectorPackagerConnection() = 0;
virtual bool inspectorEnableModernCDPRegistry() = 0;
virtual bool lazyAnimationCallbacks() = 0;
virtual bool preventDoubleTextMeasure() = 0;
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<1fdca69483db9e0fc9f9ab7a2cd9ff85>>
* @generated SignedSource<<8b16e85f68631df0af57e9dc3366c022>>
*/
/**
@@ -102,11 +102,6 @@ bool NativeReactNativeFeatureFlags::forceBatchingMountItemsOnAndroid(
return ReactNativeFeatureFlags::forceBatchingMountItemsOnAndroid();
}
bool NativeReactNativeFeatureFlags::inspectorEnableCxxInspectorPackagerConnection(
jsi::Runtime& /*runtime*/) {
return ReactNativeFeatureFlags::inspectorEnableCxxInspectorPackagerConnection();
}
bool NativeReactNativeFeatureFlags::inspectorEnableModernCDPRegistry(
jsi::Runtime& /*runtime*/) {
return ReactNativeFeatureFlags::inspectorEnableModernCDPRegistry();
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<9653b7699416f1702ba2f5e8b8f6da93>>
* @generated SignedSource<<f366fc75beee206eb044e5be1a974c59>>
*/
/**
@@ -61,8 +61,6 @@ class NativeReactNativeFeatureFlags
bool forceBatchingMountItemsOnAndroid(jsi::Runtime& runtime);
bool inspectorEnableCxxInspectorPackagerConnection(jsi::Runtime& runtime);
bool inspectorEnableModernCDPRegistry(jsi::Runtime& runtime);
bool lazyAnimationCallbacks(jsi::Runtime& runtime);
@@ -98,11 +98,6 @@ const definitions: FeatureFlagDefinitions = {
description:
'Forces the mounting layer on Android to always batch mount items instead of dispatching them immediately. This might fix some crashes related to synchronous state updates, where some views dispatch state updates during mount.',
},
inspectorEnableCxxInspectorPackagerConnection: {
defaultValue: false,
description:
'Flag determining if the C++ implementation of InspectorPackagerConnection should be used instead of the per-platform one. This flag is global and should not be changed across React Host lifetimes.',
},
inspectorEnableModernCDPRegistry: {
defaultValue: false,
description:
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<63e7a8952026600cb58367e9c70fb68d>>
* @generated SignedSource<<6b04d73d4a2525022a2e81334656cc86>>
* @flow strict-local
*/
@@ -53,7 +53,6 @@ export type ReactNativeFeatureFlags = {
enableUIConsistency: Getter<boolean>,
fixStoppedSurfaceRemoveDeleteTreeUIFrameCallbackLeak: Getter<boolean>,
forceBatchingMountItemsOnAndroid: Getter<boolean>,
inspectorEnableCxxInspectorPackagerConnection: Getter<boolean>,
inspectorEnableModernCDPRegistry: Getter<boolean>,
lazyAnimationCallbacks: Getter<boolean>,
preventDoubleTextMeasure: Getter<boolean>,
@@ -155,10 +154,6 @@ export const fixStoppedSurfaceRemoveDeleteTreeUIFrameCallbackLeak: Getter<boolea
* Forces the mounting layer on Android to always batch mount items instead of dispatching them immediately. This might fix some crashes related to synchronous state updates, where some views dispatch state updates during mount.
*/
export const forceBatchingMountItemsOnAndroid: Getter<boolean> = createNativeFlagGetter('forceBatchingMountItemsOnAndroid', false);
/**
* Flag determining if the C++ implementation of InspectorPackagerConnection should be used instead of the per-platform one. This flag is global and should not be changed across React Host lifetimes.
*/
export const inspectorEnableCxxInspectorPackagerConnection: Getter<boolean> = createNativeFlagGetter('inspectorEnableCxxInspectorPackagerConnection', false);
/**
* Flag determining if the modern CDP backend should be enabled. This flag is global and should not be changed across React Host lifetimes.
*/
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<c892b2d381564962b505e389ed78e9f2>>
* @generated SignedSource<<148aa848925eead93c7197236c51eaba>>
* @flow strict-local
*/
@@ -36,7 +36,6 @@ export interface Spec extends TurboModule {
+enableUIConsistency?: () => boolean;
+fixStoppedSurfaceRemoveDeleteTreeUIFrameCallbackLeak?: () => boolean;
+forceBatchingMountItemsOnAndroid?: () => boolean;
+inspectorEnableCxxInspectorPackagerConnection?: () => boolean;
+inspectorEnableModernCDPRegistry?: () => boolean;
+lazyAnimationCallbacks?: () => boolean;
+preventDoubleTextMeasure?: () => boolean;