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
19 changes: 19 additions & 0 deletions flow-typed/npm/signedsource_v1.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
*
* @format
* @flow strict
*/

declare module 'signedsource' {
declare type SignedSource = {
TokenNotFoundError: Error,
getSigningToken(): string,
isSigned(data: string): boolean,
signFile(data: string): string,
verifySignature(data: string): boolean,
[key: string]: mixed,
};

declare module.exports: SignedSource;
}
4 changes: 0 additions & 4 deletions packages/react-native/React/Fabric/RCTSurfacePresenter.mm
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,6 @@ - (RCTScheduler *)_createScheduler
{
auto reactNativeConfig = _contextContainer->at<std::shared_ptr<const ReactNativeConfig>>("ReactNativeConfig");

if (reactNativeConfig && reactNativeConfig->getBool("react_fabric:enable_cpp_props_iterator_setter_ios")) {
CoreFeatures::enablePropIteratorSetter = true;
}

if (reactNativeConfig && reactNativeConfig->getBool("react_fabric:enable_granular_scroll_view_state_updates_ios")) {
CoreFeatures::enableGranularScrollViewStateUpdatesIOS = true;
}
Expand Down
1 change: 0 additions & 1 deletion packages/react-native/ReactAndroid/api/ReactAndroid.api
Original file line number Diff line number Diff line change
Expand Up @@ -1895,7 +1895,6 @@ public class com/facebook/react/config/ReactFeatureFlags {
public static field enableBridgelessArchitectureNewCreateReloadDestroy Z
public static field enableBridgelessArchitectureSoftExceptions Z
public static field enableClonelessStateProgression Z
public static field enableCppPropsIteratorSetter Z
public static field enableDefaultAsyncBatchedPriority Z
public static field enableEagerRootViewAttachment Z
public static field enableFabricLogs Z
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,6 @@ public class ReactFeatureFlags {
*/
public static boolean enableViewRecycling = false;

/**
* Enable prop iterator setter-style construction of Props in C++ (this flag is not used in Java).
*/
public static boolean enableCppPropsIteratorSetter = false;

/**
* Allow Differentiator.cpp and FabricMountingManager.cpp to generate a RemoveDeleteTree mega-op.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<f4268973a38ba972e68474cc31bab5a7>>
* @generated SignedSource<<0da2d8576e351c9467058dbaa369d0b5>>
*/

/**
* IMPORTANT: Do NOT modify this file directly.
*
* To change the definition of the flags, edit
* packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.json.
* packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js.
*
* To regenerate this code, run the following script from the repo root:
* yarn featureflags-update
Expand Down Expand Up @@ -70,6 +70,12 @@ object ReactNativeFeatureFlags {
@JvmStatic
fun enableFixForClippedSubviewsCrash() = accessor.enableFixForClippedSubviewsCrash()

/**
* Specifies whether the iterator-style prop parsing is enabled.
*/
@JvmStatic
fun enablePropIteratorSetter() = accessor.enablePropIteratorSetter()

/**
* Overrides the feature flags with the ones provided by the given provider
* (generally one that extends `ReactNativeFeatureFlagsDefaults`).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<5b653e8a53f557ffc0f46b3e81e99bed>>
* @generated SignedSource<<640d3ec5ef059762214db98afedc3650>>
*/

/**
* IMPORTANT: Do NOT modify this file directly.
*
* To change the definition of the flags, edit
* packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.json.
* packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js.
*
* To regenerate this code, run the following script from the repo root:
* yarn featureflags-update
Expand All @@ -27,6 +27,7 @@ class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccessor {
private var enableSpannableBuildingUnificationCache: Boolean? = null
private var enableCustomDrawOrderFabricCache: Boolean? = null
private var enableFixForClippedSubviewsCrashCache: Boolean? = null
private var enablePropIteratorSetterCache: Boolean? = null

override fun commonTestFlag(): Boolean {
var cached = commonTestFlagCache
Expand Down Expand Up @@ -91,6 +92,15 @@ class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccessor {
return cached
}

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

override fun override(provider: ReactNativeFeatureFlagsProvider) =
ReactNativeFeatureFlagsCxxInterop.override(provider as Any)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<47be3dbe5558f720a6c61742f2c63bf8>>
* @generated SignedSource<<045ff1b11b0336f4bac5ed966ba2e379>>
*/

/**
* IMPORTANT: Do NOT modify this file directly.
*
* To change the definition of the flags, edit
* packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.json.
* packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js.
*
* To regenerate this code, run the following script from the repo root:
* yarn featureflags-update
Expand Down Expand Up @@ -42,6 +42,8 @@ object ReactNativeFeatureFlagsCxxInterop {

@DoNotStrip @JvmStatic external fun enableFixForClippedSubviewsCrash(): Boolean

@DoNotStrip @JvmStatic external fun enablePropIteratorSetter(): Boolean

@DoNotStrip @JvmStatic external fun override(provider: Any)

@DoNotStrip @JvmStatic external fun dangerouslyReset()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<70c19d5bb1e0c09f52b89b4bb3645b9d>>
* @generated SignedSource<<cceb873b58b9d87b4f5b9f329ed102a7>>
*/

/**
* IMPORTANT: Do NOT modify this file directly.
*
* To change the definition of the flags, edit
* packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.json.
* packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js.
*
* To regenerate this code, run the following script from the repo root:
* yarn featureflags-update
Expand All @@ -36,4 +36,6 @@ open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvider {
override fun enableCustomDrawOrderFabric(): Boolean = false

override fun enableFixForClippedSubviewsCrash(): Boolean = false

override fun enablePropIteratorSetter(): Boolean = false
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<7ba0cb94c10989838250252fa06768a0>>
* @generated SignedSource<<968862b7b9a763c0d78588b2bc0048b5>>
*/

/**
* IMPORTANT: Do NOT modify this file directly.
*
* To change the definition of the flags, edit
* packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.json.
* packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js.
*
* To regenerate this code, run the following script from the repo root:
* yarn featureflags-update
Expand All @@ -31,6 +31,7 @@ class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAccessor {
private var enableSpannableBuildingUnificationCache: Boolean? = null
private var enableCustomDrawOrderFabricCache: Boolean? = null
private var enableFixForClippedSubviewsCrashCache: Boolean? = null
private var enablePropIteratorSetterCache: Boolean? = null

override fun commonTestFlag(): Boolean {
var cached = commonTestFlagCache
Expand Down Expand Up @@ -102,6 +103,16 @@ class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAccessor {
return cached
}

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

override fun override(provider: ReactNativeFeatureFlagsProvider) {
if (accessedFeatureFlags.isNotEmpty()) {
val accessedFeatureFlagsStr = accessedFeatureFlags.joinToString(separator = ", ") { it }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<b0f60718eedab65390ebfb7864a10a27>>
* @generated SignedSource<<960ab52a914f5b399c1e00daec69be94>>
*/

/**
* IMPORTANT: Do NOT modify this file directly.
*
* To change the definition of the flags, edit
* packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.json.
* packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js.
*
* To regenerate this code, run the following script from the repo root:
* yarn featureflags-update
Expand All @@ -36,4 +36,6 @@ interface ReactNativeFeatureFlagsProvider {
@DoNotStrip fun enableCustomDrawOrderFabric(): Boolean

@DoNotStrip fun enableFixForClippedSubviewsCrash(): Boolean

@DoNotStrip fun enablePropIteratorSetter(): Boolean
}
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,6 @@ void Binding::installFabricUIManager(
"CalculateTransformedFramesEnabled",
getFeatureFlagValue("calculateTransformedFramesEnabled"));

CoreFeatures::enablePropIteratorSetter =
getFeatureFlagValue("enableCppPropsIteratorSetter");
CoreFeatures::enableDefaultAsyncBatchedPriority =
getFeatureFlagValue("enableDefaultAsyncBatchedPriority");
CoreFeatures::enableClonelessStateProgression =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,93 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<dab6daf99192f983b7c8ad7633b43a33>>
* @generated SignedSource<<3e2c80e599d0a6852be41255b6b3c4da>>
*/

/**
* IMPORTANT: Do NOT modify this file directly.
*
* To change the definition of the flags, edit
* packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.json.
* packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js.
*
* To regenerate this code, run the following script from the repo root:
* yarn featureflags-update
*/

#include "JReactNativeFeatureFlagsCxxInterop.h"
#include <react/featureflags/ReactNativeFeatureFlags.h>
#include <react/featureflags/ReactNativeFeatureFlagsProviderHolder.h>

namespace facebook::react {

static jni::alias_ref<jni::JClass> getReactNativeFeatureFlagsProviderJavaClass() {
static const auto jClass = facebook::jni::findClassStatic(
"com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider");
return jClass;
}

/**
* Implementation of ReactNativeFeatureFlagsProvider that wraps a
* ReactNativeFeatureFlagsProvider Java object.
*/
class ReactNativeFeatureFlagsProviderHolder
: public ReactNativeFeatureFlagsProvider {
public:
explicit ReactNativeFeatureFlagsProviderHolder(
jni::alias_ref<jobject> javaProvider)
: javaProvider_(make_global(javaProvider)){};

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

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

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

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

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

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

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

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

private:
jni::global_ref<jobject> javaProvider_;
};

bool JReactNativeFeatureFlagsCxxInterop::commonTestFlag(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::commonTestFlag();
Expand Down Expand Up @@ -58,6 +126,11 @@ bool JReactNativeFeatureFlagsCxxInterop::enableFixForClippedSubviewsCrash(
return ReactNativeFeatureFlags::enableFixForClippedSubviewsCrash();
}

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

void JReactNativeFeatureFlagsCxxInterop::override(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/,
jni::alias_ref<jobject> provider) {
Expand Down Expand Up @@ -96,6 +169,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"enableFixForClippedSubviewsCrash",
JReactNativeFeatureFlagsCxxInterop::enableFixForClippedSubviewsCrash),
makeNativeMethod(
"enablePropIteratorSetter",
JReactNativeFeatureFlagsCxxInterop::enablePropIteratorSetter),
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<c2a4da926b870497f76c03c8f97199e2>>
* @generated SignedSource<<587cf9c6de40210d76ea8184fe47abe7>>
*/

/**
* IMPORTANT: Do NOT modify this file directly.
*
* To change the definition of the flags, edit
* packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.json.
* packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js.
*
* To regenerate this code, run the following script from the repo root:
* yarn featureflags-update
Expand Down Expand Up @@ -51,6 +51,9 @@ class JReactNativeFeatureFlagsCxxInterop
static bool enableFixForClippedSubviewsCrash(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

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

static void override(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>,
jni::alias_ref<jobject> provider);
Expand Down
Loading