Bug 1738264 - don't show session restore infobar for private browsing windows, r=sfoster

This is a test.

Differential Revision: https://phabricator.services.mozilla.com/D129971
This commit is contained in:
Gijs Kruitbosch 2021-11-18 15:00:44 +00:00
Родитель 22abdf8e0c
Коммит b11c3672e8
1 изменённых файлов: 7 добавлений и 3 удалений

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

@ -4137,8 +4137,13 @@ BrowserGlue.prototype = {
return;
}
// We've restarted at least once; we will show the notification if possible:
if (!SessionStore.canRestoreLastSession) {
const win = BrowserWindowTracker.getTopWindow();
// We've restarted at least once; we will show the notification if possible.
// We can't do that if there's no session to restore, or this is a private window.
if (
!SessionStore.canRestoreLastSession ||
PrivateBrowsingUtils.isWindowPrivate(win)
) {
return;
}
@ -4147,7 +4152,6 @@ BrowserGlue.prototype = {
++count
);
const win = BrowserWindowTracker.getTopWindow();
const messageFragment = win.document.createDocumentFragment();
const message = win.document.createElement("span");
const icon = win.document.createElement("img");