LibWeb: Implement overload resolution for sequence types

Fixes: #2508
This commit is contained in:
Shannon Booth 2024-11-23 08:01:49 +13:00 committed by Tim Ledbetter
commit 3fffd1129c
Notes: github-actions[bot] 2024-11-23 02:39:19 +00:00
4 changed files with 65 additions and 3 deletions

View file

@ -0,0 +1,15 @@
<!doctype html>
<meta charset=utf-8>
<title>postMessage() DataCloneError: cloning source port</title>
<script>
self.GLOBAL = {
isWindow: function() { return true; },
isWorker: function() { return false; },
isShadowRealm: function() { return false; },
};
</script>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<div id=log></div>
<script src="../webmessaging/Channel_postMessage_clone_port_error.any.js"></script>

View file

@ -0,0 +1,14 @@
// META: title=postMessage() DataCloneError: cloning source port
var description = "Test Description: Throw a DataCloneError if transfer array in postMessage contains source port.";
test(function()
{
var channel = new MessageChannel();
channel.port1.start();
assert_throws_dom("DATA_CLONE_ERR", function()
{
channel.port1.postMessage("ports", [channel.port1]);
});
}, description);