Merge pull request #3720 from biggert/localpdfmanager-undefined
Prevent undefined error when calling .destroy on a document when LocalPdfManager is used
This commit is contained in:
commit
7f49dba87c
@ -63,6 +63,10 @@ var BasePdfManager = (function BasePdfManagerClosure() {
|
|||||||
if (this.passwordChangedPromise) {
|
if (this.passwordChangedPromise) {
|
||||||
this.passwordChangedPromise.resolve();
|
this.passwordChangedPromise.resolve();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
terminate: function BasePdfManager_terminate() {
|
||||||
|
return new NotImplementedException();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -115,6 +119,11 @@ var LocalPdfManager = (function LocalPdfManagerClosure() {
|
|||||||
return this.loadedStream;
|
return this.loadedStream;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
LocalPdfManager.prototype.terminate =
|
||||||
|
function LocalPdfManager_terminate() {
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
return LocalPdfManager;
|
return LocalPdfManager;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
@ -192,6 +201,11 @@ var NetworkPdfManager = (function NetworkPdfManagerClosure() {
|
|||||||
return this.streamManager.onLoadedStream();
|
return this.streamManager.onLoadedStream();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
NetworkPdfManager.prototype.terminate =
|
||||||
|
function NetworkPdfManager_terminate() {
|
||||||
|
this.streamManager.networkManager.abortAllRequests();
|
||||||
|
};
|
||||||
|
|
||||||
return NetworkPdfManager;
|
return NetworkPdfManager;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
@ -368,7 +368,7 @@ var WorkerMessageHandler = PDFJS.WorkerMessageHandler = {
|
|||||||
});
|
});
|
||||||
|
|
||||||
handler.on('Terminate', function wphTerminate(data, promise) {
|
handler.on('Terminate', function wphTerminate(data, promise) {
|
||||||
pdfManager.streamManager.networkManager.abortAllRequests();
|
pdfManager.terminate();
|
||||||
promise.resolve();
|
promise.resolve();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user