Skip to content

Commit 492df85

Browse files
javachemeta-codesync[bot]
authored andcommitted
Cleanup useNativeEqualsInNativeReadableArrayAndroid flag (#55030)
Summary: Pull Request resolved: #55030 This has been fully rolled out now, the feature flag can be removed. Changelog: [Internal] Reviewed By: cortinico Differential Revision: D90105013 fbshipit-source-id: 9ae4a926cbcb06590162581c59afbda26575f591
1 parent f2948fb commit 492df85

21 files changed

Lines changed: 32 additions & 160 deletions

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/ReadableNativeArray.kt

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
package com.facebook.react.bridge
99

1010
import com.facebook.proguard.annotations.DoNotStrip
11-
import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags
1211
import java.util.ArrayList
1312
import java.util.Arrays
1413
import kotlin.jvm.JvmStatic
@@ -90,17 +89,7 @@ public open class ReadableNativeArray protected constructor() : NativeArray(), R
9089

9190
override fun hashCode(): Int = localArray.hashCode()
9291

93-
override fun equals(other: Any?): Boolean {
94-
if (other !is ReadableNativeArray) {
95-
return false
96-
}
97-
98-
return if (ReactNativeFeatureFlags.useNativeEqualsInNativeReadableArrayAndroid()) {
99-
nativeEquals(other)
100-
} else {
101-
localArray.contentDeepEquals(other.localArray)
102-
}
103-
}
92+
override fun equals(other: Any?): Boolean = (other is ReadableNativeArray) && nativeEquals(other)
10493

10594
private external fun nativeEquals(other: ReadableNativeArray): Boolean
10695

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<adc6b24ae04487d2b82a2bac35f027a7>>
7+
* @generated SignedSource<<7fe8e1af0448cfb6857591608f2082ef>>
88
*/
99

1010
/**
@@ -498,12 +498,6 @@ public object ReactNativeFeatureFlags {
498498
@JvmStatic
499499
public fun useFabricInterop(): Boolean = accessor.useFabricInterop()
500500

501-
/**
502-
* Use a native implementation of equals in NativeReadableArray.
503-
*/
504-
@JvmStatic
505-
public fun useNativeEqualsInNativeReadableArrayAndroid(): Boolean = accessor.useNativeEqualsInNativeReadableArrayAndroid()
506-
507501
/**
508502
* Use a native implementation of TransformHelper
509503
*/

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<3ebb3c265193b4f61e5bf43082c5be54>>
7+
* @generated SignedSource<<046cc58eb9c6398863e6f58fc336d21f>>
88
*/
99

1010
/**
@@ -98,7 +98,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
9898
private var updateRuntimeShadowNodeReferencesOnCommitCache: Boolean? = null
9999
private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null
100100
private var useFabricInteropCache: Boolean? = null
101-
private var useNativeEqualsInNativeReadableArrayAndroidCache: Boolean? = null
102101
private var useNativeTransformHelperAndroidCache: Boolean? = null
103102
private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
104103
private var useRawPropsJsiValueCache: Boolean? = null
@@ -813,15 +812,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
813812
return cached
814813
}
815814

816-
override fun useNativeEqualsInNativeReadableArrayAndroid(): Boolean {
817-
var cached = useNativeEqualsInNativeReadableArrayAndroidCache
818-
if (cached == null) {
819-
cached = ReactNativeFeatureFlagsCxxInterop.useNativeEqualsInNativeReadableArrayAndroid()
820-
useNativeEqualsInNativeReadableArrayAndroidCache = cached
821-
}
822-
return cached
823-
}
824-
825815
override fun useNativeTransformHelperAndroid(): Boolean {
826816
var cached = useNativeTransformHelperAndroidCache
827817
if (cached == null) {

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<eb11cf643c4e94eddc5d7985a8a7a03a>>
7+
* @generated SignedSource<<5a12c4720aaf3b6c9ff010a5fadf9ea4>>
88
*/
99

1010
/**
@@ -184,8 +184,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
184184

185185
@DoNotStrip @JvmStatic public external fun useFabricInterop(): Boolean
186186

187-
@DoNotStrip @JvmStatic public external fun useNativeEqualsInNativeReadableArrayAndroid(): Boolean
188-
189187
@DoNotStrip @JvmStatic public external fun useNativeTransformHelperAndroid(): Boolean
190188

191189
@DoNotStrip @JvmStatic public external fun useNativeViewConfigsInBridgelessMode(): Boolean

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<3525ab6194d3057e779e1050f19c93e4>>
7+
* @generated SignedSource<<8ff8090212f1d161d049cc02216bde1a>>
88
*/
99

1010
/**
@@ -179,8 +179,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
179179

180180
override fun useFabricInterop(): Boolean = true
181181

182-
override fun useNativeEqualsInNativeReadableArrayAndroid(): Boolean = true
183-
184182
override fun useNativeTransformHelperAndroid(): Boolean = true
185183

186184
override fun useNativeViewConfigsInBridgelessMode(): Boolean = false

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<f9ee0d1f23024b026d065ffc3d48cfcf>>
7+
* @generated SignedSource<<04b0480c4675c067c183280370dd861a>>
88
*/
99

1010
/**
@@ -102,7 +102,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
102102
private var updateRuntimeShadowNodeReferencesOnCommitCache: Boolean? = null
103103
private var useAlwaysAvailableJSErrorHandlingCache: Boolean? = null
104104
private var useFabricInteropCache: Boolean? = null
105-
private var useNativeEqualsInNativeReadableArrayAndroidCache: Boolean? = null
106105
private var useNativeTransformHelperAndroidCache: Boolean? = null
107106
private var useNativeViewConfigsInBridgelessModeCache: Boolean? = null
108107
private var useRawPropsJsiValueCache: Boolean? = null
@@ -895,16 +894,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
895894
return cached
896895
}
897896

898-
override fun useNativeEqualsInNativeReadableArrayAndroid(): Boolean {
899-
var cached = useNativeEqualsInNativeReadableArrayAndroidCache
900-
if (cached == null) {
901-
cached = currentProvider.useNativeEqualsInNativeReadableArrayAndroid()
902-
accessedFeatureFlags.add("useNativeEqualsInNativeReadableArrayAndroid")
903-
useNativeEqualsInNativeReadableArrayAndroidCache = cached
904-
}
905-
return cached
906-
}
907-
908897
override fun useNativeTransformHelperAndroid(): Boolean {
909898
var cached = useNativeTransformHelperAndroidCache
910899
if (cached == null) {

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<09cef8cedd515f477a32c2ed77d86fc4>>
7+
* @generated SignedSource<<f3df6f3fd411a0ddc17c1f3a0147e276>>
88
*/
99

1010
/**
@@ -179,8 +179,6 @@ public interface ReactNativeFeatureFlagsProvider {
179179

180180
@DoNotStrip public fun useFabricInterop(): Boolean
181181

182-
@DoNotStrip public fun useNativeEqualsInNativeReadableArrayAndroid(): Boolean
183-
184182
@DoNotStrip public fun useNativeTransformHelperAndroid(): Boolean
185183

186184
@DoNotStrip public fun useNativeViewConfigsInBridgelessMode(): Boolean

packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<b9af351de972ddff807bd25f98f3ff42>>
7+
* @generated SignedSource<<5a83d0e5570246e5d44a49d53b75b4fc>>
88
*/
99

1010
/**
@@ -507,12 +507,6 @@ class ReactNativeFeatureFlagsJavaProvider
507507
return method(javaProvider_);
508508
}
509509

510-
bool useNativeEqualsInNativeReadableArrayAndroid() override {
511-
static const auto method =
512-
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useNativeEqualsInNativeReadableArrayAndroid");
513-
return method(javaProvider_);
514-
}
515-
516510
bool useNativeTransformHelperAndroid() override {
517511
static const auto method =
518512
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("useNativeTransformHelperAndroid");
@@ -973,11 +967,6 @@ bool JReactNativeFeatureFlagsCxxInterop::useFabricInterop(
973967
return ReactNativeFeatureFlags::useFabricInterop();
974968
}
975969

976-
bool JReactNativeFeatureFlagsCxxInterop::useNativeEqualsInNativeReadableArrayAndroid(
977-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
978-
return ReactNativeFeatureFlags::useNativeEqualsInNativeReadableArrayAndroid();
979-
}
980-
981970
bool JReactNativeFeatureFlagsCxxInterop::useNativeTransformHelperAndroid(
982971
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
983972
return ReactNativeFeatureFlags::useNativeTransformHelperAndroid();
@@ -1298,9 +1287,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
12981287
makeNativeMethod(
12991288
"useFabricInterop",
13001289
JReactNativeFeatureFlagsCxxInterop::useFabricInterop),
1301-
makeNativeMethod(
1302-
"useNativeEqualsInNativeReadableArrayAndroid",
1303-
JReactNativeFeatureFlagsCxxInterop::useNativeEqualsInNativeReadableArrayAndroid),
13041290
makeNativeMethod(
13051291
"useNativeTransformHelperAndroid",
13061292
JReactNativeFeatureFlagsCxxInterop::useNativeTransformHelperAndroid),

packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<c89b15dbb7d1cec571eed1551e1b7162>>
7+
* @generated SignedSource<<fa32d0e44ae50a724f72f95c56d1418e>>
88
*/
99

1010
/**
@@ -264,9 +264,6 @@ class JReactNativeFeatureFlagsCxxInterop
264264
static bool useFabricInterop(
265265
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
266266

267-
static bool useNativeEqualsInNativeReadableArrayAndroid(
268-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
269-
270267
static bool useNativeTransformHelperAndroid(
271268
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
272269

packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<08d50062a88a227aa8800e549b6dfe57>>
7+
* @generated SignedSource<<be750689f90d9498b3d44055c2346a0f>>
88
*/
99

1010
/**
@@ -338,10 +338,6 @@ bool ReactNativeFeatureFlags::useFabricInterop() {
338338
return getAccessor().useFabricInterop();
339339
}
340340

341-
bool ReactNativeFeatureFlags::useNativeEqualsInNativeReadableArrayAndroid() {
342-
return getAccessor().useNativeEqualsInNativeReadableArrayAndroid();
343-
}
344-
345341
bool ReactNativeFeatureFlags::useNativeTransformHelperAndroid() {
346342
return getAccessor().useNativeTransformHelperAndroid();
347343
}

0 commit comments

Comments
 (0)