From e750e5231fd476878458c69f3809fe8d2cf85e86 Mon Sep 17 00:00:00 2001 From: Ursula Date: Fri, 22 May 2015 11:52:44 -0400 Subject: [PATCH] Bug 1167594 - Make it possible for the preloaded browser to be remote. r=mconley --- browser/base/content/tabbrowser.xml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index a7ddc3ed4f8b..0c51ea559240 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -1570,7 +1570,12 @@ // Attach the nsIFormFillController now that we know the browser // will be used. If we do that before and the preloaded browser // won't be consumed until shutdown then we leak a docShell. - if (browser && this.hasAttribute("autocompletepopup")) { + // Also, we do not need to take care of attaching nsIFormFillControllers + // in the case that the browser is remote, as remote browsers take + // care of that themselves. + if (browser && + this.hasAttribute("autocompletepopup") && + !browser.isRemoteBrowser) { browser.setAttribute("autocompletepopup", this.getAttribute("autocompletepopup")); browser.attachFormFill(); } @@ -1601,7 +1606,9 @@ return; } - let browser = this._createBrowser({isPreloadBrowser: true}); + let remote = gMultiProcessBrowser && + E10SUtils.canLoadURIInProcess(BROWSER_NEW_TAB_URL, Ci.nsIXULRuntime.PROCESS_TYPE_CONTENT); + let browser = this._createBrowser({isPreloadBrowser: true, remote: remote}); this._preloadedBrowser = browser; let notificationbox = this.getNotificationBox(browser);