mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 12:20:56 +00:00

The problem here is a race: Even though the user is enrolled in the online scenario via Nimbus, the Nimbus urlbar variables may not be initialized by the time we migrate Suggest preferences on startup. The data-collection pref is set when we [migrate prefs](https://searchfox.org/mozilla-central/rev/df6434d2ebfdf2b5f89f205fc81d60d64a774fe1/browser/components/urlbar/UrlbarPrefs.jsm#872) -- and only there -- so we're not hitting that path like we should be. That's because the scenario can still be the default value of "offline". Fortunately the Nimbus client API gives us a ready promise we can await that is resolved when the feature is loaded and ready, so all we need to do is await it before trying to update the scenario and do migrations. Differential Revision: https://phabricator.services.mozilla.com/D131065