( root: FiberRootNode, unitOfWork: FiberNode, thrownValue: any, lane: Lane )
| 450 | } |
| 451 | |
| 452 | function throwAndUnwindWorkLoop( |
| 453 | root: FiberRootNode, |
| 454 | unitOfWork: FiberNode, |
| 455 | thrownValue: any, |
| 456 | lane: Lane |
| 457 | ) { |
| 458 | // unwind前的重置hook,避免 hook0 use hook1 时 use造成中断,再恢复时前后hook对应不上 |
| 459 | resetHooksOnUnwind(unitOfWork); |
| 460 | throwException(root, thrownValue, lane); |
| 461 | unwindUnitOfWork(unitOfWork); |
| 462 | } |
| 463 | |
| 464 | function unwindUnitOfWork(unitOfWork: FiberNode) { |
| 465 | let incompleteWork: FiberNode | null = unitOfWork; |
no test coverage detected