always report rejected promises

This commit is contained in:
Jarred Sumner
2023-01-05 15:08:06 -08:00
parent f191993c8f
commit bbbb4835b4
2 changed files with 3 additions and 1 deletions

View File

@@ -489,7 +489,7 @@ pub const EventLoop = struct {
var global_vm = ctx.global.vm();
while (true) {
while (this.tickWithCount() > 0) {
while (this.tickWithCount() > 0) : (this.global.handleRejectedPromises()) {
this.tickConcurrent();
} else {
global_vm.releaseWeakRefs();

View File

@@ -180,6 +180,8 @@ pub const Run = struct {
}
}
this.vm.global.handleRejectedPromises();
this.vm.onExit();
if (!JSC.is_bindgen) JSC.napi.fixDeadCodeElimination();