fetch: hold FetchTasklet mutex through deref_from_thread so HTTP thread is never the final deref - #32707
Open
robobun wants to merge 7 commits into
Open
fetch: hold FetchTasklet mutex through deref_from_thread so HTTP thread is never the final deref#32707robobun wants to merge 7 commits into
robobun wants to merge 7 commits into
Claude / Claude Code Review
completed
Jun 25, 2026 in 14m 26s
Code review found 2 potential issues
Found 5 candidates, confirmed 2. 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:2355-2360 |
Stale comment at line 2193 contradicts the new deref/unlock ordering |
Annotations
Check warning on line 2360 in src/runtime/webcore/fetch/FetchTasklet.rs
claude / Claude Code Review
Stale comment at line 2193 contradicts the new deref/unlock ordering
The comment at lines 2193-2194 ("we need to unlock before task.deref(); explicit unlock + deref at end instead of nested defers") now states the exact opposite of what this PR implements — `deref_from_thread` is now intentionally called *before* `mutex.unlock()` in both reachable paths, and the new comments at the deref sites explicitly say "Deref while still holding the mutex." This stale comment documents the buggy ordering as a requirement and could mislead a future reader into reverting the
Loading