Load default prefs during initialization
In bug 1413413 Mozilla ripped out support for loading default prefs from extensions. Unfortunately, backing out that changeset is non-trivial so it is easier if we set the default prefs manually. Here we define a function named pref() and it sets the preference based on the type of the pref's value. We only support a few types: boolean, number, and string. All other types are handled by the default case where a message is logged and the pref is skipped. The default prefs must be set before Tor Launcher begins making decisions based on them. An exception is thrown with Cr.NS_ERROR_NOT_INITIALIZED when this requirement is violated.
Showing with 130 additions and 1 deletion