mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
Bug 1824112 - switch to addLoginAsync
r=credential-management-reviewers,sgalich,sync-reviewers,markh
Differential Revision: https://phabricator.services.mozilla.com/D175666
This commit is contained in:
parent
f327741028
commit
d47a190db0
@ -562,7 +562,7 @@ LoginManagerStorage.prototype = {
|
||||
if (existingLogins.length) {
|
||||
Services.logins.modifyLogin(existingLogins[0], login);
|
||||
} else {
|
||||
Services.logins.addLogin(login);
|
||||
await Services.logins.addLoginAsync(login);
|
||||
}
|
||||
log.trace("finished write of user data to the login manager");
|
||||
} catch (ex) {
|
||||
|
@ -346,7 +346,7 @@ PasswordStore.prototype = {
|
||||
"formSubmitURL: " +
|
||||
JSON.stringify(login.formActionOrigin)
|
||||
);
|
||||
Services.logins.addLogin(login);
|
||||
await Services.logins.addLoginAsync(login);
|
||||
},
|
||||
|
||||
async remove(record) {
|
||||
|
@ -99,6 +99,7 @@ Password.prototype = {
|
||||
this.props.usernameField,
|
||||
this.props.passwordField
|
||||
);
|
||||
// TODO: use `addLoginAsync` instead, see https://bugzilla.mozilla.org/show_bug.cgi?id=1829396
|
||||
Services.logins.addLogin(login);
|
||||
login.QueryInterface(Ci.nsILoginMetaInfo);
|
||||
return login.guid;
|
||||
|
@ -1414,7 +1414,9 @@ export class LoginManagerParent extends JSWindowActorParent {
|
||||
existingLogin.password = formLogin.password;
|
||||
} else if (!autoSavedLogin) {
|
||||
lazy.log("Auto-saving new login with empty username.");
|
||||
existingLogin = Services.logins.addLogin(formLoginWithoutUsername);
|
||||
existingLogin = await Services.logins.addLoginAsync(
|
||||
formLoginWithoutUsername
|
||||
);
|
||||
// Remember the GUID where we saved the generated password so we can update
|
||||
// the login if the user later edits the generated password.
|
||||
generatedPW.storageGUID = existingLogin.guid;
|
||||
|
Loading…
Reference in New Issue
Block a user