dillon1000/react
Commit
Browse files [Fizz] Fix aborts during resumed rendering (#36584)
Stacked on #36583 Fizz previously identified a task that was rendering during an abort by marking its blocked Segment as `RENDERING`. This does not work for resumed replay tasks because they do not have a Segment, so an abort during replay could eagerly abort the task before it unwound and then report the internal `null` throw instead of the abort reason. Track the task currently executing on the Request so aborting can leave the in-flight task to unwind through its normal error path for both render and replay tasks. Since this replaces the only purpose of the Segment `RENDERING` status, remove that status and its associated bookkeeping. When resumed work unwinds after aborting, use the request's abort reason in the replay catch paths so aborting while replaying a prerendered tree or while rendering a resumed segment reports the meaningful abort reason instead of the internal control-flow value.
Changed paths2 files
First-parent comparisonpackages/react-dom/src/__tests__/ReactDOMFizzStaticBrowser-test.js ModifiedM packages/react-server/src/ReactFizzServer.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…