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 21m 21s
Code review found 2 potential issues
Found 5 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/web_worker.rs:1468-1470 |
flush_logs early-return drops configure_defines() error; makes checkpoint flush_logs calls dead |
| 🟡 Nit | src/jsc/web_worker.rs:1481-1494 |
New Err(Thrown) arm uses if let Some where sibling arm 20 lines below uses .expect() |
Annotations
Check warning on line 1470 in src/jsc/web_worker.rs
claude / Claude Code Review
flush_logs early-return drops configure_defines() error; makes checkpoint flush_logs calls dead
This early-return makes every `flush_logs` call inside a `has_requested_terminate()`-gated block a provable no-op — the new call at :1140 and the two pre-existing checkpoints in `spin()` ("Terminated during startVM()…" and "Terminated while resolving…"). More than dead code: `start_vm()`'s `configure_defines()` failure path uses `set_requested_terminate()` as a same-thread self-signal and per its comment "vm.log carries the error for flushLogs" relies on the first checkpoint's `flush_logs` to di
Check warning on line 1494 in src/jsc/web_worker.rs
claude / Claude Code Review
New Err(Thrown) arm uses `if let Some` where sibling arm 20 lines below uses `.expect()`
The new `Err(e @ JsError::Thrown)` arm uses `if let Some(exc) = ...as_exception(...)` — silently returning on `None` — while the pre-existing sibling arm ~20 lines below in the same function handles the identical `take_exception → as_exception → report_uncaught_exception` sequence with `.expect("takeException returned non-Exception")` and an explicit comment stating "None is unreachable. Do not silently drop the error." Match the sibling's `.expect()` (or extract a shared helper covering both ar
Loading