зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1071225 - Fix closing the FxAccountsOAuthClient tab with e10s. r=MattN
--HG-- extra : rebase_source : 5ffdd51c674dfc22ac301ab54b317b9219d8e07f
This commit is contained in:
Родитель
4652d7a523
Коммит
f3905cbf49
|
@ -316,7 +316,6 @@ skip-if = e10s # Bug ?????? - test directly manipulates content (tries to grab a
|
|||
[browser_fullscreen-window-open.js]
|
||||
skip-if = buildapp == 'mulet' || e10s || os == "linux" # Bug 933103 - mochitest's EventUtils.synthesizeMouse functions not e10s friendly. Linux: Intermittent failures - bug 941575.
|
||||
[browser_fxa_oauth.js]
|
||||
skip-if = e10s
|
||||
[browser_gestureSupport.js]
|
||||
skip-if = e10s # Bug 863514 - no gesture support.
|
||||
[browser_getshortcutoruri.js]
|
||||
|
|
|
@ -180,8 +180,22 @@ this.FxAccountsOAuthClient.prototype = {
|
|||
this.tearDown();
|
||||
|
||||
// if the message asked to close the tab
|
||||
if (data.closeWindow && target && target.contentWindow) {
|
||||
target.contentWindow.close();
|
||||
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);
|
||||
|
||||
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 {
|
||||
log.debug("OAuth flow failed to close the tab. TabBrowser not found.");
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче