Bug 1464405 - Register FormAutofill resource URIs before checking if the feature should be enabled. r=MattN

MozReview-Commit-ID: JU93hA0NBgL

--HG--
extra : rebase_source : dca1bef47e7e8dfcf5d059be667020e7bac83033
This commit is contained in:
Mike Conley 2018-05-28 09:50:21 -07:00
Родитель c9d6056854
Коммит 777a5d84f8
1 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -76,6 +76,12 @@ function isAvailable() {
}
function startup(data) {
// We have to do this before actually determining if we're enabled, since
// there are scripts inside of the core browser code that depend on the
// FormAutofill JSMs being registered.
resProto.setSubstitution(RESOURCE_HOST,
Services.io.newURI("chrome/res/", null, data.resourceURI));
if (!isAvailable()) {
Services.prefs.clearUserPref("dom.forms.autocomplete.formautofill");
// reset the sync related prefs incase the feature was previously available
@ -86,9 +92,6 @@ function startup(data) {
return;
}
resProto.setSubstitution(RESOURCE_HOST,
Services.io.newURI("chrome/res/", null, data.resourceURI));
if (data.hasOwnProperty("instanceID") && data.instanceID) {
if (AddonManagerPrivate.isDBLoaded()) {
addUpgradeListener(data.instanceID);