Commit 09e1a0e7 authored by Kathleen Brade's avatar Kathleen Brade Committed by Georg Koppen
Browse files

Bug 18170: After update, only changelog tab shown

When in permanent private browsing mode, always return false
for isAutomaticRestoreEnabled. This ensures that there will
not be any confusion inside nsBrowserContentHandler.defaultArgs
as to whether a one time session restore will occur.

Also, for consistency and in case someone looks at the pref,
avoid setting browser.sessionstore.resume_session = true during
browser shutdown.

This bug occurred when staging was not used during the update
process. On Windows it always occurred because staging is not
used even when it should be (see #18292).
parent beb375e7
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -226,7 +226,9 @@ BrowserGlue.prototype = {
    if (!this._saveSession && !aForce)
      return;

    if (!PrivateBrowsingUtils.permanentPrivateBrowsing) {
      Services.prefs.setBoolPref("browser.sessionstore.resume_session_once", true);
    }

    // This method can be called via [NSApplication terminate:] on Mac, which
    // ends up causing prefs not to be flushed to disk, so we need to do that
+4 −1
Original line number Diff line number Diff line
@@ -1165,7 +1165,10 @@ let SessionStoreInternal = {
   */
  onQuitApplication: function ssi_onQuitApplication(aData) {
    if (aData == "restart") {
      if (!PrivateBrowsingUtils.permanentPrivateBrowsing) {
        this._prefBranch.setBoolPref("sessionstore.resume_session_once", true);
      }

      // The browser:purge-session-history notification fires after the
      // quit-application notification so unregister the
      // browser:purge-session-history notification to prevent clearing
+4 −0
Original line number Diff line number Diff line
@@ -291,6 +291,10 @@ SessionStartup.prototype = {
   * @returns bool
   */
  isAutomaticRestoreEnabled: function () {
    if (PrivateBrowsingUtils.permanentPrivateBrowsing) {
      return false;
    }

    return Services.prefs.getBoolPref("browser.sessionstore.resume_session_once") ||
           Services.prefs.getIntPref("browser.startup.page") == BROWSER_STARTUP_RESUME_SESSION;
  },