commit 14a8d0148214ac326452e66c03760f598c1cc66c parent 5bd559b895dbc783ec0dda05271191a1d1ed5737 Author: tessa <theidkamp@mozilla.com> Date: Thu, 16 Oct 2025 08:49:13 +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?.());