(global)
| 2808 | const maxInlineCallCount = 10; |
| 2809 | |
| 2810 | function browserQueueMicrotaskImpl(global) { |
| 2811 | const { setTimeout, queueMicrotask } = global; |
| 2812 | let currentCallCount = 0; |
| 2813 | return function clearStack(fn) { |
| 2814 | currentCallCount++; |
| 2815 | |
| 2816 | if (currentCallCount < maxInlineCallCount) { |
| 2817 | queueMicrotask(fn); |
| 2818 | } else { |
| 2819 | currentCallCount = 0; |
| 2820 | setTimeout(fn); |
| 2821 | } |
| 2822 | }; |
| 2823 | } |
| 2824 | |
| 2825 | function nodeQueueMicrotaskImpl(global) { |
| 2826 | const { queueMicrotask } = global; |
nothing calls this directly
no test coverage detected