Bug 1829396 - make Password#Create async r=credential-management-reviewers,dimi

Differential Revision: https://phabricator.services.mozilla.com/D177742
This commit is contained in:
Johannes J. Schmidt 2023-05-11 13:10:15 +00:00
parent 08cd288d9b
commit bd53351804

View File

@ -89,7 +89,7 @@ Password.prototype = {
*
* @return the new login guid
*/
Create() {
async Create() {
let login = new nsLoginInfo(
this.props.hostname,
this.props.submitURL,
@ -99,8 +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);
await Services.logins.addLoginAsync(login);
login.QueryInterface(Ci.nsILoginMetaInfo);
return login.guid;
},