Skip to content

Commit

Permalink
Revert checking targetRealm for transfert SAB.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurSonzogni authored and domenic committed Dec 17, 2020
1 parent 7480ee1 commit 075c677
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -8086,6 +8086,17 @@ interface <dfn>DOMStringList</dfn> {
<ol>
<li><p>Let <var>agentCluster</var> be the <span>surrounding agent</span>'s
<span>agent cluster</span>.</p></li>
<li>
<p>If <var>agentCluster</var>'s <span
data-x="concept-settings-object-cross-origin-isolated-capability">cross-origin isolated
capability</span> is false, then throw a
<span>"<code>DataCloneError</code>"</span><code>DOMException</code>.</p>

<p class="note">This check is only needed when serializing (and not when deserializing) as
<var data-x="concept-settings-object-cross-origin-isolated-capability">cross-origin isolated
</var> cannot change over time and a <code>SharedArrayBuffer</code> cannot leave an
<span>agent cluster</span>.</p>
</li>

<li><p>If <var>forStorage</var> is true, then throw a
<span>"<code>DataCloneError</code>"</span> <code>DOMException</code>.</p></li>
Expand Down Expand Up @@ -8503,18 +8514,6 @@ o.myself = o;</code></pre>
<var>serialized</var>.[[AgentCluster]], then then throw a
<span>"<code>DataCloneError</code>"</span> <code>DOMException</code>.</p></li>

<li><p>If <var>targetRealm</var>'s <span
data-x="concept-settings-object-cross-origin-isolated-capability"
>cross-origin isolated capability</span> is false, then throw
<span>"<code>DataCloneError</code>"</span> <code>DOMException</code>.</p>

<p class="note">This check is only needed when deserializing (and not when serializing) as
<span data-x="concept-settings-object-cross-origin-isolated-capability">
cross-origin isolated capability</span> cannot change over time and a
<code>SharedArrayBuffer</code> cannot leave an <span>agent
cluster</span>.</p>
</li>

<li><p>Otherwise, set <var>value</var> to a new SharedArrayBuffer object in
<var>targetRealm</var> whose [[ArrayBufferData]] internal slot value is
<var>serialized</var>.[[ArrayBufferData]] and whose [[ArrayBufferByteLength]] internal slot
Expand Down

0 comments on commit 075c677

Please sign in to comment.