Commit 9baecbf
authored
[Fizz] Avoid hanging when suspending after aborting while rendering (#34192)
This fixes an edge case where you abort the render while rendering a
component that ends up Suspending. It technically only applied if you
were deep enough to be inside `renderNode` and was not susceptible to
hanging if the abort + suspending component was being tried inside
retryRenderTask/retryReplaytask.
The fix is to preempt the thenable checks in renderNode and check if the
request is aborting and if so just bubble up to the task handler.
The reason this hung before is a new task would get scheduled after we
had aborted every other task (minus the currently rendering one). This
led to a situation where the task count would not hit zero.1 parent 0422a00 commit 9baecbf
File tree
2 files changed
+57
-5
lines changed- packages
- react-dom/src/__tests__
- react-server/src
2 files changed
+57
-5
lines changedLines changed: 51 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | | - | |
99 | | - | |
| 97 | + | |
100 | 98 | | |
101 | 99 | | |
102 | 100 | | |
| |||
10784 | 10782 | | |
10785 | 10783 | | |
10786 | 10784 | | |
| 10785 | + | |
| 10786 | + | |
| 10787 | + | |
| 10788 | + | |
| 10789 | + | |
| 10790 | + | |
| 10791 | + | |
| 10792 | + | |
| 10793 | + | |
| 10794 | + | |
| 10795 | + | |
| 10796 | + | |
| 10797 | + | |
| 10798 | + | |
| 10799 | + | |
| 10800 | + | |
| 10801 | + | |
| 10802 | + | |
| 10803 | + | |
| 10804 | + | |
| 10805 | + | |
| 10806 | + | |
| 10807 | + | |
| 10808 | + | |
| 10809 | + | |
| 10810 | + | |
| 10811 | + | |
| 10812 | + | |
| 10813 | + | |
| 10814 | + | |
| 10815 | + | |
| 10816 | + | |
| 10817 | + | |
| 10818 | + | |
| 10819 | + | |
| 10820 | + | |
| 10821 | + | |
| 10822 | + | |
| 10823 | + | |
| 10824 | + | |
| 10825 | + | |
| 10826 | + | |
| 10827 | + | |
| 10828 | + | |
| 10829 | + | |
| 10830 | + | |
| 10831 | + | |
| 10832 | + | |
| 10833 | + | |
| 10834 | + | |
10787 | 10835 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4155 | 4155 | | |
4156 | 4156 | | |
4157 | 4157 | | |
4158 | | - | |
| 4158 | + | |
| 4159 | + | |
| 4160 | + | |
4159 | 4161 | | |
4160 | 4162 | | |
4161 | 4163 | | |
| |||
4254 | 4256 | | |
4255 | 4257 | | |
4256 | 4258 | | |
4257 | | - | |
| 4259 | + | |
| 4260 | + | |
| 4261 | + | |
4258 | 4262 | | |
4259 | 4263 | | |
4260 | 4264 | | |
| |||
0 commit comments