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

Revert "Closes all promises/streams when handler is destroyed."

This commit is contained in:
Yury Delendik 2017-10-06 11:55:28 -05:00 committed by GitHub
parent 460c4e38cc
commit fab59e0f91
3 changed files with 15 additions and 41 deletions

View file

@ -14,11 +14,10 @@
*/
import {
AbortException, arrayByteLength, arraysToBytes, assert,
createPromiseCapability, info, InvalidPDFException, isNodeJS, MessageHandler,
MissingPDFException, PasswordException, setVerbosityLevel,
UnexpectedResponseException, UnknownErrorException, UNSUPPORTED_FEATURES,
warn, XRefParseException
arrayByteLength, arraysToBytes, assert, createPromiseCapability, info,
InvalidPDFException, isNodeJS, MessageHandler, MissingPDFException,
PasswordException, setVerbosityLevel, UnexpectedResponseException,
UnknownErrorException, UNSUPPORTED_FEATURES, warn, XRefParseException
} from '../shared/util';
import { LocalPdfManager, NetworkPdfManager } from './pdf_manager';
import { Ref } from './primitives';
@ -842,7 +841,7 @@ var WorkerMessageHandler = {
return Promise.all(waitOn).then(function () {
// Notice that even if we destroying handler, resolved response promise
// must be sent back.
handler.close(new AbortException('Worker was terminated'));
handler.destroy();
handler = null;
});
});