Bug 884355 - Warn about closing multiple tabs when "Never remember history" is enabled" r=gavin

This commit is contained in:
Majda Nafissa Rahal 2013-06-23 05:03:00 -04:00
parent 09349f8047
commit a8993d4cc3

View File

@ -5904,8 +5904,9 @@ function WindowIsClosing()
* @returns true if closing can proceed, false if it got cancelled.
*/
function warnAboutClosingWindow() {
// Popups aren't considered full browser windows.
let isPBWindow = PrivateBrowsingUtils.isWindowPrivate(window);
// Popups aren't considered full browser windows; we also ignore private windows.
let isPBWindow = PrivateBrowsingUtils.isWindowPrivate(window) &&
!PrivateBrowsingUtils.permanentPrivateBrowsing;
if (!isPBWindow && !toolbar.visible)
return gBrowser.warnAboutClosingTabs(gBrowser.closingTabsEnum.ALL);