Comment 3 for bug 548866

Revision history for this message
In , Timeless-bemail (timeless-bemail) wrote :

so, this will fail for this case:

system: pref = 1
ext_a1: pref = 2

user: pref = 1

user upgrades and ext_a1 is incompatible w/ firefox

system: pref = 1
user: pref = 1

user quits.

pref is lost.

later, user runs the browser and installs ext_a2 (upgraded extension ext_a version 2, which is compatible w/ the upgrade) and gets:
ext_a2: pref = 2

I think to handle this case, you'd need to scan All extensions, enabled and disabled. for any pref which exists in multiple locations set a flag "don't wipe". and when you quit, only wipe prefs if they aren't tagged "don't wipe".

it's probably also ok to maintain a file in the profile dir listing prefs which shouldn't be wiped, they can use the same logic, it should be append only, that'd save you the trouble of scanning disabled things.