Bug 1388145 - Move ContextualIdentityService and SafeBrowsing initialization to _scheduleStartupIdleTasks. r=florian

This has no change in behavior since they are already scheduled with idleDispatchToMainThread, but this puts them in the proper code location

MozReview-Commit-ID: IS5ZQjJy77q

--HG--
extra : rebase_source : 08ee589ee7b88fc78dbd106c6f3f191c5fe2e928
This commit is contained in:
Felipe Gomes 2017-08-09 15:06:30 -03:00
Родитель 781d21edb8
Коммит ad0d65f131
1 изменённых файлов: 9 добавлений и 10 удалений

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

@ -1186,15 +1186,6 @@ BrowserGlue.prototype = {
});
}
// Let's load the contextual identities.
Services.tm.idleDispatchToMainThread(() => {
ContextualIdentityService.load();
});
Services.tm.idleDispatchToMainThread(() => {
SafeBrowsing.init();
}, 5000);
this._sanitizer.onStartup();
E10SAccessibilityCheck.onWindowsRestored();
@ -1233,7 +1224,15 @@ BrowserGlue.prototype = {
* to the other ones scheduled together.
*/
_scheduleStartupIdleTasks() {
// TODO: Functions to be added here with Services.tm.idleDispatchToMainThread
Services.tm.idleDispatchToMainThread(() => {
ContextualIdentityService.load();
});
// It's important that SafeBrowsing is initialized reasonably
// early, so we use a maximum timeout for it.
Services.tm.idleDispatchToMainThread(() => {
SafeBrowsing.init();
}, 5000);
},
/**