Bug 1454631 - Remove nsIXULBrowserWindow::forceInitialBrowserRemote. r?mconley draft
authorDão Gottwald <dao@mozilla.com>
Tue, 17 Apr 2018 16:04:10 +0200
changeset 783617 496b333a07a4db3e26bde94bba6030ef7de89898
parent 783549 f94b64e0020225c71701930f193bd96c3ad1d150
push id106735
push userdgottwald@mozilla.com
push dateTue, 17 Apr 2018 14:04:37 +0000
reviewersmconley
bugs1454631
milestone61.0a1
Bug 1454631 - Remove nsIXULBrowserWindow::forceInitialBrowserRemote. r?mconley MozReview-Commit-ID: BUOJ0TjSCgt
browser/base/content/browser.js
testing/talos/talos/pageloader/chrome/pageloader.js
xpfe/appshell/nsIXULBrowserWindow.idl
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -4496,20 +4496,16 @@ var XULBrowserWindow = {
     delete this.canViewSource;
     return this.canViewSource = document.getElementById("canViewSource");
   },
 
   setJSStatus() {
     // unsupported
   },
 
-  forceInitialBrowserRemote(aRemoteType) {
-    gBrowser.updateBrowserRemoteness(gBrowser.initialBrowser, true, { remoteType: aRemoteType });
-  },
-
   forceInitialBrowserNonRemote(aOpener) {
     gBrowser.updateBrowserRemoteness(gBrowser.initialBrowser, false, { opener: aOpener });
   },
 
   setDefaultStatus(status) {
     this.defaultStatus = status;
     StatusPanel.update();
   },
--- a/testing/talos/talos/pageloader/chrome/pageloader.js
+++ b/testing/talos/talos/pageloader/chrome/pageloader.js
@@ -204,20 +204,21 @@ function plInit() {
         // However, when it loads a URI that requires a different remote type,
         // we lose the load listener and the injected tpRecordTime.remote,
         //
         // It also probably means that per test (or, in fact, per pageloader browser
         // instance which adds the load listener and injects tpRecordTime), all the
         // pages should be able to load in the same mode as the initial page - due
         // to this reinitialization on the switch.
         let remoteType = E10SUtils.getRemoteTypeForURI(pageUrls[0], true);
+        let tabbrowser = browserWindow.gBrowser;
         if (remoteType) {
-          browserWindow.XULBrowserWindow.forceInitialBrowserRemote(remoteType);
+          tabbrowser.updateBrowserRemoteness(tabbrowser.initialBrowser, true, { remoteType });
         } else {
-          browserWindow.XULBrowserWindow.forceInitialBrowserNonRemote(null);
+          tabbrowser.updateBrowserRemoteness(tabbrowser.initialBrowser, false);
         }
 
         browserWindow.resizeTo(winWidth, winHeight);
         browserWindow.moveTo(0, 0);
         browserWindow.focus();
         content = browserWindow.getBrowser();
         content.selectedBrowser.messageManager.loadFrameScript("chrome://pageloader/content/utils.js", false, true);
 
--- a/xpfe/appshell/nsIXULBrowserWindow.idl
+++ b/xpfe/appshell/nsIXULBrowserWindow.idl
@@ -45,17 +45,16 @@ interface nsIXULBrowserWindow : nsISuppo
                                 in nsIDOMNode linkNode,
                                 in boolean isAppTab);
 
   /**
    * Find the initial browser of the window and set its remote attributes.
    * This can be used to ensure that there is a browser in a new window of the
    * correct type when it first spawns.
    */
-  void forceInitialBrowserRemote(in AString aRemoteType);
   void forceInitialBrowserNonRemote(in mozIDOMWindowProxy openerWindow);
 
   /**
    * Determines whether a load should continue.
    *
    * @param aDocShell
    *        The docshell performing the load.
    * @param aURI