Bug 497482: flush 'save session' pref explicitly when shutting down, since some ways of shutting down on mac cause us to avoid saving prefs, r=mconnor

This commit is contained in:
Gavin Sharp 2009-06-11 16:17:33 -04:00
Родитель a282e85375
Коммит 7c46e2f858
1 изменённых файлов: 5 добавлений и 0 удалений

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

@ -109,6 +109,11 @@ BrowserGlue.prototype = {
_setPrefToSaveSession: function()
{
this._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
// explicitly here. See bug 497652.
this._prefs.QueryInterface(Ci.nsIPrefService).savePrefFile(null);
},
// nsIObserver implementation