node:module: throw instead of crashing when _resolveFilename is set to a non-callable - #38089
Open
robobun wants to merge 1 commit into
Open
node:module: throw instead of crashing when _resolveFilename is set to a non-callable#38089robobun wants to merge 1 commit into
robobun wants to merge 1 commit into
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
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
Loading