Exit unsettled top-level await instead of hanging / busy-looping - #29549
Closed
robobun wants to merge 33 commits into
Closed
Exit unsettled top-level await instead of hanging / busy-looping#29549robobun wants to merge 33 commits into
robobun wants to merge 33 commits into
Claude / Claude Code Review
completed
May 5, 2026 in 32m 39s
Code review found 1 potential issue
Found 4 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 1 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | src/jsc/event_loop.zig:683-700 |
beforeExit handler resolving abandoned TLA drops continuation (sibling to test 6) |
Annotations
Check warning on line 700 in src/jsc/event_loop.zig
claude / Claude Code Review
beforeExit handler resolving abandoned TLA drops continuation (sibling to test 6)
nit: this PR makes a new state reachable — `waitForPromiseOrLoopExit` returns with the module promise still `.pending`, control flows to `vm.onBeforeExit()` (bun.js.zig:531), and a `process.on('beforeExit', …)` handler that synchronously resolves the awaited promise has its continuation dropped (same "user JS resolves the TLA → microtask invisible to liveness check" gap that the drain-then-recheck here and test 6 fix for `unhandledRejection`, but one frame later in `onBeforeExit()`). Not a block
Loading