Skip to content

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

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

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 the worker_threads module and Worker API. 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 91.65%. Comparing base (4b5e86c) to head (070a5ec).
⚠️ Report is 690 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65532      +/-   ##
==========================================
+ Coverage   90.14%   91.65%   +1.51%     
==========================================
  Files         751      789      +38     
  Lines      253679   285455   +31776     
  Branches    47789    69104   +21315     
==========================================
+ Hits       228671   261635   +32964     
+ Misses      16264    14430    -1834     
- Partials     8744     9390     +646     
Files with missing lines Coverage Δ
lib/internal/worker/io.js 99.23% <100.00%> (+0.03%) ⬆️

... and 283 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
@brettz9

brettz9 commented Sep 15, 2026

Copy link
Copy Markdown

Could the failure be flake, remedied by another test run?

@lazerg

lazerg commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

The failure does not come from this change. wpt/test-web-locks crashed on macOS after all of its subtests passed. That matches the known flake in #59142, where held.https.any.js throws an expected rejection and the harness does not register it. test/wpt/status/web-locks.json already marks that file flaky, and its note covers ppc, linux x64 and s390x only. The same commit passed test-linux on both arches, which runs the same WPT suite, and my diff only defines Symbol.toStringTag on the three messaging classes. A new run should come back green, but I cannot start one here.

@panva panva closed this Sep 15, 2026
@panva panva reopened this Sep 15, 2026
@inoway46 inoway46 added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 25, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 25, 2026
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@panva panva added resume-ci Add this label to resume the latest eligible Jenkins CI run on a PR with an approving review. author ready PRs with CI started, the required approvals, and no outstanding review comments. labels Sep 26, 2026
@github-actions github-actions Bot removed the resume-ci Add this label to resume the latest eligible Jenkins CI run on a PR with an approving review. label Sep 26, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@panva panva added the commit-queue PRs queued for automated landing through the Commit Queue. label Sep 26, 2026
@nodejs-github-bot nodejs-github-bot added commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. and removed commit-queue PRs queued for automated landing through the Commit Queue. labels Sep 26, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Commit Queue failed

   ✖  1 GitHub CI job(s) failed:
   ✖    - test-macOS: FAILURE (https://github.com/nodejs/node/actions/runs/32835191997/job/97762371901)

The pull request was removed from the Commit Queue and labeled commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. . After resolving the failure, remove that label and add commit-queue PRs queued for automated landing through the Commit Queue. to retry.

Full Commit Queue output
�[36m⠋�[39m Loading data for nodejs/node/pull/65532
�[36m⠋�[39m Loading data for nodejs/node/pull/65532
�[36m⠋�[39m Getting collaborator contacts from README of nodejs/node
�[36m⠋�[39m Getting PR from nodejs/node/pull/65532
�[36m⠋�[39m Getting reviews from nodejs/node/pull/65532
�[36m⠋�[39m Getting comments from nodejs/node/pull/65532
�[36m⠋�[39m Getting commits from nodejs/node/pull/65532
✔  Done loading data for nodejs/node/pull/65532
----------------------------------- PR info ------------------------------------
Title      worker: add Symbol.toStringTag to messaging classes (#65532)
Author     Lazizbek Ergashev <lazerg2@gmail.com> (@lazerg)
Branch     lazerg:fix/issue-65527-messageport-tostringtag -> nodejs:main
Labels     author ready, worker, needs-ci, commit-queue
Commits    2
 - worker: add Symbol.toStringTag to MessageChannel and MessagePort
 - worker: add Symbol.toStringTag to BroadcastChannel
Committers 1
 - Lazizbek Ergashev <lazerg2@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65532
Fixes: https://github.com/nodejs/node/issues/65527
Reviewed-By: James M Snell <jasnell@gmail.com>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/65532
Fixes: https://github.com/nodejs/node/issues/65527
Reviewed-By: James M Snell <jasnell@gmail.com>
--------------------------------------------------------------------------------
   ℹ  This PR was created on Tue, 25 Aug 2026 08:10:52 GMT
   ✔  Approvals: 1
   ✔  - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/65532#pullrequestreview-5018748441
   ✖  1 GitHub CI job(s) failed:
   ✖    - test-macOS: FAILURE (https://github.com/nodejs/node/actions/runs/32835191997/job/97762371901)
   ℹ  Last Full PR CI on 2026-09-26T20:19:31Z: https://ci.nodejs.org/job/node-test-pull-request/77976/
�[36m⠙�[39m Querying data for job/node-test-pull-request/77976/
�[36m⠙�[39m Querying data for job/node-test-pull-request/77976/
�[36m⠙�[39m Querying API for job/node-test-pull-request/77976/
✔  Build data downloaded
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu

View workflow run

@panva panva added commit-queue-squash PRs the Commit Queue should land as one squashed commit. and removed commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. commit-queue-squash PRs the Commit Queue should land as one squashed commit. labels Sep 26, 2026
panva pushed a commit that referenced this pull request Sep 26, 2026
Signed-off-by: Lazizbek Ergashev <lazerg2@gmail.com>
PR-URL: #65532
Fixes: #65527
Reviewed-By: James M Snell <jasnell@gmail.com>
panva pushed a commit that referenced this pull request Sep 26, 2026
Signed-off-by: Lazizbek Ergashev <lazerg2@gmail.com>
PR-URL: #65532
Fixes: #65527
Reviewed-By: James M Snell <jasnell@gmail.com>
@panva

panva commented Sep 26, 2026

Copy link
Copy Markdown
Member

Landed in 7ff6267...cd908df

@panva panva closed this Sep 26, 2026
aduh95 pushed a commit that referenced this pull request Sep 27, 2026
Signed-off-by: Lazizbek Ergashev <lazerg2@gmail.com>
PR-URL: #65532
Fixes: #65527
Reviewed-By: James M Snell <jasnell@gmail.com>
aduh95 pushed a commit that referenced this pull request Sep 27, 2026
Signed-off-by: Lazizbek Ergashev <lazerg2@gmail.com>
PR-URL: #65532
Fixes: #65527
Reviewed-By: James M Snell <jasnell@gmail.com>
HoonDongKang pushed a commit to HoonDongKang/node that referenced this pull request Sep 28, 2026
Signed-off-by: Lazizbek Ergashev <lazerg2@gmail.com>
PR-URL: nodejs#65532
Fixes: nodejs#65527
Reviewed-By: James M Snell <jasnell@gmail.com>
HoonDongKang pushed a commit to HoonDongKang/node that referenced this pull request Sep 28, 2026
Signed-off-by: Lazizbek Ergashev <lazerg2@gmail.com>
PR-URL: nodejs#65532
Fixes: nodejs#65527
Reviewed-By: James M Snell <jasnell@gmail.com>
aduh95 pushed a commit that referenced this pull request Sep 28, 2026
Signed-off-by: Lazizbek Ergashev <lazerg2@gmail.com>
PR-URL: #65532
Fixes: #65527
Reviewed-By: James M Snell <jasnell@gmail.com>
aduh95 pushed a commit that referenced this pull request Sep 28, 2026
Signed-off-by: Lazizbek Ergashev <lazerg2@gmail.com>
PR-URL: #65532
Fixes: #65527
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. 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.

Symbol.toStringTag on MessageChannel and MessagePort

6 participants