[Pkg-javascript-commits] [pdf.js] 133/210: Fix regression that prevents downloading the PDF file (PR 4752)

David Prévot taffit at moszumanska.debian.org
Thu Jun 5 14:21:10 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch upstream
in repository pdf.js.

commit c4d4682924335ad2899129e5415e6dd6e2107332
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Wed May 14 01:20:21 2014 +0200

    Fix regression that prevents downloading the PDF file (PR 4752)
---
 src/display/api.js | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/display/api.js b/src/display/api.js
index fd55b6b..069c064 100644
--- a/src/display/api.js
+++ b/src/display/api.js
@@ -306,9 +306,7 @@ var PDFDocumentProxy = (function PDFDocumentProxyClosure() {
      * the raw data from the PDF.
      */
     getData: function PDFDocumentProxy_getData() {
-      var capability = createPromiseCapability();
-      this.transport.getData(capability);
-      return capability.promise;
+      return this.transport.getData();
     },
     /**
      * @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) {
-      this.messageHandler.send('GetData', null, function(data) {
-        capability.resolve(data);
-      });
+    getData: function WorkerTransport_getData() {
+      return this.messageHandler.sendWithPromise('GetData', null);
     },
 
     getPage: function WorkerTransport_getPage(pageNumber, capability) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list