Open Bug 1996973 Opened 3 months ago Updated 2 months ago

Don't use NimbusFeatures.urlbar.getAllVariables

Categories

(Firefox :: Address Bar, task, P3)

task

Tracking

()

People

(Reporter: adw, Unassigned)

References

(Blocks 1 open bug)

Details

getAllVariables is dangerous when both a rollout and an experiment are installed because it gets the variable values only from the experiment. If the experiment doesn't set a variable, it gets the variable's value from the variable's pref or default, even if the rollout does set the variable. See bug 1996203 for details.

getVariable first checks the experiment and then the rollout, so it doesn't have that problem. We should replace our use of getAllVariables with getVariable.

We might also want to stop caching Nimbus variables entirely, which may or may not be worth doing at the same time. And in that case, maybe there's no point in accessing Nimbus variables via UrlbarPrefs at all.

This is also a good reason every branch of your experiment should set the same variables, and the rollout too if you're doing one in addition.

You need to log in before you can comment on or make changes to this bug.