Transfer should not be null or undefined in structuredClone
#55280
Labels
web-standards
Issues and PRs related to Web APIs
structuredClone
#55280
Version
22.9.0
Platform
Subsystem
No response
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
always
What is the expected behavior? Why is that the expected behavior?
It should throw
TypeError
like other runtimes.What do you see instead?
it passed
Additional information
I didn't find any requirements on type checking, but seems like other runtimes unanimously perform the webidl sequence conversion for
transfer
. IMO, we should do the same.There are two ways to do this.
One is quick win by updating the check here
node/src/node_messaging.cc
Line 1032 in a301596
The other one is to perform WebIDL conversion at JS layer before hitting the native
StructuredClone
. I understand the current implementation has been completely moved to cc, so I am not sure if that approach would be more preferable, but it does benefit us from reducing the C++ to JS overhead inside this functionnode/src/node_messaging.cc
Line 1045 in a301596
The text was updated successfully, but these errors were encountered: