[Pkg-javascript-commits] [pdf.js] 55/106: [Firefox] Re-add _getTabForBrowser compatibility hack for the addon

David Prévot taffit at moszumanska.debian.org
Sat Jun 20 21:34:12 UTC 2015


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

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

commit c82fa16dd2aeed2f9362dd663f6d68bc57ee007d
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Tue May 26 18:07:00 2015 +0200

    [Firefox] Re-add _getTabForBrowser compatibility hack for the addon
    
    This should enable Find to work again in the current ESR version (31).
---
 extensions/firefox/content/PdfjsChromeUtils.jsm | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/extensions/firefox/content/PdfjsChromeUtils.jsm b/extensions/firefox/content/PdfjsChromeUtils.jsm
index d74da68..c5b24f8 100644
--- a/extensions/firefox/content/PdfjsChromeUtils.jsm
+++ b/extensions/firefox/content/PdfjsChromeUtils.jsm
@@ -168,7 +168,18 @@ let PdfjsChromeUtils = {
   _findbarFromMessage: function(aMsg) {
     let browser = aMsg.target;
     let tabbrowser = browser.getTabBrowser();
-    let tab = tabbrowser.getTabForBrowser(browser);
+    let tab;
+//#if MOZCENTRAL
+    tab = tabbrowser.getTabForBrowser(browser);
+//#else
+    if (tabbrowser.getTabForBrowser) {
+      tab = tabbrowser.getTabForBrowser(browser);
+    } else {
+      // _getTabForBrowser is deprecated in Firefox 35, see
+      // https://bugzilla.mozilla.org/show_bug.cgi?id=1039500.
+      tab = tabbrowser._getTabForBrowser(browser);
+    }
+//#endif
     return tabbrowser.getFindBar(tab);
   },
 

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