Skip to content

Commit 06282ff

Browse files
committed
Prevent structuredClone transfer of immutable array buffers (which are not detachable)
Ref tc39/proposal-immutable-arraybuffer#30
1 parent 734afba commit 06282ff

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

source

+3-1
Original file line numberDiff line numberDiff line change
@@ -3047,6 +3047,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
30473047
<li>The <dfn data-x-href="https://tc39.es/ecma262/#sec-isconstructor">IsConstructor</dfn> abstract operation</li>
30483048
<li>The <dfn data-x-href="https://tc39.es/ecma262/#sec-isdatadescriptor">IsDataDescriptor</dfn> abstract operation</li>
30493049
<li>The <dfn data-x-href="https://tc39.es/ecma262/#sec-isdetachedbuffer">IsDetachedBuffer</dfn> abstract operation</li>
3050+
<li>The <dfn data-x-href="https://tc39.es/ecma262/#sec-isimmutablebuffer">IsImmutableBuffer</dfn> abstract operation</li>
30503051
<li>The <dfn data-x-href="https://tc39.es/ecma262/#sec-issharedarraybuffer">IsSharedArrayBuffer</dfn> abstract operation</li>
30513052
<li>The <dfn data-x="js-NewObjectEnvironment" data-x-href="https://tc39.es/ecma262/#sec-newobjectenvironment">NewObjectEnvironment</dfn> abstract operation</li>
30523053
<li>The <dfn data-x-href="https://tc39.es/ecma262/#sec-normalcompletion">NormalCompletion</dfn> abstract operation</li>
@@ -10463,7 +10464,8 @@ o.myself = o;</code></pre>
1046310464
<span>"<code>DataCloneError</code>"</span> <code>DOMException</code>.</p></li>
1046410465

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

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

0 commit comments

Comments
 (0)