Skip to content

process: skip uncaught-exception dispatch on a terminating worker - #35678

Closed
robobun wants to merge 11 commits into
mainfrom
farm/409c20b8/uncaught-exception-termination-guard
Closed

process: skip uncaught-exception dispatch on a terminating worker#35678
robobun wants to merge 11 commits into
mainfrom
farm/409c20b8/uncaught-exception-termination-guard

gate unhandled_rejection on script_execution_status

d260627
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jul 25, 2026 in 26m 53s

Code review found 2 potential issues

Found 1 candidates, confirmed 2. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 2
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/jsc/VirtualMachine.rs:3290 uncaught_exception's is_shutting_down() guard not widened; isBunTest fast-path bypasses the C++ guard

Annotations

Check warning on line 3290 in src/jsc/VirtualMachine.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

uncaught_exception's is_shutting_down() guard not widened; isBunTest fast-path bypasses the C++ guard

d260627c widened `unhandled_rejection`'s early-return here to `script_execution_status() != Running`, but the two sibling Rust dispatchers — `uncaught_exception` (VirtualMachine.rs:1351) and `handled_promise` (:1077) — were left on the narrower `is_shutting_down()`. For `handled_promise` and the non-`isBunTest` arm of `uncaught_exception` the new C++ guards cover it, but `uncaught_exception`'s `isBunTest` fast-path at :1355 fires BEFORE the FFI call: `isBunTest` is a process-global static (true