Index: mozilla/intl/uconv/native/nsNativeUConvService.cpp =================================================================== RCS file: /cvsroot/mozilla/intl/uconv/native/nsNativeUConvService.cpp,v retrieving revision 1.7 diff -u -r1.7 mozilla/intl/uconv/native/nsNativeUConvService.cpp --- mozilla/intl/uconv/native/nsNativeUConvService.cpp +++ mozilla/intl/uconv/native/nsNativeUConvService.cpp @@ -375,11 +375,12 @@ { *aResult = nsnull; - nsRefPtr ucl = new IConvAdaptor(); + IConvAdaptor* adaptor = new IConvAdaptor(); + nsCOMPtr ucl(NS_STATIC_CAST(nsIUnicodeDecoder*, adaptor)); if (!ucl) return NS_ERROR_OUT_OF_MEMORY; - nsresult rv = ucl->Init(from, to); + nsresult rv = adaptor->Init(from, to); if (NS_SUCCEEDED(rv)) NS_ADDREF(*aResult = ucl);