File tree Expand file tree Collapse file tree 4 files changed +6
-3
lines changed
tps/extensions/tps/resource/modules
toolkit/components/passwordmgr Expand file tree Collapse file tree 4 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -562,7 +562,7 @@ LoginManagerStorage.prototype = {
562562 if ( existingLogins . length ) {
563563 Services . logins . modifyLogin ( existingLogins [ 0 ] , login ) ;
564564 } else {
565- Services . logins . addLogin ( login ) ;
565+ await Services . logins . addLoginAsync ( login ) ;
566566 }
567567 log . trace ( "finished write of user data to the login manager" ) ;
568568 } catch ( ex ) {
Original file line number Diff line number Diff line change @@ -346,7 +346,7 @@ PasswordStore.prototype = {
346346 "formSubmitURL: " +
347347 JSON . stringify ( login . formActionOrigin )
348348 ) ;
349- Services . logins . addLogin ( login ) ;
349+ await Services . logins . addLoginAsync ( login ) ;
350350 } ,
351351
352352 async remove ( record ) {
Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ Password.prototype = {
9999 this . props . usernameField ,
100100 this . props . passwordField
101101 ) ;
102+ // TODO: use `addLoginAsync` instead, see https://bugzilla.mozilla.org/show_bug.cgi?id=1829396
102103 Services . logins . addLogin ( login ) ;
103104 login . QueryInterface ( Ci . nsILoginMetaInfo ) ;
104105 return login . guid ;
Original file line number Diff line number Diff line change @@ -1414,7 +1414,9 @@ export class LoginManagerParent extends JSWindowActorParent {
14141414 existingLogin . password = formLogin . password ;
14151415 } else if ( ! autoSavedLogin ) {
14161416 lazy . log ( "Auto-saving new login with empty username." ) ;
1417- existingLogin = Services . logins . addLogin ( formLoginWithoutUsername ) ;
1417+ existingLogin = await Services . logins . addLoginAsync (
1418+ formLoginWithoutUsername
1419+ ) ;
14181420 // Remember the GUID where we saved the generated password so we can update
14191421 // the login if the user later edits the generated password.
14201422 generatedPW . storageGUID = existingLogin . guid ;
You can’t perform that action at this time.
0 commit comments