(eventHandler)
| 2689 | } |
| 2690 | |
| 2691 | function unstable_next(eventHandler) { |
| 2692 | var priorityLevel; |
| 2693 | |
| 2694 | switch (currentPriorityLevel) { |
| 2695 | case ImmediatePriority: |
| 2696 | case UserBlockingPriority: |
| 2697 | case NormalPriority: |
| 2698 | // Shift down to normal priority |
| 2699 | priorityLevel = NormalPriority; |
| 2700 | break; |
| 2701 | |
| 2702 | default: |
| 2703 | // Anything lower than normal priority should remain at the current level. |
| 2704 | priorityLevel = currentPriorityLevel; |
| 2705 | break; |
| 2706 | } |
| 2707 | |
| 2708 | var previousPriorityLevel = currentPriorityLevel; |
| 2709 | currentPriorityLevel = priorityLevel; |
| 2710 | |
| 2711 | try { |
| 2712 | return eventHandler(); |
| 2713 | } finally { |
| 2714 | currentPriorityLevel = previousPriorityLevel; |
| 2715 | } |
| 2716 | } |
| 2717 | |
| 2718 | function unstable_wrapCallback(callback) { |
| 2719 | var parentPriorityLevel = currentPriorityLevel; |
nothing calls this directly
no outgoing calls
no test coverage detected