(workInProgress)
| 12538 | } |
| 12539 | |
| 12540 | function performUnitOfWork(workInProgress) { |
| 12541 | // The current, flushed, state of this fiber is the alternate. |
| 12542 | // Ideally nothing should rely on this, but relying on it here |
| 12543 | // means that we don't need an additional field on the work in |
| 12544 | // progress. |
| 12545 | var current = workInProgress.alternate; |
| 12546 | |
| 12547 | // See if beginning this work spawns more work. |
| 12548 | startWorkTimer(workInProgress); |
| 12549 | { |
| 12550 | ReactDebugCurrentFiber.setCurrentFiber(workInProgress); |
| 12551 | } |
| 12552 | |
| 12553 | if (true && replayFailedUnitOfWorkWithInvokeGuardedCallback) { |
| 12554 | stashedWorkInProgressProperties = _assign({}, workInProgress); |
| 12555 | } |
| 12556 | var next = beginWork(current, workInProgress, nextRenderExpirationTime); |
| 12557 | |
| 12558 | { |
| 12559 | ReactDebugCurrentFiber.resetCurrentFiber(); |
| 12560 | } |
| 12561 | if (true && ReactFiberInstrumentation_1.debugTool) { |
| 12562 | ReactFiberInstrumentation_1.debugTool.onBeginWork(workInProgress); |
| 12563 | } |
| 12564 | |
| 12565 | if (next === null) { |
| 12566 | // If this doesn't spawn new work, complete the current work. |
| 12567 | next = completeUnitOfWork(workInProgress); |
| 12568 | } |
| 12569 | |
| 12570 | ReactCurrentOwner.current = null; |
| 12571 | |
| 12572 | return next; |
| 12573 | } |
| 12574 | |
| 12575 | function workLoop(isAsync) { |
| 12576 | if (!isAsync) { |
no test coverage detected