Closed Bug 1016161 Opened 10 years ago Closed 10 years ago

Flush prefs on handling a locale change event

Categories

(Firefox for Android Graveyard :: Locale switching and selection, defect)

32 Branch
All
Android
defect
Not set
normal

Tracking

(firefox32 fixed, firefox33 fixed)

RESOLVED FIXED
Firefox 33
Tracking Status
firefox32 --- fixed
firefox33 --- fixed

People

(Reporter: rnewman, Assigned: rnewman)

References

Details

Attachments

(1 file)

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+
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?
Flags: needinfo?(rnewman)
https://hg.mozilla.org/mozilla-central/rev/f2213f0c8362
Status: ASSIGNED → RESOLVED
Closed: 10 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+
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: