Skip to content

When serializing some WebCodecs objects with forStorage=true, throw DataCloneError instead of TypeError #590

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions index.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -2516,7 +2516,7 @@
### Serialization ###{#encodedaudiochunk-serialization}
: The {{EncodedAudioChunk}} [=serialization steps=] (with |value|, |serialized|,
and |forStorage|) are:
:: 1. If |forStorage| is `true`, throw a {{TypeError}}.
:: 1. If |forStorage| is `true`, throw a {{DataCloneError}}.
2. For each {{EncodedAudioChunk}} internal slot in |value|, assign the value
of each internal slot to a field in |serialized| with the same name as
the internal slot.
Expand Down Expand Up @@ -2608,7 +2608,7 @@
### Serialization ###{#encodedvideochunk-serialization}
: The {{EncodedVideoChunk}} [=serialization steps=] (with |value|, |serialized|,
and |forStorage|) are:
:: 1. If |forStorage| is `true`, throw a {{TypeError}}.
:: 1. If |forStorage| is `true`, throw a {{DataCloneError}}.
2. For each {{EncodedVideoChunk}} internal slot in |value|, assign the value
of each internal slot to a field in |serialized| with the same name as
the internal slot.
Expand Down Expand Up @@ -2974,7 +2974,7 @@
|forStorage|) are:
:: 1. If |value|'s {{platform object/[[Detached]]}} is `true`, throw a
{{DataCloneError}} {{DOMException}}.
2. If |forStorage| is `true`, throw a {{TypeError}}.
2. If |forStorage| is `true`, throw a {{DataCloneError}}.
3. Let |resource| be the [=media resource=] referenced by
|value|'s {{AudioData/[[resource reference]]}}.
4. Let |newReference| be a new reference to |resource|.
Expand Down Expand Up @@ -4064,7 +4064,7 @@
|forStorage|) are:
:: 1. If |value|'s {{platform object/[[Detached]]}} is `true`, throw a
{{DataCloneError}} {{DOMException}}.
2. If |forStorage| is `true`, throw a {{TypeError}}.
2. If |forStorage| is `true`, throw a {{DataCloneError}}.
3. Let |resource| be the [=media resource=] referenced by
|value|'s {{VideoFrame/[[resource reference]]}}.
4. Let |newReference| be a new reference to |resource|.
Expand Down