Bug 1135303 - Don't warn when closing multiple tabs if sessionstore can undo close the requested amount of tabs. r=Gijs,mikedeboer

Differential Revision: https://phabricator.services.mozilla.com/D17858

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jared Wein 2019-01-30 13:36:25 +00:00
Родитель c9e2036ca5
Коммит bbe407fb99
2 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -823,7 +823,7 @@ pref("browser.sessionstore.idleDelay", 180000); // 3 minutes
// 0 = everywhere, 1 = unencrypted sites, 2 = nowhere
pref("browser.sessionstore.privacy_level", 0);
// how many tabs can be reopened (per window)
pref("browser.sessionstore.max_tabs_undo", 10);
pref("browser.sessionstore.max_tabs_undo", 25);
// how many windows can be reopened (per session) - on non-OS X platforms this
// pref may be ignored when dealing with pop-up windows to ensure proper startup
pref("browser.sessionstore.max_windows_undo", 3);

Просмотреть файл

@ -2676,6 +2676,12 @@ window._gBrowser = {
if (!shouldPrompt)
return true;
const maxTabsUndo = Services.prefs.getIntPref("browser.sessionstore.max_tabs_undo");
if (aCloseTabs != this.closingTabsEnum.ALL &&
tabsToClose <= maxTabsUndo) {
return true;
}
var ps = Services.prompt;
// default to true: if it were false, we wouldn't get this far