Bug 1551657 part 5. Stop using [array] in promptToChangePasswordWithUsernames. r=MattN

Differential Revision: https://phabricator.services.mozilla.com/D31121

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Boris Zbarsky 2019-05-14 19:33:21 +00:00
parent d0161062da
commit fe64901ac4
4 changed files with 5 additions and 13 deletions

View File

@ -263,10 +263,8 @@ LoginManagerPrompter.prototype = {
* Note: The caller doesn't know the username for aNewLogin, so this
* function fills in .username and .usernameField with the values
* from the login selected by the user.
*
* Note; XPCOM stupidity: |count| is just |logins.length|.
*/
promptToChangePasswordWithUsernames: function(logins, count, aNewLogin) {
promptToChangePasswordWithUsernames: function(logins, aNewLogin) {
var usernames = logins.map(l => l.username);
var dialogText = this._getLocalizedString("userSelectText2");
var dialogTitle = this._getLocalizedString("passwordChangeTitle");

View File

@ -394,8 +394,7 @@ var LoginManagerParent = {
// but since we don't have the username, we don't know if the user is
// changing a second account to the new password so we ask anyways.
prompter.promptToChangePasswordWithUsernames(
logins, logins.length, formLogin);
prompter.promptToChangePasswordWithUsernames(logins, formLogin);
}
return;

View File

@ -1256,11 +1256,9 @@ LoginManagerPrompter.prototype = {
* Note: The caller doesn't know the username for aNewLogin, so this
* function fills in .username and .usernameField with the values
* from the login selected by the user.
*
* Note; XPCOM stupidity: |count| is just |logins.length|.
*/
promptToChangePasswordWithUsernames(logins, count, aNewLogin) {
this.log("promptToChangePasswordWithUsernames with count:", count);
promptToChangePasswordWithUsernames(logins, aNewLogin) {
this.log("promptToChangePasswordWithUsernames with count:", logins.length);
var usernames = logins.map(l => l.username || this._getLocalizedString("noUsername"));
var dialogText = this._getLocalizedString("userSelectText2");

View File

@ -79,8 +79,6 @@ interface nsILoginManagerPrompter : nsISupports {
*
* @param logins
* An array of existing logins.
* @param count
* (length of the array)
* @param aNewLogin
* The new login.
*
@ -90,8 +88,7 @@ interface nsILoginManagerPrompter : nsISupports {
* is called.
*/
void promptToChangePasswordWithUsernames(
[array, size_is(count)] in nsILoginInfo logins,
in uint32_t count,
in Array<nsILoginInfo> logins,
in nsILoginInfo aNewLogin);
};
%{C++