Closed
Bug 323237
Opened 19 years ago
Closed 18 years ago
Preferences are lost if Mozilla/Firefox crashes
Categories
(Other Applications :: ChatZilla, defect)
Other Applications
ChatZilla
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bugzilla-mozilla-20000923, Assigned: bugzilla-mozilla-20000923)
Details
(Keywords: regression, Whiteboard: [cz-0.9.71])
Attachments
(2 files)
10.44 KB,
patch
|
samuel
:
review+
|
Details | Diff | Splinter Review |
4.27 KB,
patch
|
Details | Diff | Splinter Review |
After bug 304350, we removed the forced-save of the preferences file from ChatZilla. This is fine, *if* the Mozilla pref system actually did its job and saved the prefs before quit time! So, the plan is to put the forced-save back, but a bit differently. The other bug was having issues because the (supposedly unfailing) call was, well, failing, and breaking stuff. The way I want to do it here is with two differences from the original code: - Wrap the code that forces the save in a try/catch and relegate any errors to dd(), i.e. ignore them, as there is nothing we can do about them anyway. - Delay the save to be a short while (maybe 10s?) after the preference has actually been changed. I'm not sure if the timer should be reset when another preference is changed, as that would leave the potential for it never saving, but the save must not be done inline with the change. This will keep the fast performance we have currently.
Comment 1•19 years ago
|
||
How 'bout reset the timer, or set it to like four seconds, but force it to save the preferences no matter what after, say, thirty seconds?
Assignee | ||
Updated•18 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•18 years ago
|
||
This delays all saves by 5s, and will keep delaying each time a pref changes, up to a max delay of 20s (15s max for resetting, plus 5s actual timer).
Attachment #212344 -
Flags: review?(samuel)
Assignee | ||
Comment 3•18 years ago
|
||
This is the same patch, but using diff -w to make it clearer.
Comment 4•18 years ago
|
||
Comment on attachment 212344 [details] [diff] [review] Full patch for pref-manager >+ * this much already, or we could put off a save indefinately. "indefinitely"
Attachment #212344 -
Flags: review?(samuel) → review+
Assignee | ||
Comment 5•18 years ago
|
||
checked in --> FIXED.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•18 years ago
|
Whiteboard: [cz-0.9.71]
You need to log in
before you can comment on or make changes to this bug.
Description
•