Skip to content

Commit

Permalink
Prevent structuredClone transfer of immutable array buffers (which ar…
Browse files Browse the repository at this point in the history
  • Loading branch information
gibson042 committed Feb 17, 2025
1 parent 734afba commit 06282ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source
Original file line number Diff line number Diff line change
Expand Up @@ -3047,6 +3047,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li>The <dfn data-x-href="https://tc39.es/ecma262/#sec-isconstructor">IsConstructor</dfn> abstract operation</li>
<li>The <dfn data-x-href="https://tc39.es/ecma262/#sec-isdatadescriptor">IsDataDescriptor</dfn> abstract operation</li>
<li>The <dfn data-x-href="https://tc39.es/ecma262/#sec-isdetachedbuffer">IsDetachedBuffer</dfn> abstract operation</li>
<li>The <dfn data-x-href="https://tc39.es/ecma262/#sec-isimmutablebuffer">IsImmutableBuffer</dfn> abstract operation</li>
<li>The <dfn data-x-href="https://tc39.es/ecma262/#sec-issharedarraybuffer">IsSharedArrayBuffer</dfn> abstract operation</li>
<li>The <dfn data-x="js-NewObjectEnvironment" data-x-href="https://tc39.es/ecma262/#sec-newobjectenvironment">NewObjectEnvironment</dfn> abstract operation</li>
<li>The <dfn data-x-href="https://tc39.es/ecma262/#sec-normalcompletion">NormalCompletion</dfn> abstract operation</li>
Expand Down Expand Up @@ -10463,7 +10464,8 @@ o.myself = o;</code></pre>
<span>"<code>DataCloneError</code>"</span> <code>DOMException</code>.</p></li>

<li><p>If <var>transferable</var> has an [[ArrayBufferData]] internal slot and
<span>IsSharedArrayBuffer</span>(<var>transferable</var>) is true, then throw a
<span>IsSharedArrayBuffer</span>(<var>transferable</var>) is true or
either <span>IsImmutableBuffer</span>(<var>transferable</var>) is true, then throw a
<span>"<code>DataCloneError</code>"</span> <code>DOMException</code>.</p></li>

<li><p>If <var>memory</var>[<var>transferable</var>] <span data-x="map exists">exists</span>,
Expand Down

0 comments on commit 06282ff

Please sign in to comment.