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

Trim the invokeFFICallback comment to the invariant

1c818ac
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jun 26, 2026 in 14m 45s

Code review found 1 important issue

Found 5 candidates, confirmed 2. See review comments for details.

Details

Severity Count
🔴 Important 1
🟡 Nit 0
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important test/js/bun/ffi/ffi.test.js:680-699 New JSCallback tests missing platform gates — fail on Windows aarch64 (TinyCC disabled) and x64-asan

Annotations

Check failure on line 699 in test/js/bun/ffi/ffi.test.js

See this annotation in the file changed.

@claude claude / Claude Code Review

New JSCallback tests missing platform gates — fail on Windows aarch64 (TinyCC disabled) and x64-asan

Both new tests construct `new JSCallback(...)`/`new CFunction(...)` unconditionally, but TinyCC is disabled on Windows ARM64 (`ENABLE_TINYCC = !cfg!(all(windows, target_arch = "aarch64"))`), so `FFI::callback()` throws `"bun:ffi callback() is not available in this build"` and the file fails — robobun confirms `ffi.test.js - code 1 on 🪟 11 aarch64`. Sibling files (`cc.test.ts:8`, `ffi-error-messages.test.ts:6`, `ffi-viewSource-non-object.test.ts:4`) all gate with `const isFFIUnavailable = isWindo