()
| 1886 | } |
| 1887 | |
| 1888 | function resetWorkInProgressStack() { |
| 1889 | if (workInProgress === null) return; |
| 1890 | let interruptedWork; |
| 1891 | if (workInProgressSuspendedReason === NotSuspended) { |
| 1892 | // Normal case. Work-in-progress hasn't started yet. Unwind all |
| 1893 | // its parents. |
| 1894 | interruptedWork = workInProgress.return; |
| 1895 | } else { |
| 1896 | // Work-in-progress is in suspended state. Reset the work loop and unwind |
| 1897 | // both the suspended fiber and all its parents. |
| 1898 | resetSuspendedWorkLoopOnUnwind(workInProgress); |
| 1899 | interruptedWork = workInProgress; |
| 1900 | } |
| 1901 | while (interruptedWork !== null) { |
| 1902 | const current = interruptedWork.alternate; |
| 1903 | unwindInterruptedWork( |
| 1904 | current, |
| 1905 | interruptedWork, |
| 1906 | workInProgressRootRenderLanes, |
| 1907 | ); |
| 1908 | interruptedWork = interruptedWork.return; |
| 1909 | } |
| 1910 | workInProgress = null; |
| 1911 | } |
| 1912 | |
| 1913 | function finalizeRender(lanes: Lanes, finalizationTime: number): void { |
| 1914 | if (enableProfilerTimer && enableComponentPerformanceTrack) { |
no test coverage detected