diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index c02671d911ef..e552225b4a81 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -244,8 +244,8 @@ pref("browser.aboutHomeSnippets.updateUrl", "http://snippets.mozilla.com/%STARTP pref("browser.enable_automatic_image_resizing", true); pref("browser.chrome.site_icons", true); pref("browser.chrome.favicons", true); -pref("browser.warnOnQuit", true); -pref("browser.warnOnRestart", true); +pref("browser.warnOnQuit", false); +pref("browser.warnOnRestart", false); pref("browser.fullscreen.autohide", true); pref("browser.fullscreen.animateUp", 1); diff --git a/browser/components/sessionstore/src/nsSessionStore.js b/browser/components/sessionstore/src/nsSessionStore.js index 0e96fb472537..87b8a332f1d2 100644 --- a/browser/components/sessionstore/src/nsSessionStore.js +++ b/browser/components/sessionstore/src/nsSessionStore.js @@ -769,41 +769,36 @@ SessionStoreService.prototype = { if (closedWindowState) { let newWindowState; -#ifndef XP_MACOSX - if (!this._doResumeSession()) { -#endif - // We want to split the window up into pinned tabs and unpinned tabs. - // Pinned tabs should be restored. If there are any remaining tabs, - // they should be added back to _closedWindows. - // We'll cheat a little bit and reuse _prepDataForDeferredRestore - // even though it wasn't built exactly for this. - let [appTabsState, normalTabsState] = - this._prepDataForDeferredRestore(JSON.stringify({ windows: [closedWindowState] })); +#ifdef XP_MACOSX + // We want to split the window up into pinned tabs and unpinned tabs. + // Pinned tabs should be restored. If there are any remaining tabs, + // they should be added back to _closedWindows. + // We'll cheat a little bit and reuse _prepDataForDeferredRestore + // even though it wasn't built exactly for this. + let [appTabsState, normalTabsState] = + this._prepDataForDeferredRestore(JSON.stringify({ windows: [closedWindowState] })); - // These are our pinned tabs, which we should restore - if (appTabsState.windows.length) { - newWindowState = appTabsState.windows[0]; - delete newWindowState.__lastSessionWindowID; - } - - // In case there were no unpinned tabs, remove the window from _closedWindows - if (!normalTabsState.windows.length) { - this._closedWindows.splice(closedWindowIndex, 1); - } - // Or update _closedWindows with the modified state - else { - delete normalTabsState.windows[0].__lastSessionWindowID; - this._closedWindows[closedWindowIndex] = normalTabsState.windows[0]; - } -#ifndef XP_MACOSX + // These are our pinned tabs, which we should restore + if (appTabsState.windows.length) { + newWindowState = appTabsState.windows[0]; + delete newWindowState.__lastSessionWindowID; } - else { - // If we're just restoring the window, make sure it gets removed from - // _closedWindows. + + // In case there were no unpinned tabs, remove the window from _closedWindows + if (!normalTabsState.windows.length) { this._closedWindows.splice(closedWindowIndex, 1); - newWindowState = closedWindowState; - delete newWindowState.hidden; } + // Or update _closedWindows with the modified state + else { + delete normalTabsState.windows[0].__lastSessionWindowID; + this._closedWindows[closedWindowIndex] = normalTabsState.windows[0]; + } +#else + // If we're just restoring the window, make sure it gets removed from + // _closedWindows. + this._closedWindows.splice(closedWindowIndex, 1); + newWindowState = closedWindowState; + delete newWindowState.hidden; #endif if (newWindowState) { // Ensure that the window state isn't hidden