Bug 1510700 wait for ContextualIdentityService before updating Discovery cookies r=Gijs

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Shane Caraveo 2018-11-28 19:14:10 +00:00
Родитель 966d9cdd49
Коммит de4efccc84
2 изменённых файлов: 4 добавлений и 7 удалений

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

@ -1579,8 +1579,9 @@ BrowserGlue.prototype = {
* to the other ones scheduled together.
*/
_scheduleStartupIdleTasks() {
Services.tm.idleDispatchToMainThread(() => {
ContextualIdentityService.load();
Services.tm.idleDispatchToMainThread(async () => {
await ContextualIdentityService.load();
Discovery.update();
});
Services.tm.idleDispatchToMainThread(() => {
@ -1672,10 +1673,6 @@ BrowserGlue.prototype = {
LiveBookmarkMigrator.migrate().catch(Cu.reportError);
});
}
Services.tm.idleDispatchToMainThread(() => {
Discovery.update();
});
},
/**

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

@ -147,7 +147,7 @@ _ContextualIdentityService.prototype = {
},
load() {
OS.File.read(this._path).then(bytes => {
return OS.File.read(this._path).then(bytes => {
// If synchronous loading happened in the meantime, exit now.
if (this._dataReady) {
return;