Bug 1039500: Fix remaining callers of tabbrowser._getTabForBrowser on a CLOSED TREE. r=Unfocused

This commit is contained in:
Dave Townsend 2014-10-09 16:26:11 -07:00
parent 3031a81596
commit f70b835a88
6 changed files with 6 additions and 6 deletions

View File

@ -788,7 +788,7 @@ function gKeywordURIFixup({ target: browser, data: fixupInfo }) {
// Called when a docshell has attempted to load a page in an incorrect process.
// This function is responsible for loading the page in the correct process.
function RedirectLoad({ target: browser, data }) {
let tab = gBrowser._getTabForBrowser(browser);
let tab = gBrowser.getTabForBrowser(browser);
// Flush the tab state before getting it
TabState.flush(browser);
let tabState = JSON.parse(SessionStore.getTabState(tab));

View File

@ -389,7 +389,7 @@
.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocShell)
.chromeEventHandler;
return this._getTabForBrowser(browser);
return this.getTabForBrowser(browser);
}
for (let i = 0; i < this.browsers.length; i++) {

View File

@ -77,7 +77,7 @@ function getFindBar(domWindow) {
var browser = getContainingBrowser(domWindow);
try {
var tabbrowser = browser.getTabBrowser();
var tab = tabbrowser._getTabForBrowser(browser);
var tab = tabbrowser.getTabForBrowser(browser);
return tabbrowser.getFindBar(tab);
} catch (e) {
// FF22 has no _getTabForBrowser, and FF24 has no getFindBar

View File

@ -285,7 +285,7 @@ let PdfjsChromeUtils = {
*/
function PdfjsFindbarWrapper(aBrowser) {
let tabbrowser = aBrowser.getTabBrowser();
let tab = tabbrowser._getTabForBrowser(aBrowser);
let tab = tabbrowser.getTabForBrowser(aBrowser);
this._findbar = tabbrowser.getFindBar(tab);
};

View File

@ -65,7 +65,7 @@ this.webrtcUI = {
let browser = aStream.browser;
let browserWindow = browser.ownerDocument.defaultView;
let tab = browserWindow.gBrowser &&
browserWindow.gBrowser._getTabForBrowser(browser);
browserWindow.gBrowser.getTabForBrowser(browser);
return {uri: state.documentURI, tab: tab, browser: browser, types: types};
});
},

View File

@ -185,7 +185,7 @@ this.FxAccountsOAuthClient.prototype = {
let tabbrowser = target.getTabBrowser();
if (tabbrowser) {
let tab = tabbrowser._getTabForBrowser(target);
let tab = tabbrowser.getTabForBrowser(target);
if (tab) {
tabbrowser.removeTab(tab);