Skip to content

Conversation

unstubbable
Copy link
Collaborator

@unstubbable unstubbable commented Sep 11, 2025

When we emit objects of type ReactAsyncInfo, we need to make sure that their owners are outlined, using outlineComponentInfo. Otherwise we would end up accidentally emitting stashed fields that are not part of the transport protocol, specifically debugStack, debugTask, and debugLocation. This would lead to runtime errors in the client, when for example, the stack for a debugLocation is processed in buildFakeCallStack, but the stack was actually omitted from the RSC payload, because for those fields we don't ensure that the object limit is increased by the length of the stack, as we do when we're emitting the stack of a ReactComponentInfo object in outlineComponentInfo.

When we emit objects of type `ReactAsyncInfo`, we need to make sure that
their owners are outlined, using `outlineComponentInfo`. Otherwise we
would end up accidentally emitting stashed fields that are not part of
the transport protocol, specifically `debugStack`, `debugTask`, and
`debugLocation`. This would lead to runtime errors in the client, when
for example, the stack for a `debugLocation` is processed in
`buildFakeCallStack`, but the stack was actually omitted from the RSC
payload because for those fields we don't ensure that the object limit
is increased by the length of the stack, as we do when we're emitting
the `stack` of a `ReactComponentInfo` object in `outlineComponentInfo`.
@meta-cla meta-cla bot added the CLA Signed label Sep 11, 2025
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Sep 11, 2025
@react-sizebot
Copy link

Comparing: b1c519f...380b8cd

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB +0.11% 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 530.65 kB 530.65 kB = 93.49 kB 93.49 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 658.20 kB 658.20 kB = 115.79 kB 115.79 kB
facebook-www/ReactDOM-prod.classic.js = 682.36 kB 682.36 kB = 119.83 kB 119.83 kB
facebook-www/ReactDOM-prod.modern.js = 672.79 kB 672.79 kB = 118.14 kB 118.14 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 380b8cd

@unstubbable unstubbable marked this pull request as ready for review September 11, 2025 11:29
@unstubbable unstubbable changed the title [Flight] Ensure async info owners are outlined [Flight] Ensure async info owners are outlined properly Sep 11, 2025
@unstubbable unstubbable merged commit f3a8036 into facebook:main Sep 11, 2025
250 checks passed
@unstubbable unstubbable deleted the outline-async-info-owner branch September 11, 2025 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants