diff --git a/browser/components/BrowserGlue.jsm b/browser/components/BrowserGlue.jsm index c412765d3e24..44ae9c891aa1 100644 --- a/browser/components/BrowserGlue.jsm +++ b/browser/components/BrowserGlue.jsm @@ -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");