Bug 1227252 - [marionette] Don't depend on a potentially stale tab reference in hasRemotenessChange(), r=ato

This commit is contained in:
Andrew Halberstadt 2015-11-23 14:49:13 -05:00
parent ad66e18dc4
commit 59b2cd0109

View File

@ -3212,7 +3212,9 @@ BrowserObj.prototype.hasRemotenessChange = function() {
return true;
}
let currentIsRemote = this.browserForTab.isRemoteBrowser;
// this.tab can potentially get stale and cause problems, see bug 1227252
let currentTab = this.browser.selectedTab;
let currentIsRemote = this.browser.getBrowserForTab(currentTab).isRemoteBrowser;
this._hasRemotenessChange = this._browserWasRemote !== currentIsRemote;
this._browserWasRemote = currentIsRemote;
return this._hasRemotenessChange;