Bug 1047603 - Make Marionette server force the initial browser to be remote when in an e10s window. r=?
Marionette gets and holds the message manager for the initial browser when
setting up a session. However, when starting up an e10s window, the initial
browser is non-remote. When the browser starts opening a URI, it will usually
transition to remote, which means that the initial message manager reference
is no good (because the message manager for a browser that is remote is not
the same after it has been made not remote, and vice versa).
This patch causes us to force that initial browser to become remote so that
by the time Marionette gets a reference to the message manager, it gets the
right one.
--- a/testing/marionette/marionette-server.js
+++ b/testing/marionette/marionette-server.js
@@ -3148,16 +3148,21 @@ BrowserObj.prototype = {
this.browser = win.BrowserApp;
break;
}
},
/**
* Called when we start a session with this browser.
*/
startSession: function BO_startSession(newSession, win, callback) {
+ if (appName == "Firefox" &&
+ win.gMultiProcessBrowser &&
+ !win.gBrowser.selectedBrowser.isRemoteBrowser) {
+ win.XULBrowserWindow.forceInitialBrowserRemote();
+ }
callback(win, newSession);
},
/**
* Closes current tab
*/
closeTab: function BO_closeTab() {
if (this.browser &&