fix for #30204. use GetService instead of CreateInstance.

This commit is contained in:
sspitzer%netscape.com 2000-03-17 08:31:13 +00:00
Родитель f3b710c84b
Коммит 9e419e7b13
1 изменённых файлов: 2 добавлений и 4 удалений

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

@ -2159,10 +2159,8 @@ nsPrefConverter::GetPlatformCharset(nsAutoString& aCharset)
nsresult rv;
// we may cache it since the platform charset will not change through application life
nsCOMPtr <nsIPlatformCharset> platformCharset;
rv = nsComponentManager::CreateInstance(NS_PLATFORMCHARSET_PROGID, nsnull,
NS_GET_IID(nsIPlatformCharset), getter_AddRefs(platformCharset));
if (NS_SUCCEEDED(rv)) {
nsCOMPtr <nsIPlatformCharset> platformCharset = do_GetService(NS_PLATFORMCHARSET_PROGID, &rv);
if (NS_SUCCEEDED(rv) && platformCharset) {
rv = platformCharset->GetCharset(kPlatformCharsetSel_FileName, aCharset);
}
if (NS_FAILED(rv)) {