Bug 1458375 - Add browser-idle-startup-tasks-finished notification to Fennec. r?snorp
MozReview-Commit-ID: CDEMUCL8ykG
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -549,16 +549,22 @@ var BrowserApp = {
});
InitLater(() => LightWeightThemeWebInstaller.init());
InitLater(() => CastingApps.init(), window, "CastingApps");
// Bug 778855 - Perf regression if we do this here. To be addressed in bug 779008.
InitLater(() => SafeBrowsing.init(), window, "SafeBrowsing");
+ // This should always go last, since the idle tasks (except for the ones with
+ // timeouts) should execute in order. Note that this observer notification is
+ // not guaranteed to fire, since the window could close before we get here.
+ InitLater(() => {
+ Services.obs.notifyObservers(window, "browser-idle-startup-tasks-finished");
+ });
}, {once: true});
},
get _startupStatus() {
delete this._startupStatus;
let savedMilestone = Services.prefs.getCharPref("browser.startup.homepage_override.mstone", "");
let ourMilestone = AppConstants.MOZ_APP_VERSION;