Bug 1571472 - use idle dispatch to start up corroborator r=bdanforth

Differential Revision: https://phabricator.services.mozilla.com/D41693

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Robert Helmer 2019-08-20 00:48:41 +00:00
Родитель 0b0731ec85
Коммит b56ad07c90
1 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -1985,10 +1985,6 @@ BrowserGlue.prototype = {
this._monitorScreenshotsPref();
this._monitorWebcompatReporterPref();
if (Services.prefs.getBoolPref("corroborator.enabled", true)) {
Corroborate.init().catch(Cu.reportError);
}
let pService = Cc["@mozilla.org/toolkit/profile-service;1"].getService(
Ci.nsIToolkitProfileService
);
@ -2141,6 +2137,12 @@ BrowserGlue.prototype = {
TabUnloader.init();
});
Services.tm.idleDispatchToMainThread(() => {
if (Services.prefs.getBoolPref("corroborator.enabled", false)) {
Corroborate.init().catch(Cu.reportError);
}
});
// Marionette needs to be initialized as very last step
Services.tm.idleDispatchToMainThread(() => {
Services.obs.notifyObservers(null, "marionette-startup-requested");