Skip to content

node:module: throw instead of crashing when _resolveFilename is set to a non-callable - #38089

Open
robobun wants to merge 1 commit into
mainfrom
farm/e65fb762/resolve-filename-non-callable
Open

node:module: throw instead of crashing when _resolveFilename is set to a non-callable#38089
robobun wants to merge 1 commit into
mainfrom
farm/e65fb762/resolve-filename-non-callable

node:module: throw instead of crashing when _resolveFilename is set t…

8c280f3
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 13, 2026 in 14m 0s

Code review found 1 potential issue

Found 3 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/modules/NodeModuleModule.cpp:446-471 Sibling Module.runMain override has the same crash class left unfixed

Annotations

Check warning on line 471 in src/jsc/modules/NodeModuleModule.cpp

See this annotation in the file changed.

@claude claude / Claude Code Review

Sibling Module.runMain override has the same crash class left unfixed

The adjacent `Module.runMain` accessor in this file has the byte-identical pre-fix pattern (`setModuleRunMain` gates on `value.isCell()` and stores any cell; `NodeModuleModule__callOverriddenRunMain` does `uncheckedDowncast<JSObject>` + `profiledCall(..., getCallData(overrideHandler), ...)` with no `CallData::Type::None` check), so `Module.runMain = {}` in a `--require` preload hits the same crash class. Per REVIEW.md ('fix the whole class in the same PR… If a site is intentionally excluded, say