mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1017941 - Initialize loop during delayedStartup() to avoid observer leaks. r=Unfocused
This commit is contained in:
parent
ea400da715
commit
365f799d7d
@ -57,20 +57,12 @@ XPCOMUtils.defineLazyModuleGetter(this, "MozLoopService", "resource:///modules/l
|
||||
},
|
||||
|
||||
/**
|
||||
* Triggers the initialization of the loop service after startup has finished.
|
||||
* Triggers the initialization of the loop service. Called by
|
||||
* delayedStartup.
|
||||
*/
|
||||
initialize: function() {
|
||||
var observer = function observer(sbject, topic, data) {
|
||||
if (topic == "browser-delayed-startup-finished") {
|
||||
Services.obs.removeObserver(observer, "browser-delayed-startup-finished");
|
||||
MozLoopService.initialize();
|
||||
}
|
||||
};
|
||||
Services.obs.addObserver(observer,
|
||||
"browser-delayed-startup-finished", false);
|
||||
}
|
||||
MozLoopService.initialize();
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
LoopUI.initialize();
|
||||
})();
|
||||
|
@ -1185,6 +1185,10 @@ var gBrowserInit = {
|
||||
gDataNotificationInfoBar.init();
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_LOOP
|
||||
LoopUI.initialize();
|
||||
#endif
|
||||
|
||||
gBrowserThumbnails.init();
|
||||
|
||||
// Add Devtools menuitems and listeners
|
||||
|
Loading…
Reference in New Issue
Block a user