Merge pull request #6051 from Snuffleupagus/esr-31-find

[Firefox] Re-add _getTabForBrowser compatibility hack for the addon
This commit is contained in:
Yury Delendik 2015-05-27 08:15:25 -05:00
commit c7756d5f96

View File

@ -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);
},