Commit Graph
2391 Commits
Author SHA1 Message Date
Alex HuntandFacebook GitHub Bot 011425358a Support CDP response previews (#52487)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52487

Continues integration of `NetworkReporter` (jsinspector-modern) on Android, to enable the Network panel in React Native DevTools.

NOTE: As with iOS, all changes are gated behind the `enableNetworkEventReporting` and `fuseboxNetworkInspectionEnabled` feature flags.

**This diff**

Integrates `Network.storeRequestBody` on Android (CDP: [`Network.getResponseBody`](https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-getResponseBody) CDP event) to populate the "Preview" and "Response" tabs in the React Native DevTools Network panel.

This is integrated with `NetworkingModule.kt` to support synchronously received `text` or `blob` data types, with incremental response support added next in D77927896.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D77799617

fbshipit-source-id: 495baebbb3b447d1ea86705c1680578eed796d78
2025-07-14 09:07:10 -07:00
generatedunixname89002005287564andFacebook GitHub Bot bb0c370ab7 Fix CQS signal performance-faster-string-find in xplat/js/react-native-github/packages (#52579)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52579

Reviewed By: javache

Differential Revision: D78252727

fbshipit-source-id: 97c746e6d57901f4995dd733c51e2b33e1f44a17
2025-07-14 07:22:53 -07:00
Jakub PiaseckiandFacebook GitHub Bot 1d452b17bf Release cached images when image component gets recycled on iOS (#51493)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51493

Changelog: [IOS][FIXED] Don't retain cached images in state after `RCTImageComponentView` gets recycled

Fixes https://github.com/facebook/react-native/issues/51198

Crosspost from the task comment:
From what I've been able to figure out, it seems like the image shadow nodes (keeping the loaded image in state) are being kept in memory by shadow node reference wrappers. It doesn't seem strictly like a memory leak - manually triggering garbage collection causes those nodes to be deallocated, but since Hermes isn't aware of the memory they are retaining, I think, it doesn't trigger it automatically.

This diff releases the image data when the observers are notified and adds a new (`Consumed`) status to signify that.

Reviewed By: sammy-SC

Differential Revision: D75137263

fbshipit-source-id: 97eda7e6d1ef5cd633c4a5a4c37babc5e08968fb
2025-07-14 01:11:54 -07:00
Jakub PiaseckiandFacebook GitHub Bot 6747f2b118 Add releaseImageDataWhenConsumed feature flag (#52527)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52527

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D78085001

fbshipit-source-id: 0786d5e6dcd4e41e23eef2dac1a6fec6fb800aef
2025-07-14 01:11:54 -07:00
Ramanpreet NaraandFacebook GitHub Bot 42ea4bc594 feature-flags: Prefix "eager" to "main queue modules" flag (#52543)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52543

Prefixing "eager" to the name makes it less confusing.  React native already has main queue modules: they're just lazy.

Changelog: [Internal]

Reviewed By: lunaleaps

Differential Revision: D78109287

fbshipit-source-id: 5fa6095d2dd8fcf74fdda64e05483eb487bc8f56
2025-07-11 22:47:07 -07:00
Ramanpreet NaraandFacebook GitHub Bot 24777bba07 Cleanup "disable main queue sync dispatch ios" infra (#52544)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52544

Let's remove these runtime errors for now. We can re-introduce this later, if needed.

Main queue coordinator will make "unsafe execute on main queue sync" not deadlock.

Changelog: [Internal]

Reviewed By: lunaleaps

Differential Revision: D78109286

fbshipit-source-id: 7c3acc2e560e341889d8ede4665bc70fefc2f058
2025-07-11 22:47:07 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 77db9343b1 Fix CQS signal modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon (#52569)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52569

Reviewed By: dtolnay

Differential Revision: D78146649

fbshipit-source-id: 0878130feeda20c746d7fd53a00b376cde61a502
2025-07-11 11:06:18 -07:00
generatedunixname89002005287564andFacebook GitHub Bot b8550251d8 Fix CQS signal performance-faster-string-find in xplat/js/react-native-github/packages/react-native/ReactCommon/react/runtime (#52568)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52568

Reviewed By: dtolnay

Differential Revision: D78146248

fbshipit-source-id: 8b93b09d46832d6e67c1ded075eb99b9bdd1f0e2
2025-07-11 10:41:33 -07:00
Christoph PurrerandFacebook GitHub Bot 5dc3e18671 Fix loop iteration in Transform::Interpolate(... (#52548)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52548

Changelog: [Internal]

While this does not cause real crashes as the code is already gated via
```
bool haveRHS = j < rhs.operations.size();
```
it still represents a bug in the logic

Reviewed By: rshest

Differential Revision: D78133364

fbshipit-source-id: 80efc97b5174e3d0d7efe33604255a96bc856e87
2025-07-11 09:28:23 -07:00
Rubén NorteandFacebook GitHub Bot 6f6945e64f Propagate console.timeStamp entries to Perfetto (#52542)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52542

Changelog: [internal]

This adds support to propagate performance entries logged to `console.timeStamp` to Perfetto, if enabled. It also modifies the Perfetto integration to support track groups, in addition to track names.

Reviewed By: hoxyq

Differential Revision: D78092596

fbshipit-source-id: 76b0fe2738d856fd75ee941de223d6a6a73d8e1c
2025-07-11 08:41:01 -07:00
Christoph PurrerandFacebook GitHub Bot 88cb7832ea Remove unused Color/Transform #includes and use enum class for TransformOperationType (#52549)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52549

Changelog: [Internal]

- The #includes are not used
- `enum class` is C++, (enum is C)

Reviewed By: rshest

Differential Revision: D78135339

fbshipit-source-id: 1a35301ea063ce17c195be7dc373132d342f111a
2025-07-11 06:51:49 -07:00
Harini MalothuandFacebook GitHub Bot ff38d59cff # Fixed Type Conversion Error in DynamicEventPayload (#52525)
Summary:
Resolves https://github.com/microsoft/react-native-windows/issues/14797
We were facing a type conversion error in the DynamicEventPayload::extractValue() method. The function signature declares a return type of std::optional<double>, but when handling INT64 values, but when handling `INT64` values, the code was directly returning `dynamic.asInt()` without proper type conversion
We faced the issue while integrating https://github.com/microsoft/react-native-windows/pull/14791
## Changelog:
[General][Fixed]

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

Test Plan:
The fix involved wrapping the dynamic.asInt() call with static_cast<double>(), creating the corrected line: return static_cast<double>(dynamic.asInt())

Tested E2E in RNW

Reviewed By: andrewdacenko

Differential Revision: D78083842

Pulled By: rshest

fbshipit-source-id: 8dbedd67fa7c21e89b863d8b1bc7b9e0d7978b9f
2025-07-11 03:13:30 -07:00
Jakub PiaseckiandFacebook GitHub Bot d4b36b0300 Fix display: contents nodes not being cloned with the wrong owner (#52530)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52530

This PR fixes two issues with `display: contents` implementation:
1. When a node with `display: contents` set is a leaf, it won't be cloned after the initial tree is built. The added test case covers this scenario.
2. It was possible for the subtree of `display: contents` nodes not to be cloned during layout. I don't have a minimal reproduction for this one, unfortunately. It was discovered in the Expensify app: https://github.com/Expensify/App/issues/65268, along with a consistent reproduction. In that specific case, it seems to be heavily tied to `react-native-onyx`, which is a state management library.

Changelog: [GENERAL][FIXED] - Fixed nodes with `display: contents` set being cloned with the wrong owner

X-link: https://github.com/facebook/yoga/pull/1826

Reviewed By: adityasharat, NickGerleman

Differential Revision: D78084270

Pulled By: j-piasecki

fbshipit-source-id: eb81f6d7dcd1665974d07261ba693e2abea239bb
2025-07-11 02:16:35 -07:00
Nick LefeverandFacebook GitHub Bot 6b8bc5a1d0 Move toDynamic conversion for FilterFunction (#52537)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52537

See title

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D78088447

fbshipit-source-id: 3f3a1e82e527cfe83de7a798b8b9ea2996dc8de1
2025-07-10 12:35:18 -07:00
Nick LefeverandFacebook GitHub Bot 0144798e25 Move toDynamic conversion for BoxShadow (#52536)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52536

See title

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D78005880

fbshipit-source-id: 5a4b7ff3c4d9c6ece17759926ee80aec80d3cde0
2025-07-10 12:35:18 -07:00
Nicola CortiandFacebook GitHub Bot 4d1f1a4e29 Back out "Remove ShadowNodeTraits::Trait::DirtyYogaNode" (#52528)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52528

This was a breaking change that is currently breaking `react-native-safe-area-context` so we can't ship it as it is, especially because all the apps in OSS will be affected by this.

Changelog:
[General] [Changed] - Revert breaking change due to the removal of `ShadowNodeTraits::Trait::DirtyYogaNode`

Original commit changeset: 869e81f0ae00

Original Phabricator Diff: D75324251

Reviewed By: huntie

Differential Revision: D78085848

fbshipit-source-id: f7fcc5e33d59cc966a4ee88dfdbedca4f4c580e0
2025-07-10 09:36:54 -07:00
Christoph PurrerandFacebook GitHub Bot a98ee9147a Add noexcept specifications to Transform and Color methods (#52497)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52497

Changelog: [Internal]

Is a good practice (and can reduce binary size):
https://cpp-core-guidelines-docs.vercel.app/errors#Re-noexcept

Reviewed By: philIip

Differential Revision: D77988686

fbshipit-source-id: 575c18aa0c8f593f363f4450e9e06d41c97a3d1a
2025-07-10 09:17:08 -07:00
Christian FalchandFacebook GitHub Bot 40e45f5366 add support for USE_FRAMEWORKS when using prebuilt React Native Core (#52489)
Summary:
When using prebuilts the USE_FRAMEWORKS setting is not really relevant for the React Native code, since there will not be any source code to build frameworks for - and because we already have a framework for the code in React.XCFramework.

This commit adds a new command to the React Native podspecs like we did with the ReactNativeDependencies framework. The method is called `add_rncore_dependency` and it does nothing when building from source - but when linking with the React.XCFramework it explicitly adds linking with the framework.

In addition there are a few places in the ruby code where we check for the USE_FRAMEWORK value and changes some settings - where needed this commit will add a separate check to ensure we're building from source when making these changes.

bypass-github-export-checks

## Changelog:

[IOS] [ADDED] - Added support for using USE_FRAMEWORKS with prebuilt React Native Core

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

Test Plan:
RNTester:

- Builds without USE_FRAMEWORKS as before with/without prebuilt
- Builds with USE_FRAMEWORKS=dynamic as before with source - and now also with prebuilt code.
- Same goes for the static variant.

Reviewed By: mdvacca

Differential Revision: D78012332

Pulled By: cipolleschi

fbshipit-source-id: ea942738ae52b9dceae48fb78a5026f04b7545b8
2025-07-10 03:04:07 -07:00
Luna WeiandFacebook GitHub Bot e40c10b9f6 Introduce experimental VirtualView (#52519)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52519

Changelog: [Internal] - Experiment with intersection logic for VirtualViews in scrollView. Currently only on Android

### Changes in detail
`VirtualViewContainer` is held by the ScrollView and is lazily instantiated once a VirtualView tries to access.

Upon initial layout, a VirtualView will add itself to the container and report its updated `rect`. `VirtualViewContainer` holds a sorted list of VirtualViews and iterates through them to update mode

Reviewed By: yungsters

Differential Revision: D77313890

fbshipit-source-id: 30843143bf1828dcac9091479964e83934bf330c
2025-07-09 21:12:45 -07:00
Eric RozellandFacebook GitHub Bot 57c5eee51f Delete animatedShouldSignalBatch feature flag (#52521)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52521

Progress is moving quickly on the cxxNativeAnimatedEnabled flag, which this animatedShouldSignalBatch was intended to de-risk. We no longer need this flag to de-risk issues with animated batch flushing.

## Changelog

[Internal]

Reviewed By: christophpurrer

Differential Revision: D78005971

fbshipit-source-id: 719f1dfb0594fbe90dd6f08dea21ad20665832df
2025-07-09 20:15:57 -07:00
Vineeth KandFacebook GitHub Bot 586f5ba89c Added fix to use accessibility source props (#52397)
Summary:
accessibilityRole is not getting the default value from sourceProps.

This change will fix https://github.com/facebook/react-native/issues/52396

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Fixed accessibilityRole parsing.
Pick one each for the category and type tags:

[GENERAL] [FIXED] - Added fix for setting the default value for accessibility props

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

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

Test Plan: After this change accessibilityRole will get the default value from sourceProps.

Reviewed By: joevilches

Differential Revision: D77879025

Pulled By: NickGerleman

fbshipit-source-id: c2fd10dd34462e2cd01488b720ba91e4f1998000
2025-07-09 18:33:59 -07:00
Ruslan LesiutinandFacebook GitHub Bot dfce5c7180 console.timeStamp: support warning color (#52511)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52511

# Changelog: [Internal]

This is actually used in React for logging triggers, like Mount / Unmount / Reconnect / Disconnect.

Reviewed By: huntie

Differential Revision: D78008351

fbshipit-source-id: 9d39d45da499ce78172531c00cc7465b985c2646
2025-07-09 09:26:47 -07:00
Christoph PurrerandFacebook GitHub Bot 52815c2724 Improve NativeDOM Turbo Module typing (#52494)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52494

Changelog: [Internal]

- Use C++ private namespace instead of C static methods
- Strongly type C++ TM functions via AsyncCallback

Reviewed By: javache

Differential Revision: D77978354

fbshipit-source-id: 2274b95cfc5b65392fc3c808bbdf54ec4ab3a37e
2025-07-09 08:40:25 -07:00
Anupriya VermaandFacebook GitHub Bot 2ca88a0069 'return': conversion from 'int' to 'uint8_t', possible loss of data in CSSHexColor (#52496)
Summary:
Resolves https://github.com/microsoft/react-native-windows/issues/14666
We faced this issue while integrating [0.79.0-nightly-20250220-41b597c73](https://github.com/microsoft/react-native-windows/pull/14662/files#top)

This warning is treated as error and should be fixed here as well.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[GENERAL] [FIXED] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

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

Test Plan:
Fixed error:
##[error]node_modules\react-native\ReactCommon\react\renderer\css\CSSHexColor.h(39,12): Error C4244: 'return': conversion from 'int' to 'uint8_t', possible loss of data
2>D:\a_work\1\s\node_modules\react-native\ReactCommon\react\renderer\css\CSSHexColor.h(39,12): error C4244: 'return': conversion from 'int' to 'uint8_t', possible loss of data [D:\a_work\1\s\vnext\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj]
(compiling source file '../../node_modules/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.cpp')

Tested E2E in RNW

Reviewed By: javache

Differential Revision: D78000818

Pulled By: rshest

fbshipit-source-id: 5caafc5e92540f722b009480f030276e526355af
2025-07-09 05:05:52 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 47957f9adc 60 (#52493)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52493

Reviewed By: dtolnay

Differential Revision: D77920274

fbshipit-source-id: 42a68d5666f43f606ebcbbe4d207bb9b299760e7
2025-07-09 04:56:35 -07:00
Ruslan LesiutinandFacebook GitHub Bot f000116197 Fix Timestamps conversion for Custom Tracks (#52479)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52479

# Changelog: [Internal]

The previous cast is incorrect.

Reviewed By: javache

Differential Revision: D77894512

fbshipit-source-id: 67e6b9a4ed43020a343a2a9b5d702509c34ae41a
2025-07-08 04:34:14 -07:00
Christoph PurrerandFacebook GitHub Bot ead669ade3 Remove unused ReactCommon/TurboModuleUtils functions #deepCopyJSIObject and #deepCopyJSIArray (#52443)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52443

Changelog: [General][Breaking] Remove unused ReactCommon/TurboModuleUtils functions #deepCopyJSIObject and #deepCopyJSIArray

Those are not used anymore

Reviewed By: cortinico

Differential Revision: D77771186

fbshipit-source-id: e1f5e34238567241b4204d58ff85fd9067e321df
2025-07-07 11:04:01 -07:00
Christoph PurrerandFacebook GitHub Bot 06034554e4 Remove SampleTurboCxxModule example (#52442)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52442

Changelog: [Internal]

The sample is from an outdated approach of enabling C++ Modules in RN which is not recommended anymore.

Prefer C++ Turbo Modules if you need to expose / access C or C++ APIs in RN apps:

https://reactnative.dev/docs/the-new-architecture/pure-cxx-modules

It is not included in any RNTester app at this time

Reviewed By: cortinico

Differential Revision: D77771111

fbshipit-source-id: a4fe1d13fd0224babc46f54b921a036f7b237a48
2025-07-07 09:37:37 -07:00
Samuel SuslaandFacebook GitHub Bot 298ec6ca5d Deprecate ShadowNode::ListOfWeak and replace with std::vector<std::weak_ptr<const ShadowNode>> (#52401)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52401

changelog: [internal]

- Mark ShadowNode::ListOfWeak as deprecated with appropriate deprecation message
- Replace all usages of ShadowNode::ListOfWeak with std::vector<std::weak_ptr<const ShadowNode>>
- Updated primitives.h and ReactNativeCPP.api to use the explicit type instead of the alias

This change continues the effort to remove type aliases in favor of explicit standard library types for better code clarity and maintainability.

Reviewed By: christophpurrer

Differential Revision: D77652083

fbshipit-source-id: 79cad019e039c19f661346604ff49a44a4af7a79
2025-07-07 09:29:57 -07:00
Christoph PurrerandFacebook GitHub Bot c1200718a0 Move RuntimeExecutor after copying it into BufferedRuntimeExecutor (#52404)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52404

Changelog: [Internal]

https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/runtimeexecutor/ReactCommon/RuntimeExecutor.h#L23

is a copy-able type (it will be copied when passed into the BufferedRuntimeExecutor constructor).

Hence we can `std::move` it in the `BufferedRuntimeExecutor` constructor

Reviewed By: javache

Differential Revision: D77758211

fbshipit-source-id: 634b1cd0e1ed4d27a013ad8927b2123dc6977ad8
2025-07-07 08:59:56 -07:00
Rubén NorteandFacebook GitHub Bot e6bff3f1fe Add tests for performance.eventCounts (#52463)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52463

Changelog: [internal]

This adds Fantom tests for `performance.eventCounts`.

Reviewed By: huntie

Differential Revision: D77860881

fbshipit-source-id: 26b9ef56b9c610cbad7011bc0adde27251fda909
2025-07-07 06:42:23 -07:00
Rubén NorteandFacebook GitHub Bot 74c03b67e3 Fix bugs in performance.mark and performance.measure (#52430)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52430

Changelog: [internal]

(This is marked as internal because this API hasn't been marked as stable yet).

This fixes multiple bugs and missing features in `performance.mark` and `performance.measure`. See re-enabled tests to see the specific behaviors.

Validated that performance isn't regressed by this change using the existing benchmark for `Performance` (`Performance-benchmark-itest`):

* Before

| (index) | Task name                                                 | Latency average (ns) | Latency median (ns) | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | --------------------------------------------------------- | -------------------- | ------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'mark (default)'                                          | '5557.96 ± 0.34%'    | '5459.00'           | '182114 ± 0.02%'           | '183184'                  | 179922  |
| 1       | 'mark (with custom startTime)'                            | '5664.54 ± 1.71%'    | '5518.00'           | '180296 ± 0.02%'           | '181225'                  | 176537  |
| 2       | 'measure (with start and end timestamps)'                 | '6653.62 ± 0.94%'    | '6530.00'           | '152296 ± 0.02%'           | '153139'                  | 150295  |
| 3       | 'measure (with mark names)'                               | '6903.37 ± 0.42%'    | '6790.00'           | '146429 ± 0.02%'           | '147275'                  | 144857  |
| 4       | 'clearMarks'                                              | '782.98 ± 0.04%'     | '771.00'            | '1287735 ± 0.01%'          | '1297017'                 | 1277173 |
| 5       | 'clearMeasures'                                           | '792.24 ± 0.03%'     | '781.00'            | '1270847 ± 0.01%'          | '1280410'                 | 1262238 |
| 6       | 'mark + clearMarks'                                       | '5883.69 ± 0.52%'    | '5759.00'           | '172863 ± 0.02%'           | '173641'                  | 169962  |
| 7       | 'measure + clearMeasures (with start and end timestamps)' | '7222.22 ± 0.68%'    | '7021.00'           | '141204 ± 0.02%'           | '142430'                  | 138462  |
| 8       | 'measure + clearMeasures (with mark names)'               | '7234.53 ± 0.34%'    | '7121.00'           | '139600 ± 0.02%'           | '140430'                  | 138227  |

* After

| (index) | Task name                                                 | Latency average (ns) | Latency median (ns) | Throughput average (ops/s) | Throughput median (ops/s) | Samples |
| ------- | --------------------------------------------------------- | -------------------- | ------------------- | -------------------------- | ------------------------- | ------- |
| 0       | 'mark (default)'                                          | '5579.80 ± 0.32%'    | '5479.00'           | '181368 ± 0.02%'           | '182515'                  | 179218  |
| 1       | 'mark (with custom startTime)'                            | '5759.72 ± 0.99%'    | '5648.00'           | '176162 ± 0.02%'           | '177054'                  | 173620  |
| 2       | 'measure (with start and end timestamps)'                 | '6506.38 ± 0.34%'    | '6390.00'           | '155503 ± 0.02%'           | '156495'                  | 153696  |
| 3       | 'measure (with mark names)'                               | '6770.94 ± 0.72%'    | '6620.00'           | '149833 ± 0.03%'           | '151057'                  | 147691  |
| 4       | 'clearMarks'                                              | '785.89 ± 0.07%'     | '771.00'            | '1291356 ± 0.01%'          | '1297017'                 | 1272442 |
| 5       | 'clearMeasures'                                           | '777.98 ± 0.06%'     | '761.00'            | '1303362 ± 0.01%'          | '1314060'                 | 1285383 |
| 6       | 'mark + clearMarks'                                       | '5995.34 ± 1.37%'    | '5779.00'           | '171874 ± 0.03%'           | '173040'                  | 166797  |
| 7       | 'measure + clearMeasures (with start and end timestamps)' | '7040.28 ± 0.57%'    | '6830.00'           | '145289 ± 0.03%'           | '146413'                  | 142040  |
| 8       | 'measure + clearMeasures (with mark names)'               | '7184.43 ± 0.40%'    | '6990.00'           | '141809 ± 0.03%'           | '143062'                  | 139190  |

Reviewed By: huntie

Differential Revision: D77795990

fbshipit-source-id: 97895065ca63f87f1f66710cf7bce97e1255a142
2025-07-07 06:42:23 -07:00
Rubén NorteandFacebook GitHub Bot 2edda6d967 Add basic Fantom tests for performance.mark and performance.measure (#52432)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52432

Changelog: [internal]

This creates a battery of tests for `performance.mark` and `performance.measure`. For this, it was necessary to add a new method in the native module to mock the current time.

Many of the tests are currently failing, as the API doesn't support all the options or behaviors defined in the spec. They're skipped here and will be re-enabled and fixed in a following diff.

Reviewed By: huntie

Differential Revision: D77795989

fbshipit-source-id: 3ebf18c8ac336df1fb43003a55a4678b52e8982d
2025-07-07 06:42:23 -07:00
Samuel SuslaandFacebook GitHub Bot 1c51d6684b Deprecate ShadowNode::ListOfShared and migrate to std::vector<std::shared_ptr<const ShadowNode>> (#52402)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52402

changelog: [internal]

Mark ShadowNode::ListOfShared as deprecated and replace most usages throughout the React Native renderer codebase with the explicit std::vector<std::shared_ptr<const ShadowNode>> type. This improves code clarity by making the container type explicit rather than relying on a type alias.

Reviewed By: christophpurrer

Differential Revision: D77651676

fbshipit-source-id: 8c4bd9b8cbbe467384b947ef9e7a4524f2053e36
2025-07-07 06:15:29 -07:00
Christoph PurrerandFacebook GitHub Bot 7998914471 Remove outdated SampleTurboCxxModuleLegacyImpl (#52412)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52412

Changelog: [Internal]

The sample is from an outdated approach of enabling C++ Modules in RN which is not recommended anymore.

Prefer C++ Turbo Modules if you need to expose / access C or C++ APIs in RN apps:

https://reactnative.dev/docs/the-new-architecture/pure-cxx-modules

It is not included in any RNTester app at this time

Reviewed By: cortinico

Differential Revision: D77770455

fbshipit-source-id: 987c9f2b9ab4145a2f6a724aad12d8473957dbe8
2025-07-06 22:35:20 -07:00
Christoph PurrerandFacebook GitHub Bot 94aca598c7 Remove unused #include <ReactCommon/TurboModuleUtils.h> (#52411)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52411

Changelog: [Internal]

Reviewed By: javache, cortinico

Differential Revision: D77770244

fbshipit-source-id: a300e377f8c6e52256ae04813c1372799cf5af59
2025-07-06 21:21:48 -07:00
Christoph PurrerandFacebook GitHub Bot 5e650d0105 Remove more unused #includes (#52389)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52389

Changelog: [Internal]

Reviewed By: philIip

Differential Revision: D77706943

fbshipit-source-id: b8662737699ec0857845cfded49302ee9e93b78e
2025-07-06 20:56:16 -07:00
Christoph PurrerandFacebook GitHub Bot 9d5033afb0 Delete non C++ Turbo Module SampleCxxModule (#52407)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52407

Changelog: [Internal]

The sample is from an outdated approach of enabling C++ Modules in RN which is not recommended anymore.

Prefer C++ Turbo Modules if you need to expose / access C or C++ APIs in RN apps:

https://reactnative.dev/docs/the-new-architecture/pure-cxx-modules

Reviewed By: javache

Differential Revision: D77765443

fbshipit-source-id: 112fef4c1a7e1c567f3c1d471728a1dfc926adc6
2025-07-06 19:54:06 -07:00
Christoph PurrerandFacebook GitHub Bot e8709355dc C++ Turbo Module > Allow Promise<void> types (#52388)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52388

Changelog: [Internal]

Similar to `AsyncCallback<>` (the foundation of `AsyncPromise`) we should allow `void` Promise types in C++ such as `AsyncPromise<>`

Reviewed By: rbergerjr

Differential Revision: D77712020

fbshipit-source-id: d7360df5cc1b77f1e03e5fb73b0b468f6e3a415b
2025-07-06 19:53:51 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 255977a7b9 Fix CQS signal modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/react-native/ReactCommon/react/utils (#52444)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52444

Reviewed By: dtolnay

Differential Revision: D77782134

fbshipit-source-id: 99989d45926a0eabcc6e19e12dce396a473e14ce
2025-07-06 13:33:29 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 8531015941 Fix CQS signal modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon [A] (#52437)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52437

Reviewed By: cortinico

Differential Revision: D77790078

fbshipit-source-id: 3188cce596ffa382ca3a9bd27cd0aba8580bbb76
2025-07-06 13:30:04 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 4e62558e43 Fix CQS signal modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/react-native/ReactCommon/react/nativemodule/core/ReactCommon [B] (#52434)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52434

Reviewed By: cortinico

Differential Revision: D77790202

fbshipit-source-id: 35b5bb46e8056cddf874b05bf511754878f0e1fc
2025-07-06 12:32:42 -07:00
generatedunixname89002005287564andFacebook GitHub Bot dcd430721f Fix CQS signal modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/react-native/ReactCommon/reactperflogger/reactperflogger [A] (#52433)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52433

Reviewed By: cortinico

Differential Revision: D77789924

fbshipit-source-id: 017ab5456bf25f40cd4b283d0405498f6e1e2e00
2025-07-04 16:20:30 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 22ccf8a6f5 Fix CQS signal modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/react-native/ReactCommon/reactperflogger/reactperflogger [B] (#52435)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/52435

Reviewed By: cortinico

Differential Revision: D77789998

fbshipit-source-id: 9ac93f890c9df245a105b71369dc91501deb78a4
2025-07-04 15:38:07 -07:00
Samuel SuslaandFacebook GitHub Bot bc4bce61df remove uses of ShadowNode::Shared from ShadowNode.cpp (#52422)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52422

changelog: [internal]

In https://github.com/facebook/react-native/pull/52393 not all uses of ShadowNode::Shared were removed. Github CI fails if a deprecated API is used. Let's remove the last uses.

Reviewed By: cortinico

Differential Revision: D77790411

fbshipit-source-id: 6fbbbffaa784de1f0939d1032dc7ea6586f2ce7d
2025-07-04 04:49:12 -07:00
Samuel SuslaandFacebook GitHub Bot 0e175ce5b6 Mark ShadowNode::Shared as deprecated and replace all usages (#52393)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52393

## Changelog:
[General][Deprecated] - ShadowNode::Shared is now deprecated. Use `std::shared_ptr<const ShadowNode>` instead.

- Mark ShadowNode::Shared as deprecated in ShadowNode.h
- Replace all uses of ShadowNode::Shared with std::shared_ptr<const ShadowNode>.

This continues the systematic effort to remove ShadowNode type aliases in favor of explicit standard library types for improved code clarity and maintainability.

Reviewed By: christophpurrer

Differential Revision: D77650696

fbshipit-source-id: b4769e2a1e39f49d14d5927be105487ecf69fa3f
2025-07-04 00:29:54 -07:00
Christoph PurrerandFacebook GitHub Bot 2ce7eab5f9 Remove unused RAIICallbackWrapperDestroyer (#52390)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52390

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D77710424

fbshipit-source-id: 7c1d7e3181450394311a001af117c6fbdcaeba31
2025-07-03 16:44:16 -07:00
Christoph PurrerandFacebook GitHub Bot 47fe09f505 Make virtual destructors default implemented - instead of empty one (#52382)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52382

Changelog: [Internal]

In C++, both `virtual ~CallInvoker() {}` and `virtual ~CallInvoker() = default` can be used to define a virtual destructor. However, they have slightly different implications:

1. `virtual ~CallInvoker() {}`:
    * This is the traditional way of defining a virtual destructor.
    * It provides an empty implementation for the destructor, which does nothing.
    * The compiler will not generate a default implementation, as you've provided one explicitly.
2. `virtual ~CallInvoker() = default`:
    * This is a more modern way of defining a virtual destructor (introduced in C++11).
    * It tells the compiler to generate a default implementation for the destructor.
    * The default implementation will perform the necessary cleanup operations, such as calling the destructors of base classes and member variables.

In general, `= default` is considered better because it:
* Avoids unnecessary code duplication: By letting the compiler generate the default implementation, you avoid duplicating code that's already generated by the compiler.
* Improves maintainability: If the class has member variables or base classes with non-trivial destructors, using `= default` ensures that the correct cleanup operations are performed without requiring manual updates.
* Conveys intent: Using `= default` clearly indicates that the destructor should perform its default behavior, making the code easier to understand.

So, unless you have a specific reason to provide a custom implementation, `virtual ~CallInvoker() = default` is generally the better choice.

Reviewed By: rshest

Differential Revision: D77685932

fbshipit-source-id: 78c81f8e400069ad38d8d7405dafeb0b6db8e67b
2025-07-03 13:32:28 -07:00
Christoph PurrerandFacebook GitHub Bot 253606239b CallInvoker > Remove unused includes (#52381)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52381

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D77685836

fbshipit-source-id: a01aedf51463d228ca14d37dc4a0869e6e9208c9
2025-07-03 11:56:03 -07:00
Alex HuntandFacebook GitHub Bot f4a9aa3525 Implement connectionTiming and dataReceived NetworkReporter methods (#52335)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52335

Adds support for `Network.requestWillBeSentExtraInfo` and `Network.dataReceived` CDP events in jsinspector-modern and wires up for iOS.

In particular, `Network.requestWillBeSentExtraInfo` is necessary to populate request headers in the UI.

**End of base Network implementation for iOS**

After this diff, we are spec-complete on all CDP Network methods for our V1, on iOS.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D77489476

fbshipit-source-id: 84aa4da9d9fcbdc61eff236fc6bd2136496910a5
2025-07-03 05:01:57 -07:00