Fix regression that prevents downloading the PDF file (PR 4752)
This commit is contained in:
parent
44cd0f4a76
commit
c4d4682924
@ -306,9 +306,7 @@ var PDFDocumentProxy = (function PDFDocumentProxyClosure() {
|
|||||||
* the raw data from the PDF.
|
* the raw data from the PDF.
|
||||||
*/
|
*/
|
||||||
getData: function PDFDocumentProxy_getData() {
|
getData: function PDFDocumentProxy_getData() {
|
||||||
var capability = createPromiseCapability();
|
return this.transport.getData();
|
||||||
this.transport.getData(capability);
|
|
||||||
return capability.promise;
|
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @return {Promise} A promise that is resolved when the document's data
|
* @return {Promise} A promise that is resolved when the document's data
|
||||||
@ -983,10 +981,8 @@ var WorkerTransport = (function WorkerTransportClosure() {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
getData: function WorkerTransport_getData(capability) {
|
getData: function WorkerTransport_getData() {
|
||||||
this.messageHandler.send('GetData', null, function(data) {
|
return this.messageHandler.sendWithPromise('GetData', null);
|
||||||
capability.resolve(data);
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
getPage: function WorkerTransport_getPage(pageNumber, capability) {
|
getPage: function WorkerTransport_getPage(pageNumber, capability) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user