dillon1000/react
Commit
Browse files [Fizz] Abort tasks that suspend after aborting during render (#36585)
Stacked on #36580 When a task calls `abort()` while it is rendering, Fizz intentionally leaves that task alone during the synchronous abort sweep so it can unwind normally. If the task then suspends before reaching a normal abort check, however, it currently remains pending and does not report the abort reason. This change completes an aborted task once it has unwound back to the retry loop. Instead of treating it as an ordinary render error, it is routed through the existing abort task completion path so prerenders continue to postpone aborted work correctly and replay tasks use aborted resume semantics. If the task suspended through `use()`, preserve its thenable state before completing the abort. This allows DEV async debug info to replay the suspended call site and include it in the owner stack, even though the task began aborting before it suspended. Add coverage for render, prerender, and resumed replay tasks that suspend after initiating an abort, including a real-timer test verifying the suspended call site is retained in DEV owner stacks.
Changed paths4 files
First-parent comparisonpackages/react-dom/src/__tests__/ReactDOMFizzServer-test.js ModifiedM packages/react-dom/src/__tests__/ReactDOMFizzStaticBrowser-test.js ModifiedM packages/react-dom/src/__tests__/ReactDOMFizzStaticNode-test.js ModifiedM packages/react-server/src/ReactFizzServer.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…