Handler service instantiation recurses on fresh profile (bug 403885), patch by florian@mozilla.com, r=dmose, sr=biesi, a=blocking-1.9+

This commit is contained in:
dmose@mozilla.org 2007-12-03 15:47:45 -08:00
Родитель 687f4af4c6
Коммит 900f4d9482
1 изменённых файлов: 11 добавлений и 7 удалений

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

@ -132,16 +132,20 @@ HandlerService.prototype = {
_updateDB: function HS__updateDB() {
// if the default prefs have changed, inject any new default handers
// into the datastore
try {
if (this._datastoreDefaultHandlersVersion <
this._prefsDefaultHandlersVersion) {
// into the datastore
var defaultHandlersVersion = this._datastoreDefaultHandlersVersion;
try {
if (defaultHandlersVersion < this._prefsDefaultHandlersVersion) {
// set the new version first so that if we recurse we don't
// call _injectNewDefaults several times
this._datastoreDefaultHandlersVersion =
this._prefsDefaultHandlersVersion;
this._injectNewDefaults();
this._datastoreDefaultHandlersVersion =
this._prefsDefaultHandlersVersion;
}
} catch (ex) {
// if injecting the defaults failed, life goes on...
// if injecting the defaults failed, set the version back to the
// previous value
this._datastoreDefaultHandlersVersion = defaultHandlersVersion;
}
},