Skip to content

skip leading-dot in extension lookup + refresh stale test comment

9d939d5
Select commit
Loading
Failed to load commit list.
Open

Add Module.prototype.load for new Module() instances #29256

skip leading-dot in extension lookup + refresh stale test comment
9d939d5
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Apr 13, 2026 in 34m 59s

Code review found 1 potential issue

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

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/js/builtins/CommonJS.ts:422-423 Module.prototype.load.name is "modulePrototypeLoad" not "load"

Annotations

Check warning on line 423 in src/js/builtins/CommonJS.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

Module.prototype.load.name is "modulePrototypeLoad" not "load"

Module.prototype.load.name returns "modulePrototypeLoad" instead of "load" because the $overriddenName = "load" directive is missing before the function declaration in CommonJS.ts. JSC derives a builtin function's .name from the source declaration name, so both the instance prototype (JSCommonJSModulePrototype) and the disposable prototype (getModulePrototypeObject) will expose a load property whose .name === "modulePrototypeLoad". The fix is a one-liner: add $overriddenName = "load" immediately