Skip to content

Conversation

@littledivy
Copy link
Member

All except one test case in parallel/test-worker-broadcastchannel-wpt.js passes. Node.js message dispatch ordering is not same as the Web api as explained in this comment:

  // Messages are delivered in port creation order.
  // TODO(@jasnell): The ordering here is different than
  // what the browsers would implement due to the different
  // dispatching algorithm under the covers. What's not
  // immediately clear is whether the ordering is spec
  // mandated. In this test, c1 should receive events
  // first, then c2, then c3. In the Node.js dispatching
  // algorithm this means the ordering is:
  //    from c3    (c1 from c3)
  //    done       (c1 from c2)
  //    from c1    (c2 from c1)
  //    from c3    (c2 from c3)
  //    from c1    (c3 from c1)
  //    done       (c3 from c2)
  //
  // Whereas in the browser-ordering (as illustrated in the
  // Web Platform Tests) it would be:
  //    from c1    (c2 from c1)
  //    from c1    (c3 from c1)
  //    from c3    (c1 from c3)
  //    from c3    (c2 from c3)
  //    done       (c1 from c2)
  //    done       (c3 from c2)

https://github.com/nodejs/node/blob/f77a709e128334e04278d3b834c1e07bc4686654/test/parallel/test-worker-broadcastchannel-wpt.js#L24-L47

@littledivy littledivy merged commit 72b9709 into denoland:main Feb 4, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants