зеркало из https://github.com/mozilla/gecko-dev.git
Bug 784759 - Move database creation out of startup on firstrun. r=mfinkle
This commit is contained in:
Родитель
53bb913470
Коммит
dd70f1e76a
|
@ -283,8 +283,18 @@ var BrowserApp = {
|
|||
this.restoreSession(false, null);
|
||||
}
|
||||
|
||||
if (updated)
|
||||
this.onAppUpdated();
|
||||
if (updated) {
|
||||
// creating the form history and passwords databases can be expensive
|
||||
// delay it until after the first page has loaded
|
||||
let browser = BrowserApp.selectedTab.browser;
|
||||
let updatedFun = function updatedFun() {
|
||||
browser.removeEventListener("DOMContentLoaded", updatedFun, false);
|
||||
// initialize the form history and passwords databases on upgrades
|
||||
Services.obs.notifyObservers(null, "FormHistory:Init", "");
|
||||
Services.obs.notifyObservers(null, "Passwords:Init", "");
|
||||
}
|
||||
browser.addEventListener("DOMContentLoaded", updatedFun, false);
|
||||
}
|
||||
|
||||
// notify java that gecko has loaded
|
||||
sendMessageToJava({
|
||||
|
@ -487,12 +497,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", "");
|
||||
},
|
||||
|
||||
shutdown: function shutdown() {
|
||||
NativeWindow.uninit();
|
||||
SelectionHandler.uninit();
|
||||
|
|
Загрузка…
Ссылка в новой задаче