(config, captureError, scheduleWork, computeExpirationForFiber, markLegacyErrorBoundaryAsFailed, recalculateCurrentTime)
| 11465 | } |
| 11466 | |
| 11467 | var ReactFiberCommitWork = function (config, captureError, scheduleWork, computeExpirationForFiber, markLegacyErrorBoundaryAsFailed, recalculateCurrentTime) { |
| 11468 | var getPublicInstance = config.getPublicInstance, |
| 11469 | mutation = config.mutation, |
| 11470 | persistence = config.persistence; |
| 11471 | |
| 11472 | |
| 11473 | var callComponentWillUnmountWithTimer = function (current, instance) { |
| 11474 | startPhaseTimer(current, 'componentWillUnmount'); |
| 11475 | instance.props = current.memoizedProps; |
| 11476 | instance.state = current.memoizedState; |
| 11477 | instance.componentWillUnmount(); |
| 11478 | stopPhaseTimer(); |
| 11479 | }; |
| 11480 | |
| 11481 | // Capture errors so they don't interrupt unmounting. |
| 11482 | function safelyCallComponentWillUnmount(current, instance) { |
| 11483 | { |
| 11484 | invokeGuardedCallback$3(null, callComponentWillUnmountWithTimer, null, current, instance); |
| 11485 | if (hasCaughtError$1()) { |
| 11486 | var unmountError = clearCaughtError$1(); |
| 11487 | captureError(current, unmountError); |
| 11488 | } |
| 11489 | } |
| 11490 | } |
| 11491 | |
| 11492 | function safelyDetachRef(current) { |
| 11493 | var ref = current.ref; |
| 11494 | if (ref !== null) { |
| 11495 | if (typeof ref === 'function') { |
| 11496 | { |
| 11497 | invokeGuardedCallback$3(null, ref, null, null); |
| 11498 | if (hasCaughtError$1()) { |
| 11499 | var refError = clearCaughtError$1(); |
| 11500 | captureError(current, refError); |
| 11501 | } |
| 11502 | } |
| 11503 | } else { |
| 11504 | ref.current = null; |
| 11505 | } |
| 11506 | } |
| 11507 | } |
| 11508 | |
| 11509 | function commitLifeCycles(finishedRoot, current, finishedWork, currentTime, committedExpirationTime) { |
| 11510 | switch (finishedWork.tag) { |
| 11511 | case ClassComponent: |
| 11512 | { |
| 11513 | var _instance = finishedWork.stateNode; |
| 11514 | if (finishedWork.effectTag & Update) { |
| 11515 | if (current === null) { |
| 11516 | startPhaseTimer(finishedWork, 'componentDidMount'); |
| 11517 | _instance.props = finishedWork.memoizedProps; |
| 11518 | _instance.state = finishedWork.memoizedState; |
| 11519 | _instance.componentDidMount(); |
| 11520 | stopPhaseTimer(); |
| 11521 | } else { |
| 11522 | var prevProps = current.memoizedProps; |
| 11523 | var prevState = current.memoizedState; |
| 11524 | startPhaseTimer(finishedWork, 'componentDidUpdate'); |
no test coverage detected