Skip to content

worker: add Symbol.toStringTag to messaging classes - #65532

Open
lazerg wants to merge 2 commits into
nodejs:mainfrom
lazerg:fix/issue-65527-messageport-tostringtag
Open

worker: add Symbol.toStringTag to messaging classes#65532
lazerg wants to merge 2 commits into
nodejs:mainfrom
lazerg:fix/issue-65527-messageport-tostringtag

Conversation

@lazerg

@lazerg lazerg commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

MessageChannel, MessagePort and BroadcastChannel had no
Symbol.toStringTag, so Object.prototype.toString.call() returned
[object Object] or [object EventTarget] rather than the interface
names.

Two existing tests expected util.inspect() to print
MessagePort [EventTarget]; the tag now matches the constructor name,
so the bracketed part is gone.

Fixes: #65527

Signed-off-by: Lazizbek Ergashev <lazerg2@gmail.com>
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. worker Issues and PRs related to Worker support. labels Aug 25, 2026
@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.12%. Comparing base (4b5e86c) to head (070a5ec).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65532      +/-   ##
==========================================
- Coverage   90.14%   90.12%   -0.02%     
==========================================
  Files         751      751              
  Lines      253679   253657      -22     
  Branches    47789    47790       +1     
==========================================
- Hits       228671   228606      -65     
- Misses      16264    16311      +47     
+ Partials     8744     8740       -4     
Files with missing lines Coverage Δ
lib/internal/worker/io.js 99.23% <100.00%> (+0.03%) ⬆️

... and 42 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.

Signed-off-by: Lazizbek Ergashev <lazerg2@gmail.com>
@lazerg lazerg changed the title worker: add Symbol.toStringTag to MessageChannel and MessagePort worker: add Symbol.toStringTag to messaging classes Aug 25, 2026
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 Worker support.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Symbol.toStringTag on MessageChannel and MessagePort

3 participants