(minPriorityLevel,deadline)
| 7812 | // using one of the normal work loops. |
| 7813 | break;}// The commit phase produced additional errors. Continue working. |
| 7814 | }}}}function workLoop(minPriorityLevel,deadline){if(pendingCommit!==null){priorityContext=TaskPriority$1;commitAllWork(pendingCommit);handleCommitPhaseErrors();}else if(nextUnitOfWork===null){resetNextUnitOfWork();}if(nextPriorityLevel===NoWork$2||nextPriorityLevel>minPriorityLevel){return;}// During the render phase, updates should have the same priority at which |
| 7815 | // we're rendering. |
| 7816 | priorityContext=nextPriorityLevel;loop:do{if(nextPriorityLevel<=TaskPriority$1){// Flush all synchronous and task work. |
| 7817 | while(nextUnitOfWork!==null){nextUnitOfWork=performUnitOfWork(nextUnitOfWork);if(nextUnitOfWork===null){!(pendingCommit!==null)?invariant(false,'Should have a pending commit. This error is likely caused by a bug in React. Please file an issue.'):void 0;// We just completed a root. Commit it now. |
| 7818 | priorityContext=TaskPriority$1;commitAllWork(pendingCommit);priorityContext=nextPriorityLevel;// Clear any errors that were scheduled during the commit phase. |
| 7819 | handleCommitPhaseErrors();// The priority level may have changed. Check again. |
| 7820 | if(nextPriorityLevel===NoWork$2||nextPriorityLevel>minPriorityLevel||nextPriorityLevel>TaskPriority$1){// The priority level does not match. |
| 7821 | break;}}}}else if(deadline!==null){// Flush asynchronous work until the deadline expires. |
| 7822 | while(nextUnitOfWork!==null&&!deadlineHasExpired){if(deadline.timeRemaining()>timeHeuristicForUnitOfWork){nextUnitOfWork=performUnitOfWork(nextUnitOfWork);// In a deferred work batch, iff nextUnitOfWork returns null, we just |
| 7823 | // completed a root and a pendingCommit exists. Logically, we could |
| 7824 | // omit either of the checks in the following condition, but we need |
| 7825 | // both to satisfy Flow. |
| 7826 | if(nextUnitOfWork===null){!(pendingCommit!==null)?invariant(false,'Should have a pending commit. This error is likely caused by a bug in React. Please file an issue.'):void 0;// We just completed a root. If we have time, commit it now. |
| 7827 | // Otherwise, we'll commit it in the next frame. |
| 7828 | if(deadline.timeRemaining()>timeHeuristicForUnitOfWork){priorityContext=TaskPriority$1;commitAllWork(pendingCommit);priorityContext=nextPriorityLevel;// Clear any errors that were scheduled during the commit phase. |
| 7829 | handleCommitPhaseErrors();// The priority level may have changed. Check again. |
| 7830 | if(nextPriorityLevel===NoWork$2||nextPriorityLevel>minPriorityLevel||nextPriorityLevel<HighPriority){// The priority level does not match. |
| 7831 | break;}}else{deadlineHasExpired=true;}}}else{deadlineHasExpired=true;}}}// There might be work left. Depending on the priority, we should |
| 7832 | // either perform it now or schedule a callback to perform it later. |
| 7833 | switch(nextPriorityLevel){case SynchronousPriority$1:case TaskPriority$1:// We have remaining synchronous or task work. Keep performing it, |
| 7834 | // regardless of whether we're inside a callback. |
| 7835 | if(nextPriorityLevel<=minPriorityLevel){continue loop;}break loop;case HighPriority:case LowPriority:case OffscreenPriority:// We have remaining async work. |
| 7836 | if(deadline===null){// We're not inside a callback. Exit and perform the work during |
| 7837 | // the next callback. |
| 7838 | break loop;}// We are inside a callback. |
| 7839 | if(!deadlineHasExpired&&nextPriorityLevel<=minPriorityLevel){// We still have time. Keep working. |
| 7840 | continue loop;}// We've run out of time. Exit. |
| 7841 | break loop;case NoWork$2:// No work left. We can exit. |
| 7842 | break loop;default:invariant(false,'Switch statement should be exhuastive. This error is likely caused by a bug in React. Please file an issue.');}}while(true);}function performWorkCatchBlock(failedWork,boundary,minPriorityLevel,deadline){// We're going to restart the error boundary that captured the error. |
| 7843 | // Conceptually, we're unwinding the stack. We need to unwind the |
| 7844 | // context stack, too. |
| 7845 | unwindContexts(failedWork,boundary);// Restart the error boundary using a forked version of |
no test coverage detected