commit 10d6224cb3a0244b18e6dc4aba47250089d0179d parent 824e154bcf2b2198d86c863673eaf26ccbb10d54 Author: tessa <theidkamp@mozilla.com> Date: Thu, 16 Oct 2025 17:11:36 +0000 Bug 1993499 - Fix migration for profile change by restructuring rust store and mirror inits. r=credential-management-reviewers,dimi Differential Revision: https://phabricator.services.mozilla.com/D268566 Diffstat:
| M | toolkit/components/passwordmgr/storage-desktop.sys.mjs | | | 14 | ++++++-------- |
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/toolkit/components/passwordmgr/storage-desktop.sys.mjs b/toolkit/components/passwordmgr/storage-desktop.sys.mjs @@ -24,14 +24,12 @@ export class LoginManagerStorage extends LoginManagerStorage_json { this.#jsonStorage = new LoginManagerStorage_json(); this.#rustStorage = new LoginManagerRustStorage(); - new LoginManagerRustMirror(this.#jsonStorage, this.#rustStorage); - - this.#initializationPromise = new Promise(resolve => - this.#jsonStorage - .initialize() - .then(() => this.#rustStorage.initialize()) - .then(resolve) - ); + this.#initializationPromise = this.#jsonStorage + .initialize() + .then(() => this.#rustStorage.initialize()) + .then(() => { + new LoginManagerRustMirror(this.#jsonStorage, this.#rustStorage); + }); } this.#initializationPromise.then(() => callback?.());