diff --git a/fetch.bs b/fetch.bs index 9a86075bc..310c0f62a 100644 --- a/fetch.bs +++ b/fetch.bs @@ -1042,7 +1042,7 @@ must be an algorithm accepting an exception.
Let reader be the result of getting a reader for body's stream. -
This operation ought not to throw an exception. +
This operation will not throw an exception.
Perform the incrementally-read loop given reader, taskDestination, processBodyChunk, processEndOfBody, and @@ -1072,8 +1072,12 @@ must be an algorithm accepting an exception.
Otherwise:
Let bytes be a copy of - chunk. +
Let bytes be a copy of + chunk. + +
Implementations are strongly encouraged to use an implementation strategy that + avoids this copy where possible.
Set continueAlgorithm to these steps:
@@ -3226,11 +3230,11 @@ an optional algorithm processResp
optional algorithm
processResponseEndOfBody,
and an optional boolean useParallelQueue (default false), run
-the steps below. If given, processRequestBody must be an algorithm accepting an integer.
-If given, processRequestEndOfBody must be an algorithm accepting no arguments.
-processResponse must be an algorithm accepting a response.
-processResponseEndOfBody must be an algorithm accepting a response and null,
-failure, or a byte sequence.
+the steps below. If given, processRequestBody must be an algorithm accepting an integer
+representing the number of bytes transmitted. If given, processRequestEndOfBody must be
+an algorithm accepting no arguments. If given, processResponse must be an algorithm
+accepting a response. If given, processResponseEndOfBody must be an
+algorithm accepting a response and null, failure, or a byte sequence.
An ongoing fetch can be
terminated with flag aborted,
@@ -3660,14 +3664,15 @@ steps:
then:
Let processBody given nullOrFailureOrBytes be this step: run
+ Let processBody given nullOrBytes be this step: run
fetchParams's process response end-of-body given
- response and nullOrFailureOrBytes.
+ response and nullOrBytes.
- Let processBodyError be to run processBody given failure.
+ Let processBodyError be this step: run fetchParams's
+ process response end-of-body given response and failure.
If response's body is null, then queue a fetch task
- to processBody given null, with fetchParams's
+ to run processBody given null, with fetchParams's
task destination.
Otherwise, fully read response's body given
@@ -4685,7 +4690,7 @@ these steps:
Let processBodyChunk given bytes, be these steps:
+ Let processBodyChunk given bytes be these steps:
If the ongoing fetch is terminated, then abort these steps.
@@ -4709,7 +4714,7 @@ these steps:
Let processBodyError given e, be these steps:
+ Let processBodyError given e be these steps:
If the ongoing fetch is terminated, then abort these steps.
-