Skip to content

Resolve runtime globals in builtin modules to the intrinsic, not globalThis - #40303

Open
dylan-conway wants to merge 9 commits into
mainfrom
claude/primordials-node-behavior-ccb82c
Open

dylan-conway wants to merge 9 commits into
mainfrom
claude/primordials-node-behavior-ccb82c

node:url, node:http, node:perf_hooks: stop destructuring constructors…

2ee4844
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 24, 2026 in 26m 31s

Code review found 2 potential issues

Found 2 candidates, confirmed 2. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 2
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit scripts/build/bun.ts:294-297 codegen.cppAll as implicit PCH input causes spurious full C++ rebuilds
🟡 Nit src/js/node/perf_hooks.ts:18-21 Leftover always-true if(PerformanceEntry) guard on PerformanceNodeTiming

Annotations

Check warning on line 297 in scripts/build/bun.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

codegen.cppAll as implicit PCH input causes spurious full C++ rebuilds

Making all of `codegen.cppAll` an implicit PCH input over-applies the fix: `cppAll` includes generated **.cpp** files (WebCoreJSBuiltins.cpp, ZigGeneratedClasses.cpp, JSSink.cpp, every bindgenv2 .cpp) and headers the PCH never reaches (InternalModuleRegistryConstants.h, InternalModuleRegistry+*.h, SyntheticModuleType.h, …). The `pch` rule has no `restat: true`, so editing any `src/js/builtins/*.ts` (which shifts `fn.sourceOffset` in WebCoreJSBuiltins.cpp) — or in release, any `src/js/{node,b

Check warning on line 21 in src/js/node/perf_hooks.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

Leftover always-true if(PerformanceEntry) guard on PerformanceNodeTiming

The `if (PerformanceEntry)` guard around `PerformanceNodeTiming`'s prototype linking at src/js/node/perf_hooks.ts:93 is now always-true dead code — this PR removed the identical guard at lines 20-21 (PerformanceNodeEntry) and the `if (Performance)` guard at line 260, but missed this third sibling. Drop the `if` and unconditionally link the prototypes, matching the two sites this PR already un-guarded.