(unitOfWork: FiberNode)
| 462 | } |
| 463 | |
| 464 | function unwindUnitOfWork(unitOfWork: FiberNode) { |
| 465 | let incompleteWork: FiberNode | null = unitOfWork; |
| 466 | do { |
| 467 | const next = unwindWork(incompleteWork); |
| 468 | |
| 469 | if (next !== null) { |
| 470 | next.flags &= HostEffectMask; |
| 471 | workInProgress = next; |
| 472 | return; |
| 473 | } |
| 474 | |
| 475 | const returnFiber = incompleteWork.return as FiberNode; |
| 476 | if (returnFiber !== null) { |
| 477 | returnFiber.deletions = null; |
| 478 | } |
| 479 | incompleteWork = returnFiber; |
| 480 | // workInProgress = incompleteWork; |
| 481 | } while (incompleteWork !== null); |
| 482 | |
| 483 | // 没有 边界 中止unwind流程,一直到root |
| 484 | workInProgress = null; |
| 485 | workInProgressRootExitStatus = RootDidNotComplete; |
| 486 | } |
no test coverage detected