(workInProgress)
| 13208 | } |
| 13209 | |
| 13210 | function performUnitOfWork(workInProgress) { |
| 13211 | // The current, flushed, state of this fiber is the alternate. |
| 13212 | // Ideally nothing should rely on this, but relying on it here |
| 13213 | // means that we don't need an additional field on the work in |
| 13214 | // progress. |
| 13215 | var current = workInProgress.alternate; |
| 13216 | |
| 13217 | // See if beginning this work spawns more work. |
| 13218 | startWorkTimer(workInProgress); |
| 13219 | { |
| 13220 | ReactDebugCurrentFiber.setCurrentFiber(workInProgress); |
| 13221 | } |
| 13222 | |
| 13223 | if (true && replayFailedUnitOfWorkWithInvokeGuardedCallback) { |
| 13224 | stashedWorkInProgressProperties = _assign({}, workInProgress); |
| 13225 | } |
| 13226 | var next = beginWork(current, workInProgress, nextRenderExpirationTime); |
| 13227 | |
| 13228 | { |
| 13229 | ReactDebugCurrentFiber.resetCurrentFiber(); |
| 13230 | } |
| 13231 | if (true && ReactFiberInstrumentation_1.debugTool) { |
| 13232 | ReactFiberInstrumentation_1.debugTool.onBeginWork(workInProgress); |
| 13233 | } |
| 13234 | |
| 13235 | if (next === null) { |
| 13236 | // If this doesn't spawn new work, complete the current work. |
| 13237 | next = completeUnitOfWork(workInProgress); |
| 13238 | } |
| 13239 | |
| 13240 | ReactCurrentOwner.current = null; |
| 13241 | |
| 13242 | return next; |
| 13243 | } |
| 13244 | |
| 13245 | function workLoop(isAsync) { |
| 13246 | if (!isAsync) { |
no test coverage detected