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.
This is technically a breaking change and I’d be happy to split out the added throw into a separate PR out of caution, if anybody considers that a good idea.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines