fetch: abort the request when the response body reader is cancelled - #33231
Merged
Claude / Claude Code Review
completed
Jul 2, 2026 in 22m 23s
Code review found 1 potential issue
Found 1 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 1 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | src/runtime/webcore/fetch/FetchTasklet.rs:1610-1612 |
Comment misdescribes abort_task() as only touching atomics + schedule_shutdown |
Annotations
Check warning on line 1612 in src/runtime/webcore/fetch/FetchTasklet.rs
claude / Claude Code Review
Comment misdescribes abort_task() as only touching atomics + schedule_shutdown
The "only touches atomics + schedule_shutdown" clause is inaccurate — `abort_task()` also calls `self.tracker.did_cancel(&self.global_this)` (line 2259), which touches JSC. That's precisely why `abort_task()` can't be called from `on_response_finalize` during sweep (per the resolved thread at :1772), so a reader trusting this comment could wrongly conclude it's finalizer-safe. Suggest dropping the clause or rewording to "idempotent and does not touch `self.result`, so no mutex is needed".
Loading