Skip to content

Commit

Permalink
Bug 1800099: Properly block Normandy startup until after the UI has s…
Browse files Browse the repository at this point in the history
…hown. r=barret

Differential Revision: https://phabricator.services.mozilla.com/D161807
  • Loading branch information
Mossop committed Nov 22, 2022
1 parent 416bdf0 commit 2d6a0ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion toolkit/components/normandy/Normandy.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ var Normandy = {
// Wait for the UI to be ready, or time out after 5 minutes.
if (runAsync) {
await Promise.race([
this.uiAvailableNotificationObserved,
this.uiAvailableNotificationObserved.promise,
new Promise(resolve => setTimeout(resolve, 5 * 60 * 1000)),
]);
}
Expand Down
2 changes: 1 addition & 1 deletion toolkit/components/normandy/test/unit/test_Normandy.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ decorate_task(
);
Assert.equal(Services.prefs.getCharPref(rolloutPref, "default"), "default");

let initPromise = Normandy.init();
let initPromise = Normandy.init({ runAsync: false });

// note: There are no awaits before these asserts, so only the part of
// Normandy's initialization before its first await can run.
Expand Down

0 comments on commit 2d6a0ff

Please sign in to comment.