mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-22 18:32:00 +00:00
fix for #30204. use GetService instead of CreateInstance.
This commit is contained in:
parent
f3b710c84b
commit
9e419e7b13
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user