Files
bun.sh/test/js/node/test/parallel
robobun 661deb8eaf Fix MessagePort communication after transfer to Worker (#22638)
## Summary

Fixes #22635 - MessagePort communication fails after being transferred
to a Worker thread.
Fixes https://github.com/oven-sh/bun/issues/22636

The issue was that `MessagePort::addEventListener()` only called
`start()` for attribute listeners (like `onmessage = ...`) but not for
regular event listeners added via `addEventListener()` or the Node.js
EventEmitter wrapper (`.on('message', ...)`).

## Changes

- Modified `MessagePort::addEventListener()` to call `start()` for all
message event listeners, not just attribute listeners
- Added regression test for issue #22635

## Test Plan

- [x] Regression test added and passing
- [x] Original reproduction case from issue #22635 now works correctly
- [x] Existing MessagePort tests still pass

🤖 Generated with [Claude Code](https://claude.ai/code)

---------

Co-authored-by: Claude Bot <claude-bot@bun.sh>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2025-09-17 03:33:14 -07:00
..
2025-05-07 16:21:08 -07:00
2025-01-08 21:53:03 -08:00
2025-01-08 21:53:03 -08:00
2025-01-08 21:53:03 -08:00
2025-01-08 21:53:03 -08:00
2025-01-08 21:53:03 -08:00
2025-01-08 21:53:03 -08:00
2025-01-08 21:53:03 -08:00
2025-01-08 21:53:03 -08:00
2025-05-07 16:21:08 -07:00
2025-01-21 10:28:35 -08:00
2025-03-31 02:15:27 -07:00
2025-05-31 16:21:08 -07:00
2025-03-20 00:45:44 -07:00
2025-03-20 00:45:44 -07:00
2025-03-20 00:45:44 -07:00
2025-05-28 17:04:37 -07:00
2025-05-28 17:04:37 -07:00
2025-05-28 17:04:37 -07:00
2025-05-28 17:04:37 -07:00
2024-12-10 15:38:48 -08:00
2025-02-26 16:45:02 -08:00
2025-02-26 16:45:02 -08:00
2025-06-12 14:20:28 -07:00
2025-06-12 14:20:28 -07:00