Bug 1039500: Fix remaining callers of tabbrowser._getTabForBrowser on a CLOSED TREE. r=Unfocused
authorDave Townsend <dtownsend@oxymoronical.com>
Thu, 09 Oct 2014 16:26:11 -0700
changeset 209721 8f632f1754a79635397bde0eecbcaea8b0340e57
parent 209720 d0a4eacacc458cba047fac48f8e94b75a893d4df
child 209722 27a288fc5313d1963adab2045e95ca2ff4973338
push id50247
push userkwierso@gmail.com
push dateFri, 10 Oct 2014 04:40:13 +0000
treeherdermozilla-inbound@c1617b7400c0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersUnfocused
bugs1039500
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1039500: Fix remaining callers of tabbrowser._getTabForBrowser on a CLOSED TREE. r=Unfocused
browser/base/content/browser.js
browser/base/content/tabbrowser.xml
browser/extensions/pdfjs/content/PdfStreamConverter.jsm
browser/extensions/pdfjs/content/PdfjsChromeUtils.jsm
browser/modules/webrtcUI.jsm
services/fxaccounts/FxAccountsOAuthClient.jsm
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -783,17 +783,17 @@ function gKeywordURIFixup({ target: brow
   };
 
   gDNSService.asyncResolve(hostName, 0, onLookupComplete, Services.tm.mainThread);
 }
 
 // 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));
 
   if (data.historyIndex < 0) {
     // Add a pseudo-history state for the new url to load
     let newEntry = {
       url: data.uri,
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -384,17 +384,17 @@
           // When not using remote browsers, we can take a fast path by getting
           // directly from the content window to the browser without looping
           // over all browsers.
           if (!gMultiProcessBrowser) {
             let browser = aWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                                  .getInterface(Ci.nsIWebNavigation)
                                  .QueryInterface(Ci.nsIDocShell)
                                  .chromeEventHandler;
-            return this._getTabForBrowser(browser);
+            return this.getTabForBrowser(browser);
           }
 
           for (let i = 0; i < this.browsers.length; i++) {
             // NB: We use contentWindowAsCPOW so that this code works both
             // for remote browsers as well. aWindow may be a CPOW.
             if (this.browsers[i].contentWindowAsCPOW == aWindow)
               return this.tabs[i];
           }
--- a/browser/extensions/pdfjs/content/PdfStreamConverter.jsm
+++ b/browser/extensions/pdfjs/content/PdfStreamConverter.jsm
@@ -72,17 +72,17 @@ function getChromeWindow(domWindow) {
 
 function getFindBar(domWindow) {
   if (PdfjsContentUtils.isRemote) {
     return PdfjsContentUtils.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
     var chromeWindow = browser.ownerDocument.defaultView;
     return chromeWindow.gFindBar;
   }
 }
 
--- a/browser/extensions/pdfjs/content/PdfjsChromeUtils.jsm
+++ b/browser/extensions/pdfjs/content/PdfjsChromeUtils.jsm
@@ -280,17 +280,17 @@ let PdfjsChromeUtils = {
 /*
  * CPOW security features require chrome objects declare exposed
  * properties via __exposedProps__. We don't want to expose things
  * directly on the findbar, so we wrap the findbar in a smaller
  * object here that supports the features pdf.js needs.
  */
 function PdfjsFindbarWrapper(aBrowser) {
   let tabbrowser = aBrowser.getTabBrowser();
-  let tab = tabbrowser._getTabForBrowser(aBrowser);
+  let tab = tabbrowser.getTabForBrowser(aBrowser);
   this._findbar = tabbrowser.getFindBar(tab);
 };
 
 PdfjsFindbarWrapper.prototype = {
   __exposedProps__: {
     addEventListener: "r",
     removeEventListener: "r",
     updateControlState: "r",
--- a/browser/modules/webrtcUI.jsm
+++ b/browser/modules/webrtcUI.jsm
@@ -60,17 +60,17 @@ this.webrtcUI = {
              aScreen && state.screen;
     }).map(aStream => {
       let state = aStream.state;
       let types = {camera: state.camera, microphone: state.microphone,
                    screen: state.screen};
       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};
     });
   },
 
   showSharingDoorhanger: function(aActiveStream, aType) {
     let browserWindow = aActiveStream.browser.ownerDocument.defaultView;
     if (aActiveStream.tab) {
       browserWindow.gBrowser.selectedTab = aActiveStream.tab;
--- a/services/fxaccounts/FxAccountsOAuthClient.jsm
+++ b/services/fxaccounts/FxAccountsOAuthClient.jsm
@@ -180,17 +180,17 @@ this.FxAccountsOAuthClient.prototype = {
             this.tearDown();
 
             // if the message asked to close the tab
             if (data.closeWindow && target) {
               // for e10s reasons the best way is to use the TabBrowser to close the tab.
               let tabbrowser = target.getTabBrowser();
 
               if (tabbrowser) {
-                let tab = tabbrowser._getTabForBrowser(target);
+                let tab = tabbrowser.getTabForBrowser(target);
 
                 if (tab) {
                   tabbrowser.removeTab(tab);
                   log.debug("OAuth flow closed the tab.");
                 } else {
                   log.debug("OAuth flow failed to close the tab. Tab not found in TabBrowser.");
                 }
               } else {