зеркало из https://github.com/mozilla/pjs.git
Bug 729261 - Set private browsing attribute on windows that exist after transition into PB mode. r=ehsan
This commit is contained in:
Родитель
328f740cd5
Коммит
21e6ac3195
|
@ -189,18 +189,6 @@ PrivateBrowsingService.prototype = {
|
|||
}
|
||||
win.close();
|
||||
}
|
||||
|
||||
var windowsEnum = Services.wm.getEnumerator("navigator:browser");
|
||||
while (windowsEnum.hasMoreElements()) {
|
||||
var window = windowsEnum.getNext();
|
||||
window.getInterface(Ci.nsIWebNavigation)
|
||||
.QueryInterface(Ci.nsIDocShellTreeItem)
|
||||
.treeOwner
|
||||
.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIXULWindow)
|
||||
.docShell.QueryInterface(Ci.nsILoadContext)
|
||||
.usePrivateBrowsing = this._inPrivateBrowsing;
|
||||
}
|
||||
|
||||
if (!this._quitting && this._saveSession) {
|
||||
let browserWindow = this._getBrowserWindow();
|
||||
|
@ -229,6 +217,18 @@ PrivateBrowsingService.prototype = {
|
|||
.getInterface(Ci.nsIXULWindow)
|
||||
.docShell.contentViewer.resetCloseWindow();
|
||||
}
|
||||
|
||||
var windowsEnum = Services.wm.getEnumerator("navigator:browser");
|
||||
while (windowsEnum.hasMoreElements()) {
|
||||
var window = windowsEnum.getNext();
|
||||
window.getInterface(Ci.nsIWebNavigation)
|
||||
.QueryInterface(Ci.nsIDocShellTreeItem)
|
||||
.treeOwner
|
||||
.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIXULWindow)
|
||||
.docShell.QueryInterface(Ci.nsILoadContext)
|
||||
.usePrivateBrowsing = this._inPrivateBrowsing;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Загрузка…
Ссылка в новой задаче