Skip to content

wtf-bindings: use WTF ASSERT() in uv__tty_make_raw

2aa7a4b
Select commit
Loading
Failed to load commit list.
Open

wtf-bindings: use WTF ASSERT() so debug builds compile #30992

wtf-bindings: use WTF ASSERT() in uv__tty_make_raw
2aa7a4b
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed May 18, 2026 in 18m 13s

Code review found 1 important issue

Found 1 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 1
🟡 Nit 0
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important test/js/bun/terminal/terminal.test.ts:290 Hardcoded ICANON=0x2 is wrong on macOS — test will fail in macOS CI

Annotations

Check failure on line 290 in test/js/bun/terminal/terminal.test.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

Hardcoded ICANON=0x2 is wrong on macOS — test will fail in macOS CI

The hardcoded `const ICANON = 0x2` is the Linux value; on macOS/BSD, `ICANON` is `0x100` and bit `0x2` is `ECHOE`. Since `Bun__ttySetMode` mode=1 clears `~(ECHO | ICANON | IEXTEN | ISIG)` but not `ECHOE` (which Terminal init sets to true), `expect(rawLflag & ICANON).toBe(0)` will fail on macOS CI. Use `isMacOS ? 0x100 : 0x2`, mirroring the existing PENDIN special-casing in this file.