Bug 507623 - initializeSanitizer() can fail because "gPrefService.getBranch is not a function". r=gavin

This commit is contained in:
Dão Gottwald 2009-09-09 23:13:06 +02:00
Родитель b0b5174739
Коммит c4784a209b
1 изменённых файлов: 4 добавлений и 3 удалений

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

@ -115,8 +115,9 @@ var gEditUIVisible = true;
__defineGetter__("gPrefService", function() {
delete this.gPrefService;
return this.gPrefService = Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefBranch2);
return this.gPrefService = Cc["@mozilla.org/preferences-service;1"]
.getService(Ci.nsIPrefBranch2)
.QueryInterface(Ci.nsIPrefService);
});
__defineGetter__("PluralForm", function() {
@ -1526,7 +1527,7 @@ function initializeSanitizer()
gPrefService.clearUserPref(kDidSanitizeDomain);
// We need to persist this preference change, since we want to
// check it at next app start even if the browser exits abruptly
gPrefService.QueryInterface(Ci.nsIPrefService).savePrefFile(null);
gPrefService.savePrefFile(null);
}
/**