Just in case Gecko doesn't. We should add Services.prefs.savePrefFile(null); to browser.js, around line 1637.
Assignee: nobody → rnewman
Status: NEW → ASSIGNED
Comment on attachment 8437418 [details] [diff] [review] Flush prefs on handling a locale change event. v1 If we need to, we need to. Looks like we need to. But keep bug 683808 in mind.
This is only called when you actively select a new locale, so it shouldn't affect any fast paths. We want this to be as close to a synchronous persistent prefs write as possible, because we only tell Gecko the new locale once. I've seen rapid hard quits on a low-end device lose the 'written' pref, which is a bad experience -- you have to switch locales again to get the change to stick.
Attachment #8437418 - Flags: review?(mark.finkle) → review+
status-firefox32: --- → affected
status-firefox33: --- → fixed
Comment on attachment 8437418 [details] [diff] [review] Flush prefs on handling a locale change event. v1 [Approval Request Comment] Bug caused by (feature/regressing bug #): Robustness improvement for Bug 917480. User impact if declined: Certain edge cases (e.g., OOM shortly after changing locale) can result in mixed locales between Gecko and Java. Testing completed (on m-c, etc.): Tested locally, landed and waiting for screams. Risk to taking this patch (and alternatives if risky): Approximately zero. Flushing the prefs file might cause stalls, but this is a very infrequent user action. String or IDL/UUID changes made by this patch: None.
Attachment #8437418 - Flags: approval-mozilla-aurora?
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 33
Comment on attachment 8437418 [details] [diff] [review] Flush prefs on handling a locale change event. v1 Aurora approval granted.
Attachment #8437418 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
status-firefox32: affected → fixed
You need to log in before you can comment on or make changes to this bug.