Skip to content

bun:ffi: don't re-throw JSC's TerminationException from a JSCallback - #32792

Merged
Jarred-Sumner merged 8 commits into
mainfrom
farm/a29fd24e/ffi-callback-termination
Jun 28, 2026
Merged

bun:ffi: don't re-throw JSC's TerminationException from a JSCallback#32792
Jarred-Sumner merged 8 commits into
mainfrom
farm/a29fd24e/ffi-callback-termination

ffi: don't re-throw JSC's TerminationException from a JSCallback

9fdf4d2
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jun 26, 2026 in 11m 58s

Code review found 1 potential issue

Found 5 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/bindings/JSFFIFunction.cpp:187-190 Comment on invokeFFICallback exceeds 3-line max and contains bug history

Annotations

Check warning on line 190 in src/jsc/bindings/JSFFIFunction.cpp

See this annotation in the file changed.

@claude claude / Claude Code Review

Comment on invokeFFICallback exceeds 3-line max and contains bug history

nit: this comment block is 4 lines and references deleted code ("the old NakedPtr dance"), running into root `CLAUDE.md` rule 13 ("Keep code comments to 3 lines max") and the durable-content guideline ("no bug history — that belongs in the PR description"). The PR description already covers the NakedPtr/`VM::setException` history; consider trimming to just the durable invariant — leave the exception pending, don't clear+rethrow (TerminationException) — in ≤3 lines.