(callback)
| 14738 | return Scheduler_scheduleCallback(priorityLevel, callback, options); |
| 14739 | } |
| 14740 | function scheduleSyncCallback(callback) { |
| 14741 | // Push this callback into an internal queue. We'll flush these either in |
| 14742 | // the next tick, or earlier if something calls `flushSyncCallbackQueue`. |
| 14743 | if (syncQueue === null) { |
| 14744 | syncQueue = [callback]; // Flush the queue in the next tick, at the earliest. |
| 14745 | |
| 14746 | immediateQueueCallbackNode = Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueueImpl); |
| 14747 | } else { |
| 14748 | // Push onto existing queue. Don't need to schedule a callback because |
| 14749 | // we already scheduled one when we created the queue. |
| 14750 | syncQueue.push(callback); |
| 14751 | } |
| 14752 | |
| 14753 | return fakeCallbackNode; |
| 14754 | } |
| 14755 | function cancelCallback(callbackNode) { |
| 14756 | if (callbackNode !== fakeCallbackNode) { |
| 14757 | Scheduler_cancelCallback(callbackNode); |
no outgoing calls
no test coverage detected