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 = {
562
562
if ( existingLogins . length ) {
563
563
Services . logins . modifyLogin ( existingLogins [ 0 ] , login ) ;
564
564
} else {
565
- Services . logins . addLogin ( login ) ;
565
+ await Services . logins . addLoginAsync ( login ) ;
566
566
}
567
567
log . trace ( "finished write of user data to the login manager" ) ;
568
568
} catch ( ex ) {
Original file line number Diff line number Diff line change @@ -346,7 +346,7 @@ PasswordStore.prototype = {
346
346
"formSubmitURL: " +
347
347
JSON . stringify ( login . formActionOrigin )
348
348
) ;
349
- Services . logins . addLogin ( login ) ;
349
+ await Services . logins . addLoginAsync ( login ) ;
350
350
} ,
351
351
352
352
async remove ( record ) {
Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ Password.prototype = {
99
99
this . props . usernameField ,
100
100
this . props . passwordField
101
101
) ;
102
+ // TODO: use `addLoginAsync` instead, see https://bugzilla.mozilla.org/show_bug.cgi?id=1829396
102
103
Services . logins . addLogin ( login ) ;
103
104
login . QueryInterface ( Ci . nsILoginMetaInfo ) ;
104
105
return login . guid ;
Original file line number Diff line number Diff line change @@ -1414,7 +1414,9 @@ export class LoginManagerParent extends JSWindowActorParent {
1414
1414
existingLogin . password = formLogin . password ;
1415
1415
} else if ( ! autoSavedLogin ) {
1416
1416
lazy . log ( "Auto-saving new login with empty username." ) ;
1417
- existingLogin = Services . logins . addLogin ( formLoginWithoutUsername ) ;
1417
+ existingLogin = await Services . logins . addLoginAsync (
1418
+ formLoginWithoutUsername
1419
+ ) ;
1418
1420
// Remember the GUID where we saved the generated password so we can update
1419
1421
// the login if the user later edits the generated password.
1420
1422
generatedPW . storageGUID = existingLogin . guid ;
You can’t perform that action at this time.
0 commit comments