2012/5/14 Justin Lebar <
justin...@gmail.com>:
>> Random ideas:
>
> I think most of these are probably solving a problem we don't have.
>
> If we make prefs a big commitment (I promise never to change the
> meaning, I promise to strictly error check, I promise to fix fuzz
> bugs), I'll just hardcode in values that I really should use a pref
> for.
>
> Even for values I intend to be static, using a pref makes it easy to
> deploy different values on desktop/mobile/b2g.
>
> In general, the browser can break if you mess with the prefs enough.
> I don't think this is a problem; we already display a pretty scary
> warning when you open about:config. And add-ons can arbitrarily break
> FF already; keeping them from breaking FF by modifying a pref doesn't
> solve anything.
But in addition to the user messing with prefs, and add-ons messing
with prefs, there is also the case of us platform developers messing
with prefs. I hear you about not making prefs harder for us, but how
about this:
> * report on non-default-value preferences in crash reports, like we
> do in about:support (check possible privacy issues, maybe filter
> prefs)
For example, in Firefox 11 we were within hours of having to delay the
release due to a top-crasher (bug 711656, bug 715401) that was caused
by a preference having changed meaning subtly. If we had had modified
preferences in crash reports, the bug would have been obvious, but
without that, it's mostly due to luck that we identified the problem.
If preference _values_ are too privacy-sensitive, put at least
preference names in public crash reports. Also, many preferences are
not privacy-sensitive at all so maybe add an API to allow specifying
that.
Likewise,
> * delete no-longer-used preferences?
Should not make it harder to use preferences,
> * check for self-conflicting preferences?
Should only be a matter of having to specify which preference
combinations are incompatible,
> * improve prefs API e.g. add enum preferences which would be better
> than plain integer preferences, string preferences, or multiple
> boolean preferences, as we currently use to emulate the missing enum
> preferences, creating many opportunities for corrupted state?
Should be making developers' life easier, not harder, by providing
support for something we currently have to emulate in other ways.
Example of a enum preference emulated as multiple bool preferences:
webgl.disabled and webgl.force-enabled. We've had to answer several
times the question "what if they are both true?". Same for
layers.acceleration, gfx.direct2d, etc.
Example of a enum pref emulated as integer preference: all the
gfx.blacklist.* preferences. If we could have specified a symbolic
constant (stored as a string) instead of a raw numeric value, we
wouldn't have had the above-mentioned bug 711656.
Cheers,
Benoit
>
> So I don't think we should make prefs harder for devs.
>
> However, this
>
>> * do not allow add-ons to change arbitrary preferences. Maybe do not
>> allow them to change real prefs at all, instead maybe just allow them
>> to install an 'overlay' that overrides preference values as long as
>> the add-on is enabled.
>
> would be *incredibly fantastic*.
>
> Unfortunately I think this is harder than it sounds. IIRC we can't
> tell what's add-on code and what's Firefox code when we run chrome JS.
> We certainly can't tell in binary components.
>