Skip to content

Commit 869d451

Browse files
authored
Duplicates in StructuredSerializeWithTransfer's transferList
Duplicates are not allowed in most implementations and throw an error (before any serialization exceptions). This aligns the standard with that behavior. Tests: web-platform-tests/wpt#9672. Fixes whatwg#3507.
1 parent b3e9942 commit 869d451

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

source

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8813,12 +8813,15 @@ o.myself = o;</pre>
88138813
<var>transferable</var>.<span>[[Detached]]</span> is true, then throw a
88148814
<span>"<code>DataCloneError</code>"</span> <code>DOMException</code>.</p></li>
88158815

8816+
<li><p>If <var>memory</var>[<var>transferable</var>] <span data-x="map exists">exists</span>,
8817+
then throw a <span>"<code>DataCloneError</code>"</span> <code>DOMException</code>.</p></li>
8818+
88168819
<li>
88178820
<p><span data-x="map set">Set</span> <var>memory</var>[<var>transferable</var>] to {
88188821
[[Type]]: an uninitialized value }.</p>
88198822

8820-
<p class="note"><var>transferable</var> is not transferred yet as that operation has side
8821-
effects and <span>StructuredSerializeInternal</span> can throw.</p>
8823+
<p class="note"><var>transferable</var> is not transferred yet as transferring has side
8824+
effects and <span>StructuredSerializeInternal</span> needs to be able to throw first.</p>
88228825
</li>
88238826
</ol>
88248827
</li>

0 commit comments

Comments
 (0)