(hasTimeRemaining, initialTime)
| 2562 | } |
| 2563 | |
| 2564 | function flushWork(hasTimeRemaining, initialTime) { |
| 2565 | { |
| 2566 | markSchedulerUnsuspended(initialTime); |
| 2567 | } // We'll need a host callback the next time work is scheduled. |
| 2568 | |
| 2569 | |
| 2570 | isHostCallbackScheduled = false; |
| 2571 | |
| 2572 | if (isHostTimeoutScheduled) { |
| 2573 | // We scheduled a timeout but it's no longer needed. Cancel it. |
| 2574 | isHostTimeoutScheduled = false; |
| 2575 | cancelHostTimeout(); |
| 2576 | } |
| 2577 | |
| 2578 | isPerformingWork = true; |
| 2579 | var previousPriorityLevel = currentPriorityLevel; |
| 2580 | |
| 2581 | try { |
| 2582 | if (enableProfiling) { |
| 2583 | try { |
| 2584 | return workLoop(hasTimeRemaining, initialTime); |
| 2585 | } catch (error) { |
| 2586 | if (currentTask !== null) { |
| 2587 | var currentTime = getCurrentTime(); |
| 2588 | markTaskErrored(currentTask, currentTime); |
| 2589 | currentTask.isQueued = false; |
| 2590 | } |
| 2591 | |
| 2592 | throw error; |
| 2593 | } |
| 2594 | } else { |
| 2595 | // No catch in prod codepath. |
| 2596 | return workLoop(hasTimeRemaining, initialTime); |
| 2597 | } |
| 2598 | } finally { |
| 2599 | currentTask = null; |
| 2600 | currentPriorityLevel = previousPriorityLevel; |
| 2601 | isPerformingWork = false; |
| 2602 | |
| 2603 | { |
| 2604 | var _currentTime = getCurrentTime(); |
| 2605 | |
| 2606 | markSchedulerSuspended(_currentTime); |
| 2607 | } |
| 2608 | } |
| 2609 | } |
| 2610 | |
| 2611 | function workLoop(hasTimeRemaining, initialTime) { |
| 2612 | var currentTime = initialTime; |
nothing calls this directly
no test coverage detected
searching dependent graphs…