[Pkg-javascript-commits] [pdf.js] 168/204: addon: isWindowPrivate -> isContentWindowPrivate

David Prévot taffit at moszumanska.debian.org
Sat Oct 25 18:50:47 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 4fe92f6d01aaf5e0066a5ccc3deaf9dd83f808b6
Author: Rob Wu <rob at robwu.nl>
Date:   Tue Sep 30 18:14:51 2014 +0200

    addon: isWindowPrivate -> isContentWindowPrivate
    
    As of Firefox 35, isContentWindowPrivate should be used for DOM windows instead of isWindowPrivate.
    See https://bugzilla.mozilla.org/show_bug.cgi?id=1069059 and
    http://hg.mozilla.org/mozilla-central/diff/324798b60ba3/toolkit/modules/PrivateBrowsingUtils.jsm
    
    Without this fix, you will get the following error message when Firefox+PDF.js is started:
    >
    WARNING: content window passed to PrivateBrowsingUtils.isWindowPrivate. Use isContentWindowPrivate instead (but only for frame scripts).
    pbu_isWindowPrivate at resource://gre/modules/PrivateBrowsingUtils.jsm:25:14
    ChromeActions.prototype.isInPrivateBrowsing at resource://pdf.js/PdfStreamConverter.jsm:237:12
    xhr_onreadystatechange at resource://pdf.js/PdfStreamConverter.jsm:545:30
    NetworkManager_requestRange at resource://pdf.js/network.js:95:7
    NetworkManager_requestRange at resource://pdf.js/network.js:81:14
    RangedChromeActions_requestDataRange at resource://pdf.js/PdfStreamConverter.jsm:596:1
    RequestListener.prototype.receive at resource://pdf.js/PdfStreamConverter.jsm:705:5
    PdfStreamConverter.prototype.onStartRequest/proxy.onStopRequest/<@resource://pdf.js/PdfStreamConverter.jsm:909:11
    FirefoxComClosure/<.request at resource://pdf.js/web/viewer.js:529:14
    PdfDataRangeTransport_requestDataRange at resource://pdf.js/web/viewer.js:2977:9
    transportDataRange at resource://pdf.js/build/pdf.js:2122:13
    messageHandlerComObjOnMessage at resource://pdf.js/build/pdf.js:1219:9
---
 extensions/firefox/content/PdfStreamConverter.jsm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/extensions/firefox/content/PdfStreamConverter.jsm b/extensions/firefox/content/PdfStreamConverter.jsm
index 0c28a6b..80b716d 100644
--- a/extensions/firefox/content/PdfStreamConverter.jsm
+++ b/extensions/firefox/content/PdfStreamConverter.jsm
@@ -255,7 +255,14 @@ function ChromeActions(domWindow, contentDispositionFilename) {
 
 ChromeActions.prototype = {
   isInPrivateBrowsing: function() {
-    return PrivateBrowsingUtils.isWindowPrivate(this.domWindow);
+//#if !MOZCENTRAL
+    if (!PrivateBrowsingUtils.isContentWindowPrivate) {
+      // pbu.isContentWindowPrivate was not supported prior Firefox 35.
+      // (https://bugzilla.mozilla.org/show_bug.cgi?id=1069059)
+      return PrivateBrowsingUtils.isWindowPrivate(this.domWindow);
+    }
+//#endif
+    return PrivateBrowsingUtils.isContentWindowPrivate(this.domWindow);
   },
   download: function(data, sendResponse) {
     var self = this;

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