Skip to content

worker: remove messageerror listeners on exit - #66075

Open
dayun6530 wants to merge 1 commit into
nodejs:mainfrom
dayun6530:fix/worker-messageerror-listener-cleanup
Open

dayun6530 wants to merge 1 commit into
nodejs:mainfrom
dayun6530:fix/worker-messageerror-listener-cleanup

Conversation

@dayun6530

Copy link
Copy Markdown
Contributor

Fixes a typo in the worker exit cleanup so messageerror listeners are removed before the exit event is emitted.

Adds a regression test covering the listener cleanup behavior.

Tests:

  • python3 tools/test.py --mode=release parallel/test-worker-messageerror-listener-cleanup
  • make lint-js

Fixes: #65782

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. worker Issues and PRs related to the worker_threads module and Worker API. labels Sep 17, 2026
@dayun6530
dayun6530 marked this pull request as ready for review September 17, 2026 01:54
@codecov

codecov Bot commented Sep 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.24%. Comparing base (c081d10) to head (734c24d).
⚠️ Report is 29 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #66075      +/-   ##
==========================================
+ Coverage   90.22%   90.24%   +0.02%     
==========================================
  Files         787      789       +2     
  Lines      270307   271560    +1253     
  Branches    51726    51829     +103     
==========================================
+ Hits       243890   245078    +1188     
- Misses      16899    16928      +29     
- Partials     9518     9554      +36     
Files with missing lines Coverage Δ
lib/internal/worker.js 97.02% <100.00%> (ø)

... and 71 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. worker Issues and PRs related to the worker_threads module and Worker API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

worker: messageerror listeners remain during exit

2 participants