Bug 820135 - Preferences: We don't save prefs when we reboot. r=cjones

This commit is contained in:
Gregor Wagner 2012-12-12 15:41:07 -08:00
parent efe964d8a2
commit 06088ea2ad
2 changed files with 5 additions and 0 deletions

View File

@ -141,6 +141,9 @@ PowerManagerService::Restart()
StartForceQuitWatchdog(eHalShutdownMode_Restart, mWatchdogTimeoutSecs);
// To synchronize any unsaved user data before restarting.
SyncProfile();
#ifdef XP_UNIX
sync();
#endif
_exit(0);
MOZ_NOT_REACHED();
return NS_OK;

View File

@ -14,12 +14,14 @@ namespace hal_impl {
void
Reboot()
{
sync();
reboot(RB_AUTOBOOT);
}
void
PowerOff()
{
sync();
reboot(RB_POWER_OFF);
}