Must QI objects returned via nsISupports parameter type. Not part of the default build.

This commit is contained in:
dougt%netscape.com 2003-04-16 00:56:03 +00:00
Родитель 071692477b
Коммит cd6eb76670
1 изменённых файлов: 8 добавлений и 2 удалений

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

@ -180,9 +180,12 @@ NS_IMETHODIMP nsCharsetConverterManager::GetUnicodeEncoder(
#ifdef MOZ_USE_NATIVE_UCONV
if (mNativeUC) {
nsCOMPtr<nsISupports> supports;
mNativeUC->GetNativeConverter("UCS-2",
NS_LossyConvertUCS2toASCII(*aDest).get(),
getter_AddRefs(encoder));
getter_AddRefs(supports));
encoder = do_QueryInterface(supports);
if (encoder) {
NS_ADDREF(*aResult = encoder);
@ -218,9 +221,12 @@ NS_IMETHODIMP nsCharsetConverterManager::GetUnicodeDecoder(
#ifdef MOZ_USE_NATIVE_UCONV
if (mNativeUC) {
nsCOMPtr<nsISupports> supports;
mNativeUC->GetNativeConverter(NS_LossyConvertUCS2toASCII(*aSrc).get(),
"UCS-2",
getter_AddRefs(decoder));
getter_AddRefs(supports));
decoder = do_QueryInterface(supports);
if (decoder) {
NS_ADDREF(*aResult = decoder);