From 498ce0f2fa927791d29589f46be0d0c2e578ce4e Mon Sep 17 00:00:00 2001 From: Gregor Wagner Date: Tue, 11 Dec 2012 22:39:25 -0800 Subject: [PATCH] Bug 820135 - Preferences: We don't save prefs when we reboot. r=cjones --- dom/power/PowerManagerService.cpp | 1 + hal/linux/LinuxPower.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/dom/power/PowerManagerService.cpp b/dom/power/PowerManagerService.cpp index cd40e72f5601..d6ab7d93b121 100644 --- a/dom/power/PowerManagerService.cpp +++ b/dom/power/PowerManagerService.cpp @@ -141,6 +141,7 @@ PowerManagerService::Restart() StartForceQuitWatchdog(eHalShutdownMode_Restart, mWatchdogTimeoutSecs); // To synchronize any unsaved user data before restarting. SyncProfile(); + sync(); _exit(0); MOZ_NOT_REACHED(); return NS_OK; diff --git a/hal/linux/LinuxPower.cpp b/hal/linux/LinuxPower.cpp index bee12d6e5be3..dadb7e73af7d 100644 --- a/hal/linux/LinuxPower.cpp +++ b/hal/linux/LinuxPower.cpp @@ -14,12 +14,14 @@ namespace hal_impl { void Reboot() { + sync(); reboot(RB_AUTOBOOT); } void PowerOff() { + sync(); reboot(RB_POWER_OFF); }