Bug 380857: work around lack of void strings in frozen string API by avoiding the use of nsILoginInfo::Init() (re-enable IE password migration), patch by Justin Dolske <dolske@mozilla.com>, r=me

This commit is contained in:
gavin@gavinsharp.com 2007-05-29 20:00:37 -07:00
Родитель 00b220dd56
Коммит dc24428faa
1 изменённых файлов: 9 добавлений и 7 удалений

Просмотреть файл

@ -858,16 +858,18 @@ nsIEProfileMigrator::MigrateSiteAuthSignons(IPStore* aPStore)
// If not, are they in UTF-8 or the default codepage? (ref. bug 41489)
nsresult rv;
nsCOMPtr<nsILoginInfo> aLogin (do_CreateInstance(NS_LOGININFO_CONTRACTID, &rv));
nsCOMPtr<nsILoginInfo> aLogin (do_CreateInstance(
NS_LOGININFO_CONTRACTID, &rv));
NS_ENSURE_SUCCESS(rv, rv);
// TODO: Need to pass in nulls here, but XPCOM whines. Might be able
// just pass in EmptyString(), and then force a flush to disk and
// reinit, which should correct things in the storage module.
// nsStringAPI doesn't let us create void strings, so we won't
// use Init() here.
aLogin->SetHostname(host);
aLogin->SetHttpRealm(realm);
aLogin->SetUsername(NS_ConvertUTF8toUTF16((char *)data));
aLogin->SetPassword(NS_ConvertUTF8toUTF16((char *)password));
//aLogin->Init(host, nsnull, realm, data, password, nsnull, nsnull);
//pwmgr->AddLogin(aLogin);
pwmgr->AddLogin(aLogin);
}
::CoTaskMemFree(data);
}