commit 3ed3ad9158e3990ffa74c2ed8357e1b4da33fd52
parent 2d3ba50b466bbe66fa78f7aae746d5cadbf152fd
Author: Beth Rennie <beth@brennie.ca>
Date: Wed, 1 Oct 2025 17:31:13 +0000
Bug 1986477 - Remove blocker from the ProfilesDatastoreService correctly in NimbusEnrollments r=nimbus-reviewers,relud
We were accidentally removing the blocker from the Sqlite module
instead, which has no effect. Thankfully leaving the blocker on the
ProfilesDatstoreService is fine in normal operation.
Differential Revision: https://phabricator.services.mozilla.com/D264292
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/toolkit/components/nimbus/lib/Enrollments.sys.mjs b/toolkit/components/nimbus/lib/Enrollments.sys.mjs
@@ -13,7 +13,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
ExperimentAPI: "resource://nimbus/ExperimentAPI.sys.mjs",
ProfilesDatastoreService:
"moz-src:///toolkit/profile/ProfilesDatastoreService.sys.mjs",
- Sqlite: "resource://gre/modules/Sqlite.sys.mjs",
});
ChromeUtils.defineLazyGetter(lazy, "log", () => {
@@ -70,7 +69,8 @@ export class NimbusEnrollments {
#flushTask;
/**
- * Our shutdown blocker that will
+ * Our shutdown blocker that will ensure we flush pending writes before the
+ * ProfilesDatastoreService closes its database connection.
*
* @type {(function(): void) | null}
*/
@@ -415,7 +415,7 @@ export class NimbusEnrollments {
this.#finalized = true;
await this.#flushTask.finalize();
- lazy.Sqlite.shutdown.removeBlocker(this.#shutdownBlocker);
+ lazy.ProfilesDatastoreService.shutdown.removeBlocker(this.#shutdownBlocker);
this.#shutdownBlocker = null;
}