diff options
author | 2023-01-05 15:08:06 -0800 | |
---|---|---|
committer | 2023-01-05 15:08:06 -0800 | |
commit | bbbb4835b42533ea9eec67b772b26fbbb1264efc (patch) | |
tree | 08429adede70113614deea81fa99c387406f9a04 /src | |
parent | f191993c8f78224f4e5661e1b9a3a195fe957651 (diff) | |
download | bun-bbbb4835b42533ea9eec67b772b26fbbb1264efc.tar.gz bun-bbbb4835b42533ea9eec67b772b26fbbb1264efc.tar.zst bun-bbbb4835b42533ea9eec67b772b26fbbb1264efc.zip |
always report rejected promises
Diffstat (limited to 'src')
-rw-r--r-- | src/bun.js/event_loop.zig | 2 | ||||
-rw-r--r-- | src/bun_js.zig | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/bun.js/event_loop.zig b/src/bun.js/event_loop.zig index c5927298a..6331480d8 100644 --- a/src/bun.js/event_loop.zig +++ b/src/bun.js/event_loop.zig @@ -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(); diff --git a/src/bun_js.zig b/src/bun_js.zig index fce2108bd..c9b6cb490 100644 --- a/src/bun_js.zig +++ b/src/bun_js.zig @@ -180,6 +180,8 @@ pub const Run = struct { } } + this.vm.global.handleRejectedPromises(); + this.vm.onExit(); if (!JSC.is_bindgen) JSC.napi.fixDeadCodeElimination(); |