Bug 548582 - FastStartup should save prefs when the final window closes, r=mfinkle

This commit is contained in:
Brian Crowder 2010-04-08 12:19:32 -07:00
parent 42dcecd548
commit 9942f20527

View File

@ -128,8 +128,11 @@ function nsFastStartupObserver() {
} else if (topic == "domwindowclosed") {
if (_browserWindowCount > 0)
_browserWindowCount--;
if (_browserWindowCount == 0)
if (_browserWindowCount == 0) {
scheduleMemoryCleanup();
let prefservice = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefService);
prefservice.savePrefFile(null);
}
} else if (topic == "quit-application-granted") {
stopMemoryCleanup();
_isShuttingDown = true;