Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9887,6 +9887,7 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
enableGranularShadowTreeStateReconciliation: Getter<boolean>,
enableIOSViewClipToPaddingBox: Getter<boolean>,
enableImagePrefetchingAndroid: Getter<boolean>,
enableJSRuntimeGCOnMemoryPressureOnIOS: Getter<boolean>,
enableLayoutAnimationsOnAndroid: Getter<boolean>,
enableLayoutAnimationsOnIOS: Getter<boolean>,
enableLongTaskAPI: Getter<boolean>,
Expand Down Expand Up @@ -9952,6 +9953,7 @@ declare export const enableFixForViewCommandRace: Getter<boolean>;
declare export const enableGranularShadowTreeStateReconciliation: Getter<boolean>;
declare export const enableIOSViewClipToPaddingBox: Getter<boolean>;
declare export const enableImagePrefetchingAndroid: Getter<boolean>;
declare export const enableJSRuntimeGCOnMemoryPressureOnIOS: Getter<boolean>;
declare export const enableLayoutAnimationsOnAndroid: Getter<boolean>;
declare export const enableLayoutAnimationsOnIOS: Getter<boolean>;
declare export const enableLongTaskAPI: Getter<boolean>;
Expand Down Expand Up @@ -10028,6 +10030,7 @@ exports[`public API should not change unintentionally src/private/featureflags/s
+enableGranularShadowTreeStateReconciliation?: () => boolean;
+enableIOSViewClipToPaddingBox?: () => boolean;
+enableImagePrefetchingAndroid?: () => boolean;
+enableJSRuntimeGCOnMemoryPressureOnIOS?: () => boolean;
+enableLayoutAnimationsOnAndroid?: () => boolean;
+enableLayoutAnimationsOnIOS?: () => boolean;
+enableLongTaskAPI?: () => boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<<2c321a7a8e811dc238a75f76180843b9>>
* @generated SignedSource<<9b4dfbbcc5296014d76446c3a562b260>>
*/

/**
Expand Down Expand Up @@ -124,6 +124,12 @@ public object ReactNativeFeatureFlags {
@JvmStatic
public fun enableImagePrefetchingAndroid(): Boolean = accessor.enableImagePrefetchingAndroid()

/**
* Trigger JS runtime GC on memory pressure event on iOS
*/
@JvmStatic
public fun enableJSRuntimeGCOnMemoryPressureOnIOS(): Boolean = accessor.enableJSRuntimeGCOnMemoryPressureOnIOS()

/**
* When enabled, LayoutAnimations API will animate state changes on Android.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<<e724939eaa9fa53c9b25c8a5a1e3196d>>
* @generated SignedSource<<307d64b948ab7cbba4216720c517c6ec>>
*/

/**
Expand Down Expand Up @@ -36,6 +36,7 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
private var enableGranularShadowTreeStateReconciliationCache: Boolean? = null
private var enableIOSViewClipToPaddingBoxCache: Boolean? = null
private var enableImagePrefetchingAndroidCache: Boolean? = null
private var enableJSRuntimeGCOnMemoryPressureOnIOSCache: Boolean? = null
private var enableLayoutAnimationsOnAndroidCache: Boolean? = null
private var enableLayoutAnimationsOnIOSCache: Boolean? = null
private var enableLongTaskAPICache: Boolean? = null
Expand Down Expand Up @@ -211,6 +212,15 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
return cached
}

override fun enableJSRuntimeGCOnMemoryPressureOnIOS(): Boolean {
var cached = enableJSRuntimeGCOnMemoryPressureOnIOSCache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.enableJSRuntimeGCOnMemoryPressureOnIOS()
enableJSRuntimeGCOnMemoryPressureOnIOSCache = cached
}
return cached
}

override fun enableLayoutAnimationsOnAndroid(): Boolean {
var cached = enableLayoutAnimationsOnAndroidCache
if (cached == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<<a7f3ca986725fa85a6926c9e7966669b>>
* @generated SignedSource<<e9237a045ae4dac8109772f558059534>>
*/

/**
Expand Down Expand Up @@ -60,6 +60,8 @@ public object ReactNativeFeatureFlagsCxxInterop {

@DoNotStrip @JvmStatic public external fun enableImagePrefetchingAndroid(): Boolean

@DoNotStrip @JvmStatic public external fun enableJSRuntimeGCOnMemoryPressureOnIOS(): Boolean

@DoNotStrip @JvmStatic public external fun enableLayoutAnimationsOnAndroid(): Boolean

@DoNotStrip @JvmStatic public external fun enableLayoutAnimationsOnIOS(): Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<<85d40be44d053b58a74ad76467c8e5e9>>
* @generated SignedSource<<bc8a67b9d153fc353054f38f32267a89>>
*/

/**
Expand Down Expand Up @@ -55,6 +55,8 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi

override fun enableImagePrefetchingAndroid(): Boolean = false

override fun enableJSRuntimeGCOnMemoryPressureOnIOS(): Boolean = false

override fun enableLayoutAnimationsOnAndroid(): Boolean = false

override fun enableLayoutAnimationsOnIOS(): Boolean = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<<18d5c2ffa66a36e364bc358a144534ec>>
* @generated SignedSource<<eef5b0c5d02927b3984a2dd8d0c48f1c>>
*/

/**
Expand Down Expand Up @@ -40,6 +40,7 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
private var enableGranularShadowTreeStateReconciliationCache: Boolean? = null
private var enableIOSViewClipToPaddingBoxCache: Boolean? = null
private var enableImagePrefetchingAndroidCache: Boolean? = null
private var enableJSRuntimeGCOnMemoryPressureOnIOSCache: Boolean? = null
private var enableLayoutAnimationsOnAndroidCache: Boolean? = null
private var enableLayoutAnimationsOnIOSCache: Boolean? = null
private var enableLongTaskAPICache: Boolean? = null
Expand Down Expand Up @@ -231,6 +232,16 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
return cached
}

override fun enableJSRuntimeGCOnMemoryPressureOnIOS(): Boolean {
var cached = enableJSRuntimeGCOnMemoryPressureOnIOSCache
if (cached == null) {
cached = currentProvider.enableJSRuntimeGCOnMemoryPressureOnIOS()
accessedFeatureFlags.add("enableJSRuntimeGCOnMemoryPressureOnIOS")
enableJSRuntimeGCOnMemoryPressureOnIOSCache = cached
}
return cached
}

override fun enableLayoutAnimationsOnAndroid(): Boolean {
var cached = enableLayoutAnimationsOnAndroidCache
if (cached == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<<4f90c47ea6f23c2ebfae1f35790c4af5>>
* @generated SignedSource<<d1ddd8a765735a17f9967001669a50ec>>
*/

/**
Expand Down Expand Up @@ -55,6 +55,8 @@ public interface ReactNativeFeatureFlagsProvider {

@DoNotStrip public fun enableImagePrefetchingAndroid(): Boolean

@DoNotStrip public fun enableJSRuntimeGCOnMemoryPressureOnIOS(): Boolean

@DoNotStrip public fun enableLayoutAnimationsOnAndroid(): Boolean

@DoNotStrip public fun enableLayoutAnimationsOnIOS(): Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<<63ebe186ccd5ee30fc654aa8d90f27f9>>
* @generated SignedSource<<1359f52ece07f77a4a61083a94f10fe0>>
*/

/**
Expand Down Expand Up @@ -135,6 +135,12 @@ class ReactNativeFeatureFlagsProviderHolder
return method(javaProvider_);
}

bool enableJSRuntimeGCOnMemoryPressureOnIOS() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableJSRuntimeGCOnMemoryPressureOnIOS");
return method(javaProvider_);
}

bool enableLayoutAnimationsOnAndroid() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableLayoutAnimationsOnAndroid");
Expand Down Expand Up @@ -399,6 +405,11 @@ bool JReactNativeFeatureFlagsCxxInterop::enableImagePrefetchingAndroid(
return ReactNativeFeatureFlags::enableImagePrefetchingAndroid();
}

bool JReactNativeFeatureFlagsCxxInterop::enableJSRuntimeGCOnMemoryPressureOnIOS(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::enableJSRuntimeGCOnMemoryPressureOnIOS();
}

bool JReactNativeFeatureFlagsCxxInterop::enableLayoutAnimationsOnAndroid(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::enableLayoutAnimationsOnAndroid();
Expand Down Expand Up @@ -628,6 +639,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"enableImagePrefetchingAndroid",
JReactNativeFeatureFlagsCxxInterop::enableImagePrefetchingAndroid),
makeNativeMethod(
"enableJSRuntimeGCOnMemoryPressureOnIOS",
JReactNativeFeatureFlagsCxxInterop::enableJSRuntimeGCOnMemoryPressureOnIOS),
makeNativeMethod(
"enableLayoutAnimationsOnAndroid",
JReactNativeFeatureFlagsCxxInterop::enableLayoutAnimationsOnAndroid),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<<fdb23cf034dea348c661f59718f07291>>
* @generated SignedSource<<13d552908696bd42ac2900499bc6074d>>
*/

/**
Expand Down Expand Up @@ -78,6 +78,9 @@ class JReactNativeFeatureFlagsCxxInterop
static bool enableImagePrefetchingAndroid(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

static bool enableJSRuntimeGCOnMemoryPressureOnIOS(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

static bool enableLayoutAnimationsOnAndroid(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<<58c69846193598ce0c3666c37b8a185f>>
* @generated SignedSource<<b815f41d024d315ba0b6efcec89b31e1>>
*/

/**
Expand Down Expand Up @@ -90,6 +90,10 @@ bool ReactNativeFeatureFlags::enableImagePrefetchingAndroid() {
return getAccessor().enableImagePrefetchingAndroid();
}

bool ReactNativeFeatureFlags::enableJSRuntimeGCOnMemoryPressureOnIOS() {
return getAccessor().enableJSRuntimeGCOnMemoryPressureOnIOS();
}

bool ReactNativeFeatureFlags::enableLayoutAnimationsOnAndroid() {
return getAccessor().enableLayoutAnimationsOnAndroid();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<<1d578508c3cd69bbf9616a811508a03e>>
* @generated SignedSource<<da35bc7466accd84e6f0ce56f166c845>>
*/

/**
Expand Down Expand Up @@ -119,6 +119,11 @@ class ReactNativeFeatureFlags {
*/
RN_EXPORT static bool enableImagePrefetchingAndroid();

/**
* Trigger JS runtime GC on memory pressure event on iOS
*/
RN_EXPORT static bool enableJSRuntimeGCOnMemoryPressureOnIOS();

/**
* When enabled, LayoutAnimations API will animate state changes on Android.
*/
Expand Down
Loading