1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 17:48:07 +02:00

Added sendWithStream method in MessageHandler.

Adds functionality to accept Queueing Strategy in
sendWithStream method. Using Queueing Strategy we
can control the data that is enqueued into the sink,
and hence regulated the flow of chunks from worker
to main thread.

Adds capability in pull and cancel methods.
Adds ready and desiredSize property in streamSink.

Adds unit test for ReadableStream and sendWithStream.
This commit is contained in:
Mukul Mishra 2017-04-14 02:39:25 +05:30
parent edd7d89fe5
commit bbd9968f76
6 changed files with 653 additions and 40 deletions

View file

@ -1960,7 +1960,8 @@ function ReadableStreamClose(stream) {
if (IsReadableStreamDefaultReader(reader) === true) {
for (var i = 0; i < reader._readRequests.length; i++) {
var _resolve = reader._readRequests[i];
var _resolve = reader._readRequests[i]._resolve;
_resolve(CreateIterResultObject(undefined, true));
}
reader._readRequests = [];