[Pkg-javascript-commits] [pdf.js] 43/204: streamsPrivate API change.

David Prévot taffit at moszumanska.debian.org
Sat Oct 25 18:50:29 UTC 2014


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

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

commit 7938081e813ccbfb1be789bfb567a71dd51f9a36
Author: Rob Wu <rob at robwu.nl>
Date:   Sat Sep 6 00:41:08 2014 +0200

    streamsPrivate API change.
    
    Since 25 February 2014 (crbug.com/345882)
---
 extensions/chromium/pdfHandler-v2.js | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/extensions/chromium/pdfHandler-v2.js b/extensions/chromium/pdfHandler-v2.js
index 9bfbc09..7645697 100644
--- a/extensions/chromium/pdfHandler-v2.js
+++ b/extensions/chromium/pdfHandler-v2.js
@@ -180,6 +180,16 @@ limitations under the License.
    *                       (added in Chrome 29, http://crbug.com/230346)
    */
   function handleStream(mimeType, pdfUrl, streamUrl, tabId, expectedSize) {
+    if (typeof mimeType === 'object') {
+      // API change: argument list -> object, see crbug.com/345882
+      // documentation: chrome/common/extensions/api/streams_private.idl
+      var streamInfo = mimeType;
+      mimeType = streamInfo.mimeType;
+      pdfUrl = streamInfo.originalUrl;
+      streamUrl = streamInfo.streamUrl;
+      tabId = streamInfo.tabId;
+      expectedSize = streamInfo.expectedContentSize;
+    }
     console.log('Intercepted ' + mimeType + ' in tab ' + tabId + ' with URL ' +
                 pdfUrl + '\nAvailable as: ' + streamUrl);
     streamSupportsTabId = typeof tabId === 'number';

-- 
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