process: skip uncaught-exception dispatch on a terminating worker - #35678
Closed
robobun wants to merge 11 commits into
Closed
process: skip uncaught-exception dispatch on a terminating worker#35678robobun wants to merge 11 commits into
robobun wants to merge 11 commits into
Claude / Claude Code Review
completed
Jul 25, 2026 in 30m 50s
Code review found 3 potential issues
Found 1 candidates, confirmed 3. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 3 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | src/jsc/web_worker.rs:1474-1477 |
report_thrown's terminate check is less precise than flush_logs' outer guard |
Annotations
Check warning on line 1477 in src/jsc/web_worker.rs
claude / Claude Code Review
report_thrown's terminate check is less precise than flush_logs' outer guard
The `report_thrown` closure gates on `self.has_requested_terminate()` alone, while the outer guard at :1470 was deliberately narrowed to `has_requested_terminate() && vm.jsc_vm().has_termination_request()` so the configure_defines self-signal (which sets only the Rust atomic, not the JSC trap) still dispatches. In that path the atomic is already true, so a genuine `JsError::Thrown` from `to_js`/`to_bun_string`/`dispatchError` would be silently dropped without `take_exception`. Consider matching
Loading