зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
687f4af4c6
Коммит
900f4d9482
|
@ -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;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче