mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Back out fe2fdd5d3aae (bug 722994) for mochitest-chrome failures
This commit is contained in:
parent
30d19a811a
commit
0cf36c5493
@ -16,19 +16,18 @@ function closeWindow(aClose, aPromptFunction)
|
||||
if (++windowCount == 2)
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
var inPrivateBrowsing = false;
|
||||
let chromeWin = window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebNavigation)
|
||||
.QueryInterface(Ci.nsIDocShellTreeItem)
|
||||
.rootTreeItem
|
||||
.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindow)
|
||||
.wrappedJSObject;
|
||||
|
||||
if (chromeWin != null)
|
||||
inPrivateBrowsing = chromeWin.gPrivateBrowsingUI.privateWindow;
|
||||
|
||||
try {
|
||||
if (["@mozilla.org/privatebrowsing;1"] in Components.classes) {
|
||||
var pbSvc = Components.classes["@mozilla.org/privatebrowsing;1"]
|
||||
.getService(Components.interfaces.nsIPrivateBrowsingService);
|
||||
inPrivateBrowsing = pbSvc.privateBrowsingEnabled;
|
||||
}
|
||||
} catch(e) {
|
||||
// safe to ignore
|
||||
}
|
||||
|
||||
// If we're down to the last window and someone tries to shut down, check to make sure we can!
|
||||
if (windowCount == 1 && !canQuitApplication("lastwindow"))
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user