Skip to content

Conversation

@CountBleck
Copy link
Contributor

This PR ensures that Error#cause and the byte lengths of TypedArrays are properly serialized via structuredClone/StructuredSerialize. I also updated the part of the WPT test (html/infrastructure/safe-passing-of-structured-data/messagechannel.any.html) that wasn't passing on the live version but was passing in our imported version. Combined with #7306 (which fixes one subtest), this PR actually gets all subtests in that test to pass.

@ladybird-bot
Copy link
Collaborator

Hello!

One or more of the commit messages in this PR do not match the Ladybird code submission policy, please check the lint_commits CI job for more details on which commits were flagged and why.
Please do not close this PR and open another, instead modify your commit message(s) with git commit --amend and force push those changes to update this PR.

@CountBleck CountBleck force-pushed the structured-clone-fixes branch from c798ba1 to a3cdf1b Compare January 3, 2026 06:03
@github-actions github-actions bot added the conflicts Pull request has merge conflicts that need resolution label Jan 4, 2026
@github-actions
Copy link

github-actions bot commented Jan 4, 2026

Your pull request has conflicts that need to be resolved before it can be reviewed and merged. Make sure to rebase your branch on top of the latest master.

The spec doesn't include this behavior (at least, not yet), but all
browsers do this, as can be seen in several subtests in
https://wpt.live/html/infrastructure/safe-passing-of-structured-data/messagechannel.any.html
When a "length-tracking" TypedArray/DataView is postMessage'd, the
view seen by the recipient should still be "length-tracking". However,
this wasn't the case, because the actual length was serialized, as
opposed to the JS::ByteLength, which includes the "auto" state to
signal the presence of this "length-tracking" behavior.

This fixes two subtests in...
https://wpt.live/html/infrastructure/safe-passing-of-structured-data/messagechannel.any.html
This just re-imports the file via WPT.sh to match what is currently
present in WPT. This file is used by...
https://wpt.live/html/infrastructure/safe-passing-of-structured-data/messagechannel.any.html
...as well as other WPT tests.
@CountBleck CountBleck force-pushed the structured-clone-fixes branch from a3cdf1b to f81af74 Compare January 4, 2026 07:19
@github-actions github-actions bot removed the conflicts Pull request has merge conflicts that need resolution label Jan 4, 2026
@shannonbooth shannonbooth merged commit 2ca45fb into LadybirdBrowser:master Jan 7, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants