(deadline)
| 42 | } |
| 43 | |
| 44 | function workLoop(deadline) { |
| 45 | let shouldYield = false |
| 46 | while (nextUnitOfWork && !shouldYield) { |
| 47 | nextUnitOfWork = performUnitOfWork( |
| 48 | nextUnitOfWork |
| 49 | ) |
| 50 | shouldYield = deadline.timeRemaining() < 1 |
| 51 | } |
| 52 | |
| 53 | if (!nextUnitOfWork && wipRoot) { |
| 54 | commitRoot() |
| 55 | } |
| 56 | |
| 57 | requestIdleCallback(workLoop) |
| 58 | } |
| 59 | |
| 60 | requestIdleCallback(workLoop) |
| 61 |
nothing calls this directly
no test coverage detected