worker: add typechecking for postMessage transfer list · nodejs/node@79a8cd0 · GitHub
Skip to content

Commit 79a8cd0

Browse files
addaleaxBridgeAR
authored andcommitted
worker: add typechecking for postMessage transfer list
If the transfer list argument is present, it should be an array. This commit adds typechecking to that effect. This aligns behaviour with browsers. PR-URL: #28033 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent d7641d8 commit 79a8cd0

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

src/node_messaging.cc

Lines changed: 9 additions & 0 deletions

test/parallel/test-worker-message-port.js

Lines changed: 21 additions & 0 deletions

0 commit comments

Comments
 (0)