Commit 06405263 authored by Anna Henningsen's avatar Anna Henningsen Committed by Rich Trott
Browse files

worker: make MessagePort constructor non-callable

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: default avatarRich Trott <rtrott@gmail.com>
Reviewed-By: default avatarTiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 25399e4c
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment