HomePhabricator Dev

Bug 1502410 - Don't use deleteBranch in Normandy. r=Gijs,adw, a=ritu

Description

Bug 1502410 - Don't use deleteBranch in Normandy. r=Gijs,adw, a=ritu

nsIPrefBranch.deleteBranch doesn't work as documented when the preference's
default value was set very early after Firefox has started, such as when
Normandy sets startup branches. This is filed as bug 1505941. In order to work
around this problem, this patch makes Normandy never use deleteBranch, except
in tests where it is safe to do so.

With this patch, an experiment that is run on the default branch for a
preference that does not have a default value in the tree cannot be promptly
unenrolled, instead we must wait until the preference is naturally cleared when
Firefox restarts. This is better than never unenrolling though.

Differential Revision: https://phabricator.services.mozilla.com/D11383