Skip to content

Commit

Permalink
Fix #26: allocating an ArrayBuffer can fail
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Jan 21, 2016
1 parent cc15c94 commit 6484330
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
12 changes: 10 additions & 2 deletions Overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -1441,8 +1441,16 @@ <h4 id="response-body"><span class="secno">4.6.6 </span>Response body</h4>
<a href="#response">response</a>'s
<a class="external" data-anolis-spec="fetch" href="https://fetch.spec.whatwg.org/#concept-response-body" title="concept-response-body">body</a> otherwise.

<li><p>Set <a href="#response-arraybuffer-object">response <code>ArrayBuffer</code> object</a> to a new
<code>ArrayBuffer</code> object representing <var>bytes</var> and return it.
<li>
<p>Set <a href="#response-arraybuffer-object">response <code>ArrayBuffer</code> object</a> to a new <code>ArrayBuffer</code>
object representing <var>bytes</var>. If this throws an exception, set
<a href="#response-arraybuffer-object">response <code>ArrayBuffer</code> object</a> and <a href="#response">response</a>'s
<a class="external" data-anolis-spec="fetch" href="https://fetch.spec.whatwg.org/#concept-response-body" title="concept-response-body">body</a> to null.

<p class="note">Allocating an <code>ArrayBuffer</code> buffer is not guaranteed to succeed.
<a href="#refsECMASCRIPT">[ECMASCRIPT]</a>

<li><p>Return <a href="#response-arraybuffer-object">response <code>ArrayBuffer</code> object</a>.
</ol>


Expand Down
12 changes: 10 additions & 2 deletions Overview.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -1393,8 +1393,16 @@ <h4>Response body</h4>
<span>response</span>'s
<span data-anolis-spec=fetch title=concept-response-body>body</span> otherwise.

<li><p>Set <span>response <code>ArrayBuffer</code> object</span> to a new
<code>ArrayBuffer</code> object representing <var>bytes</var> and return it.
<li>
<p>Set <span>response <code>ArrayBuffer</code> object</span> to a new <code>ArrayBuffer</code>
object representing <var>bytes</var>. If this throws an exception, set
<span>response <code>ArrayBuffer</code> object</span> and <span>response</span>'s
<span data-anolis-spec=fetch title=concept-response-body>body</span> to null.

<p class="note">Allocating an <code>ArrayBuffer</code> buffer is not guaranteed to succeed.
<span data-anolis-ref>ECMASCRIPT</span>

<li><p>Return <span>response <code>ArrayBuffer</code> object</span>.
</ol>


Expand Down

0 comments on commit 6484330

Please sign in to comment.