Skip to content

SyntheticModuleRecord: support a live exports source for namespace reads - #380

Open
robobun wants to merge 5 commits into
mainfrom
farm/24ce6e23/synthetic-module-live-exports
Open

SyntheticModuleRecord: support a live exports source for namespace reads#380
robobun wants to merge 5 commits into
mainfrom
farm/24ce6e23/synthetic-module-live-exports

SyntheticModuleRecord: support a live exports source for namespace reads

a59646c
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 1, 2026 in 17m 13s

Code review found 1 important issue

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

Details

Severity Count
🔴 Important 1
🟡 Nit 0
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important Source/JavaScriptCore/runtime/JSModuleNamespaceObject.cpp:209-216 Live-source branch mishandles re-exports: wrong key + star-namespace

Annotations

Check failure on line 216 in Source/JavaScriptCore/runtime/JSModuleNamespaceObject.cpp

See this annotation in the file changed.

@claude claude / Claude Code Review

Live-source branch mishandles re-exports: wrong key + star-namespace

The live-source lookup uses `propertyName` (the export name on *this* namespace) instead of `exportEntry.localName` (the binding name in the target synthetic module). When another module does `export { foo as bar } from './mocked'`, `propertyName` is `bar` but the source object only has `foo`, so the read returns `undefined` — a regression vs. the environment-slot fallback. Additionally, this branch must be skipped when `exportEntry.localName == vm.propertyNames->starNamespacePrivateName`: for `