Skip to content

Commit 69b56a4

Browse files
javachefacebook-github-bot
authored andcommitted
Do not use delegate wrapper for NativeReactNativeFeatureFlags (#51702)
Summary: Pull Request resolved: #51702 We have no need for C++ bridging in this TurboModule, as the generated code matches the base codegen exactly. Changelog: [Internal] Reviewed By: rubennorte Differential Revision: D75681901 fbshipit-source-id: 4b6caafe0bcd08a06686e0a44112bdb99a64a1cf
1 parent 1a46b20 commit 69b56a4

4 files changed

Lines changed: 10 additions & 8 deletions

File tree

packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp

Lines changed: 2 additions & 2 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<<b4cd1eeb134f9eb288c6cf8287dbb355>>
7+
* @generated SignedSource<<147254e7f4209e91f9ec00180f5b9c6d>>
88
*/
99

1010
/**
@@ -35,7 +35,7 @@ namespace facebook::react {
3535

3636
NativeReactNativeFeatureFlags::NativeReactNativeFeatureFlags(
3737
std::shared_ptr<CallInvoker> jsInvoker)
38-
: NativeReactNativeFeatureFlagsCxxSpec(std::move(jsInvoker)) {}
38+
: NativeReactNativeFeatureFlagsCxxSpecJSI(std::move(jsInvoker)) {}
3939

4040
bool NativeReactNativeFeatureFlags::commonTestFlag(
4141
jsi::Runtime& /*runtime*/) {

packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h

Lines changed: 4 additions & 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<<52b646e5d77918f4de5585a83535bb46>>
7+
* @generated SignedSource<<750cb2f00345cd1fd7ad82ed615e82bf>>
88
*/
99

1010
/**
@@ -30,11 +30,12 @@
3030
namespace facebook::react {
3131

3232
class NativeReactNativeFeatureFlags
33-
: public NativeReactNativeFeatureFlagsCxxSpec<
34-
NativeReactNativeFeatureFlags> {
33+
: public NativeReactNativeFeatureFlagsCxxSpecJSI {
3534
public:
3635
NativeReactNativeFeatureFlags(std::shared_ptr<CallInvoker> jsInvoker);
3736

37+
static constexpr std::string_view kModuleName = "NativeReactNativeFeatureFlagsCxx";
38+
3839
bool commonTestFlag(jsi::Runtime& runtime);
3940

4041
bool commonTestFlagWithoutNativeImplementation(jsi::Runtime& runtime);

packages/react-native/scripts/featureflags/templates/js/NativeReactNativeFeatureFlags.cpp-template.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ namespace facebook::react {
4343
4444
NativeReactNativeFeatureFlags::NativeReactNativeFeatureFlags(
4545
std::shared_ptr<CallInvoker> jsInvoker)
46-
: NativeReactNativeFeatureFlagsCxxSpec(std::move(jsInvoker)) {}
46+
: NativeReactNativeFeatureFlagsCxxSpecJSI(std::move(jsInvoker)) {}
4747
4848
${Object.entries(definitions.common)
4949
.map(([flagName, flagConfig]) =>

packages/react-native/scripts/featureflags/templates/js/NativeReactNativeFeatureFlags.h-template.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,12 @@ ${DO_NOT_MODIFY_COMMENT}
3838
namespace facebook::react {
3939
4040
class NativeReactNativeFeatureFlags
41-
: public NativeReactNativeFeatureFlagsCxxSpec<
42-
NativeReactNativeFeatureFlags> {
41+
: public NativeReactNativeFeatureFlagsCxxSpecJSI {
4342
public:
4443
NativeReactNativeFeatureFlags(std::shared_ptr<CallInvoker> jsInvoker);
4544
45+
static constexpr std::string_view kModuleName = "NativeReactNativeFeatureFlagsCxx";
46+
4647
${Object.entries(definitions.common)
4748
.map(
4849
([flagName, flagConfig]) =>

0 commit comments

Comments
 (0)