*pwd = password.ToNewUnicode();
*pwd = ToNewUnicode(password);
SINGSIGN_PromptPassword    (const PRUnichar *dialogTitle, const PRUnichar *text, PRUnichar **pwd, const char *passwordRealm,     nsIPrompt* dialog, PRBool *pressedOK, PRUint32 savePassword) {  nsresult res;  nsAutoString password, username;  /* do only the dialog if signon preference is not enabled */  if (!si_GetSignonRememberingPref()){    return si_DoDialogIfPrefIsOff(dialogTitle,                                  text,                                  nsnull,                                  pwd,                                  nsnull,                                  nsnull,                                  passwordRealm,                                  dialog,                                  pressedOK,                                   savePassword,                                  promptPassword);  }  /* get previous password used with this username, pick first user if no username found */  si_RestoreOldSignonDataFromBrowser(dialog, passwordRealm, (username.Length() == 0), username, password);  /* return if a password was found */  if (password.Length() != 0) {    *pwd = password.ToNewUnicode();    *pressedOK = PR_TRUE;    return NS_OK;  }  /* no password found, get new password from user */  *pwd = password.ToNewUnicode();  PRBool checked = PR_FALSE;  res = si_CheckGetPassword(pwd, dialogTitle, text, dialog, savePassword, &checked);  if (NS_FAILED(res)) {    /* user pressed Cancel */    PR_FREEIF(*pwd);    *pressedOK = PR_FALSE;    return NS_OK;  }  if (checked) {    Wallet_GiveCaveat(nsnull, dialog);    si_RememberSignonDataFromBrowser(passwordRealm, username, nsAutoString(*pwd));  }  /* cleanup and return */  *pressedOK = PR_TRUE;  return NS_OK;}