Skip to content

worker_threads: preserve ports, support EventListenerObject, fix Abor…

6cc8135
Select commit
Loading
Failed to load commit list.
Open

Stop dispatching parent messages to self.onmessage in node:worker_threads workers #29215

worker_threads: preserve ports, support EventListenerObject, fix Abor…
6cc8135
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Apr 12, 2026 in 10m 52s

Code review found 1 potential issue

Found 5 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/node/worker_threads.ts:188 Array.from used instead of $Array.from in makeForwarder

Annotations

Check warning on line 188 in src/js/node/worker_threads.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

Array.from used instead of $Array.from in makeForwarder

The makeForwarder closure uses Array.from(nativePorts) (line 188) instead of the tamper-resistant intrinsic $Array.from(nativePorts) mandated by src/js/CLAUDE.md. Since makeForwarder executes on every incoming parent message after user code may have already run, a user who replaces Array.from on globalThis could interfere with port delivery. Fix: replace Array.from(nativePorts) with $Array.from(nativePorts).