Skip to content

Commit 4cd70cf

Browse files
authored
Actually define Blob-to-ReadableStream conversion
Together with #1505 this fixes #1504.
1 parent 813788a commit 4cd70cf

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

fetch.bs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6544,10 +6544,19 @@ typedef (ReadableStream or XMLHttpRequestBodyInit) BodyInit;</pre>
65446544
steps:
65456545

65466546
<ol>
6547-
<li><p>Let <var>stream</var> be <var>object</var> if <var>object</var> is a {{ReadableStream}}
6548-
object. Otherwise, let <var>stream</var> be a <a>new</a> {{ReadableStream}}, and
6547+
<li><p>Let <var>stream</var> be null.
6548+
6549+
<li><p>If <var>object</var> is a {{ReadableStream}} object, then set <var>stream</var> to
6550+
<var>object</var>.
6551+
6552+
<li><p>Otherwise, if <var>object</var> is a {{Blob}} object, set <var>stream</var> to the result of
6553+
running <var>object</var>'s <a for=Blob>get stream</a>.
6554+
6555+
<li><p>Otherwise, set <var>stream</var> to a <a>new</a> {{ReadableStream}} object, and
65496556
<a for=ReadableStream>set up</a> <var>stream</var>.
65506557

6558+
<li><p><a for=/>Assert</a>: <var>stream</var> is a {{ReadableStream}} object.
6559+
65516560
<li><p>Let <var>action</var> be null.
65526561

65536562
<li><p>Let <var>source</var> be null.
@@ -6562,8 +6571,6 @@ steps:
65626571
<dl class=switch>
65636572
<dt>{{Blob}}
65646573
<dd>
6565-
<p>Set <var>action</var> to this step: read <var>object</var>.
6566-
65676574
<p>Set <var>source</var> to <var>object</var>.
65686575

65696576
<p>Set <var>length</var> to <var>object</var>'s {{Blob/size}}.

0 commit comments

Comments
 (0)