Repository navigation
Claude / Claude Code Review
completed
Aug 16, 2026 in 14m 21s
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/jsc/bindings/ErrorCode.cpp:1778 |
AbortError constructor accepts primitive number/boolean options without throwing |
Annotations
Check warning on line 1778 in src/jsc/bindings/ErrorCode.cpp
claude / Claude Code Review
AbortError constructor accepts primitive number/boolean options without throwing
The `options` validation in `jsFunctionMakeAbortError` only rejects non-object *cells* — numbers and booleans are immediate JSValues (not cells), so `options.isCell()` is false and `new err.constructor('m', 42)` / `new err.constructor('m', true)` silently succeed, whereas Node throws `ERR_INVALID_ARG_TYPE`. This is pre-existing code, but this PR newly exposes it as the user-reachable `err.constructor` and claims Node parity for this check; changing the guard to `!options.isUndefinedOrNull() && !
Loading