(unitOfWork)
| 25836 | } |
| 25837 | |
| 25838 | function performUnitOfWork(unitOfWork) { |
| 25839 | // The current, flushed, state of this fiber is the alternate. Ideally |
| 25840 | // nothing should rely on this, but relying on it here means that we don't |
| 25841 | // need an additional field on the work in progress. |
| 25842 | var current = unitOfWork.alternate; |
| 25843 | startWorkTimer(unitOfWork); |
| 25844 | setCurrentFiber(unitOfWork); |
| 25845 | var next; |
| 25846 | |
| 25847 | if ( (unitOfWork.mode & ProfileMode) !== NoMode) { |
| 25848 | startProfilerTimer(unitOfWork); |
| 25849 | next = beginWork$1(current, unitOfWork, renderExpirationTime$1); |
| 25850 | stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true); |
| 25851 | } else { |
| 25852 | next = beginWork$1(current, unitOfWork, renderExpirationTime$1); |
| 25853 | } |
| 25854 | |
| 25855 | resetCurrentFiber(); |
| 25856 | unitOfWork.memoizedProps = unitOfWork.pendingProps; |
| 25857 | |
| 25858 | if (next === null) { |
| 25859 | // If this doesn't spawn new work, complete the current work. |
| 25860 | next = completeUnitOfWork(unitOfWork); |
| 25861 | } |
| 25862 | |
| 25863 | ReactCurrentOwner$2.current = null; |
| 25864 | return next; |
| 25865 | } |
| 25866 | |
| 25867 | function completeUnitOfWork(unitOfWork) { |
| 25868 | // Attempt to complete the current unit of work, then move to the next |
no test coverage detected