Skip to content

[Fizz] Add Owner Stacks when render is aborted #32735

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 2, 2025

Conversation

eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Mar 25, 2025

Summary

captureOwnerStack now returns the corresponding owner stack to the parent stack when we abort a Fizz render.

How did you test this change?

  • added test (initial commit has current behavior)

@eps1lon eps1lon changed the title Sebbie/fizz abort ownerstack [Fizz] Add Owner Stacks when render is aborted Mar 25, 2025
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Mar 25, 2025
@react-sizebot
Copy link

react-sizebot commented Mar 25, 2025

Comparing: 526dd34...1fa57c6

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 = 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 529.84 kB 529.84 kB = 93.52 kB 93.52 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB +0.05% 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 650.94 kB 650.94 kB = 114.65 kB 114.65 kB
facebook-www/ReactDOM-prod.classic.js = 675.89 kB 675.89 kB = 118.93 kB 118.93 kB
facebook-www/ReactDOM-prod.modern.js = 666.17 kB 666.17 kB = 117.32 kB 117.32 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable-semver/react-server/cjs/react-server.development.js +0.23% 192.92 kB 193.36 kB +0.25% 34.21 kB 34.29 kB
oss-stable/react-server/cjs/react-server.development.js +0.23% 192.92 kB 193.36 kB +0.25% 34.21 kB 34.29 kB
oss-experimental/react-server/cjs/react-server.development.js +0.21% 210.04 kB 210.48 kB +0.22% 36.40 kB 36.48 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer-server.development.js +0.20% 7.93 kB 7.95 kB = 1.67 kB 1.67 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer-server.development.js +0.20% 7.93 kB 7.95 kB = 1.67 kB 1.67 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer-server.development.js +0.20% 7.93 kB 7.95 kB = 1.67 kB 1.67 kB

Generated by 🚫 dangerJS against 1fa57c6

@eps1lon eps1lon force-pushed the sebbie/fizz-abort-ownerstack branch from 0114c88 to c819e57 Compare March 25, 2025 05:16
@eps1lon eps1lon force-pushed the sebbie/fizz-abort-ownerstack branch 2 times, most recently from 404c603 to 8c0c76a Compare March 25, 2025 05:19
@@ -311,6 +311,7 @@ function render(children: React$Element<any>, options?: Options): Destination {
children,
null,
null,
null,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise the optional on* callbacks were not lined up correctly.

'\n in Component (at **)' + '\n in App (at **)',
);
expect(normalizeCodeLocInfo(ownerStack)).toEqual(
__DEV__ ? '\n in App (at **)' : null,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, the stack would start at Component

@eps1lon eps1lon marked this pull request as ready for review March 25, 2025 05:32
@eps1lon eps1lon requested a review from sebmarkbage March 25, 2025 05:32
@eps1lon eps1lon force-pushed the sebbie/fizz-abort-ownerstack branch from 8c0c76a to 1fa57c6 Compare June 2, 2025 17:11
@eps1lon eps1lon merged commit 4a1f290 into facebook:main Jun 2, 2025
240 checks passed
@eps1lon eps1lon deleted the sebbie/fizz-abort-ownerstack branch June 2, 2025 17:28
github-actions bot pushed a commit that referenced this pull request Jun 2, 2025
github-actions bot pushed a commit to code/lib-react that referenced this pull request Jun 2, 2025
github-actions bot pushed a commit to code/lib-react that referenced this pull request Jun 2, 2025
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.

4 participants