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 33m 51s
Code review found 1 potential issue
Found 2 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/web_worker.rs:1138-1142 |
spin() checkpoint over-catches self-exit (drops parent 'online'); comment also misdescribes the window |
Annotations
Check warning on line 1142 in src/jsc/web_worker.rs
claude / Claude Code Review
spin() checkpoint over-catches self-exit (drops parent 'online'); comment also misdescribes the window
This checkpoint fires on `has_requested_terminate()`, which `WebWorker::exit()` (the worker's own `process.exit()`) also sets — so when a worker's entry throws and an `uncaughtException` handler calls `process.exit(N)`, `handled==true` falls through to here and `shutdown()` is taken, skipping `WebWorker__dispatchOnline`; pre-PR the parent got `'online'` then `'exit'(N)`, post-PR only `'exit'(N)`. Consider gating on `&& !self.exit_called.load(Ordering::Relaxed)` so it only catches the cross-threa
Loading