diff options
Diffstat (limited to 'runtime/js')
-rw-r--r-- | runtime/js/99_main.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index 8fd9a6bd9..511368141 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -351,6 +351,12 @@ function promiseRejectCallback(type, promise, reason) { } function promiseRejectMacrotaskCallback() { + // We have no work to do, tell the runtime that we don't + // need to perform microtask checkpoint. + if (pendingRejections.length === 0) { + return undefined; + } + while (pendingRejections.length > 0) { const promise = ArrayPrototypeShift(pendingRejections); const hasPendingException = ops.op_has_pending_promise_rejection( |