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

Adds destroy method to the document loading task.

Also renames PDFPageProxy.destroy method to cleanup.
This commit is contained in:
Yury Delendik 2015-10-20 17:45:55 -05:00
parent ef85685803
commit 59c13b32aa
10 changed files with 243 additions and 78 deletions

View file

@ -101,7 +101,7 @@ var PDFPageView = (function PDFPageViewClosure() {
this.zoomLayer = null;
this.reset();
if (this.pdfPage) {
this.pdfPage.destroy();
this.pdfPage.cleanup();
}
},

View file

@ -410,6 +410,11 @@ var PDFViewerApplication = {
function FirefoxComDataRangeTransport_requestDataRange(begin, end) {
FirefoxCom.request('requestDataRange', { begin: begin, end: end });
};
FirefoxComDataRangeTransport.prototype.abort =
function FirefoxComDataRangeTransport_abort() {
// Sync call to ensure abort is really started.
FirefoxCom.requestSync('abortLoading', null);
};
var pdfDataRangeTransport;