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

Fall back to the env slot when the live source lacks the property

3cf0ca7
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 1, 2026 in 20m 16s

Code review found 2 important issues

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

Details

Severity Count
🔴 Important 2
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit Source/JavaScriptCore/runtime/JSModuleNamespaceObject.cpp:488-493 overrideExports() missing liveExportsSource write-through

Annotations

Check warning on line 493 in Source/JavaScriptCore/runtime/JSModuleNamespaceObject.cpp

See this annotation in the file changed.

@claude claude / Claude Code Review

overrideExports() missing liveExportsSource write-through

The sibling batch API `overrideExports()` (lines 426-448) performs the same env-slot write via `symbolTablePutTouchWatchpointSet` but was not given the matching write-through to `liveExportsSource()` added here — so a bulk override on a live-source synthetic module updates only the env slot while namespace reads (lines 211-224) keep returning the source object's stale value. Before this PR both read and write agreed on the env slot, so this is a regression for that path; mirror this block inside