зеркало из https://github.com/mozilla/gecko-dev.git
Bug 784759 - Delay database creation on startup. r=mfinkle
This commit is contained in:
Родитель
e741592938
Коммит
55a8fa5b83
|
@ -441,6 +441,8 @@ var BrowserApp = {
|
|||
event.initEvent("UIReady", true, false);
|
||||
window.dispatchEvent(event);
|
||||
|
||||
Services.obs.addObserver(this, "browser-delayed-startup-finished", false);
|
||||
|
||||
if (this._startupStatus)
|
||||
this.onAppUpdated();
|
||||
|
||||
|
@ -710,10 +712,6 @@ var BrowserApp = {
|
|||
},
|
||||
|
||||
onAppUpdated: function() {
|
||||
// initialize the form history and passwords databases on upgrades
|
||||
Services.obs.notifyObservers(null, "FormHistory:Init", "");
|
||||
Services.obs.notifyObservers(null, "Passwords:Init", "");
|
||||
|
||||
// Migrate user-set "plugins.click_to_play" pref. See bug 884694.
|
||||
// Because the default value is true, a user-set pref means that the pref was set to false.
|
||||
if (Services.prefs.prefHasUserValue("plugins.click_to_play")) {
|
||||
|
@ -1630,6 +1628,10 @@ var BrowserApp = {
|
|||
Services.prefs.setCharPref("general.useragent.locale", aData);
|
||||
break;
|
||||
|
||||
case "browser-delayed-startup-finished":
|
||||
this._delayedStartup();
|
||||
break;
|
||||
|
||||
default:
|
||||
dump('BrowserApp.observe: unexpected topic "' + aTopic + '"\n');
|
||||
break;
|
||||
|
@ -1637,6 +1639,14 @@ var BrowserApp = {
|
|||
}
|
||||
},
|
||||
|
||||
_delayedStartup: function() {
|
||||
// initialize the form history and passwords databases on upgrades
|
||||
if (this._startupStatus) {
|
||||
Services.obs.notifyObservers(null, "FormHistory:Init", "");
|
||||
Services.obs.notifyObservers(null, "Passwords:Init", "");
|
||||
}
|
||||
},
|
||||
|
||||
get defaultBrowserWidth() {
|
||||
delete this.defaultBrowserWidth;
|
||||
let width = Services.prefs.getIntPref("browser.viewport.desktopWidth");
|
||||
|
|
Загрузка…
Ссылка в новой задаче