commit 1080653f7536de83662b7d2e6a96ef6bd8704342
parent db0a5828bff13ba9aeae4cb1353e1d28c4a09275
Author: Beth Rennie <beth@brennie.ca>
Date: Wed, 8 Oct 2025 13:51:01 +0000
Bug 1993244 - Remove TODOs for bug 1956082 r=nimbus-reviewers,relud
We made unenroll() async in bug 1956080 but that was reverted in bug
1971425 and thus these TODOs are no longer correct nor relevant.
Differential Revision: https://phabricator.services.mozilla.com/D267959
Diffstat:
2 files changed, 0 insertions(+), 21 deletions(-)
diff --git a/toolkit/components/nimbus/lib/ExperimentManager.sys.mjs b/toolkit/components/nimbus/lib/ExperimentManager.sys.mjs
@@ -1563,16 +1563,6 @@ export class ExperimentManager {
};
for (const enrollment of enrollments) {
- // TODO(bug 1956082): This is an async method that we are not awaiting.
- //
- // This function is only ever called inside a nsIPrefObserver callback,
- // which are invoked without `await`. Awaiting here breaks tests in
- // test_ExperimentManager_prefs.js, which assert about the values of prefs
- // *after* we trigger unenrollment.
- //
- // There is no good way to synchronize this behaviour yet to satisfy tests and
- // the only thing that is being deferred are the database writes, which we
- // and our caller don't care about.
this._unenroll(enrollment, UnenrollmentCause.ChangedPref(changedPref));
}
}
diff --git a/toolkit/components/nimbus/lib/PrefFlipsFeature.sys.mjs b/toolkit/components/nimbus/lib/PrefFlipsFeature.sys.mjs
@@ -579,17 +579,6 @@ export class PrefFlipsFeature {
// this pref has to stop tracking it.
for (const slug of entry.slugs) {
this.#prefsBySlug.get(slug).delete(pref);
-
- // TODO(bug 1956082): This is an async method that we are not awaiting.
- //
- // This function is only ever called inside a nsIPrefObserver callback,
- // which are invoked without `await`. Awaiting here breaks tests in
- // test_prefFlips.js, which assert about the values of prefs *after* we
- // trigger unenrollment.
- //
- // There is no good way to synchronize this behaviour yet to satisfy tests and
- // the only thing that is being deferred are the database writes, which we
- // and our caller don't care about.
this.manager.unenroll(slug, cause);
}