mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 784759 - Move database creation out of startup on firstrun. r=mfinkle
This commit is contained in:
parent
8c976f0b41
commit
a152ebf1a6
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user