Skip to content

Commit

Permalink
Fix some realmless ArrayBuffer creation
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkot authored May 7, 2024
1 parent 2c3000e commit 5d9d67b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -7139,8 +7139,9 @@ steps:
<p>Run <var>action</var>.

<p>Whenever one or more bytes are available and <var>stream</var> is not
<a for=ReadableStream>errored</a>, <a for=ReadableStream>enqueue</a> a {{Uint8Array}} wrapping
an {{ArrayBuffer}} containing the available bytes into <var>stream</var>.
<a for=ReadableStream>errored</a>, <a for=ReadableStream>enqueue</a> the result of
[=ArrayBufferView/create|creating=] a {{Uint8Array}} from the available bytes into
<var>stream</var>.

<p>When running <var>action</var> is done, <a for=ReadableStream>close</a> <var>stream</var>.
</ol>
Expand Down Expand Up @@ -7274,8 +7275,8 @@ algorithm, given an object that includes {{Body}} <var>object</var> and an algor
<div algorithm>
<p>The <dfn method for=Body><code>arrayBuffer()</code></dfn> method steps are to return the result
of running <a for=Body>consume body</a> with <a>this</a> and the following step given a
<a for=/>byte sequence</a> <var>bytes</var>: return a new {{ArrayBuffer}} whose contents are
<var>bytes</var>.
<a for=/>byte sequence</a> <var>bytes</var>: return the result of [=ArrayBuffer/creating=] an
{{ArrayBuffer}} from <var>bytes</var> in <a>this</a>'s <a>relevant realm</a>.

<p class="note">The above method can reject with a {{RangeError}}.
</div>
Expand All @@ -7291,7 +7292,7 @@ and whose {{Blob/type}} attribute is the result of <a for=Body>get the MIME type

<div algorithm>
<p>The <dfn method for=Body><code>formData()</code></dfn> method steps are to return the result of
running <a for=Body>consume body</a> with <a>this</a> and the following step given a
running <a for=Body>consume body</a> with <a>this</a> and the following steps given a
<a for=/>byte sequence</a> <var>bytes</var>:

<ol>
Expand Down

0 comments on commit 5d9d67b

Please sign in to comment.