summaryrefslogtreecommitdiff
path: root/test/parallel/test-worker-message-port-move.js
AgeCommit message (Collapse)Author
2019-06-12worker: make MessagePort constructor non-callableAnna Henningsen
Refactor the C++ code for creating `MessagePort`s to skip calling the constructor and instead directly instantiating the `InstanceTemplate`, and always throw an error from the `MessagePort` constructor. This aligns behaviour with the web, and creating single `MessagePort`s does not make sense anyway. PR-URL: https://github.com/nodejs/node/pull/28032 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-03-15worker: implement worker.moveMessagePortToContext()Anna Henningsen
This enables using `MessagePort`s in different `vm.Context`s, aiding with the isolation that the `vm` module seeks to provide. Refs: https://github.com/ayojs/ayo/pull/111 PR-URL: https://github.com/nodejs/node/pull/26497 Reviewed-By: James M Snell <jasnell@gmail.com>