(config, captureError, scheduleWork, computeExpirationForFiber, markLegacyErrorBoundaryAsFailed, recalculateCurrentTime)
| 10447 | } |
| 10448 | |
| 10449 | var ReactFiberCommitWork = function (config, captureError, scheduleWork, computeExpirationForFiber, markLegacyErrorBoundaryAsFailed, recalculateCurrentTime) { |
| 10450 | var getPublicInstance = config.getPublicInstance, |
| 10451 | mutation = config.mutation, |
| 10452 | persistence = config.persistence; |
| 10453 | |
| 10454 | |
| 10455 | var callComponentWillUnmountWithTimer = function (current, instance) { |
| 10456 | startPhaseTimer(current, 'componentWillUnmount'); |
| 10457 | instance.props = current.memoizedProps; |
| 10458 | instance.state = current.memoizedState; |
| 10459 | instance.componentWillUnmount(); |
| 10460 | stopPhaseTimer(); |
| 10461 | }; |
| 10462 | |
| 10463 | // Capture errors so they don't interrupt unmounting. |
| 10464 | function safelyCallComponentWillUnmount(current, instance) { |
| 10465 | { |
| 10466 | invokeGuardedCallback$3(null, callComponentWillUnmountWithTimer, null, current, instance); |
| 10467 | if (hasCaughtError$1()) { |
| 10468 | var unmountError = clearCaughtError$1(); |
| 10469 | captureError(current, unmountError); |
| 10470 | } |
| 10471 | } |
| 10472 | } |
| 10473 | |
| 10474 | function safelyDetachRef(current) { |
| 10475 | var ref = current.ref; |
| 10476 | if (ref !== null) { |
| 10477 | if (typeof ref === 'function') { |
| 10478 | { |
| 10479 | invokeGuardedCallback$3(null, ref, null, null); |
| 10480 | if (hasCaughtError$1()) { |
| 10481 | var refError = clearCaughtError$1(); |
| 10482 | captureError(current, refError); |
| 10483 | } |
| 10484 | } |
| 10485 | } else { |
| 10486 | ref.current = null; |
| 10487 | } |
| 10488 | } |
| 10489 | } |
| 10490 | |
| 10491 | function commitLifeCycles(finishedRoot, current, finishedWork, currentTime, committedExpirationTime) { |
| 10492 | switch (finishedWork.tag) { |
| 10493 | case ClassComponent: |
| 10494 | { |
| 10495 | var _instance = finishedWork.stateNode; |
| 10496 | if (finishedWork.effectTag & Update) { |
| 10497 | if (current === null) { |
| 10498 | startPhaseTimer(finishedWork, 'componentDidMount'); |
| 10499 | _instance.props = finishedWork.memoizedProps; |
| 10500 | _instance.state = finishedWork.memoizedState; |
| 10501 | _instance.componentDidMount(); |
| 10502 | stopPhaseTimer(); |
| 10503 | } else { |
| 10504 | var prevProps = current.memoizedProps; |
| 10505 | var prevState = current.memoizedState; |
| 10506 | startPhaseTimer(finishedWork, 'componentDidUpdate'); |
no test coverage detected