process: handle rejections only when needed

Signed-off-by: Gürgün Dayıoğlu <hey@gurgun.day>
PR-URL: https://github.com/nodejs/node/pull/62919
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ilyas Shabi <ilyasshabi94@gmail.com>
This commit is contained in:
Gürgün Dayıoğlu authored and GitHub committed 2026-04-26 08:39:10 +00:00
1 parent 0f684239c7
commit 44f9fc3643
1 file changed
+2 -1
+2 -1
View File
@@ -102,7 +102,8 @@ function processTicksAndRejections() {
AsyncContextFrame.set(priorContextFrame);
}
runMicrotasks();
} while (!queue.isEmpty() || processPromiseRejections());
} while (!queue.isEmpty() ||
(hasRejectionToWarn() && processPromiseRejections()));
setHasTickScheduled(false);
setHasRejectionToWarn(false);
}