mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Fixed bad NSGetFactory.
This commit is contained in:
parent
b605bf26fe
commit
c11bdf4df1
@ -49,7 +49,7 @@ NS_DEFINE_CID(kPosixLocaleFactoryCID,NS_POSIXLOCALEFACTORY_CID);
|
||||
NS_DEFINE_IID(kIPosixLocaleIID, NS_IPOSIXLOCALE_IID);
|
||||
#endif
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsLocaleFactory,kILocaleFactoryIID)
|
||||
NS_IMPL_ISUPPORTS2(nsLocaleFactory,nsIFactory, nsILocaleFactory)
|
||||
|
||||
#define LOCALE_CATEGORY_LISTLEN 6
|
||||
char* localeCategoryList[LOCALE_CATEGORY_LISTLEN] =
|
||||
|
@ -87,7 +87,7 @@ extern "C" NS_EXPORT nsresult NSGetFactory(nsISupports* serviceMgr,
|
||||
if (aClass.Equals(kLocaleFactoryCID))
|
||||
{
|
||||
factoryInstance = new nsLocaleFactory();
|
||||
res = factoryInstance->QueryInterface(kILocaleFactoryIID, (void **) aFactory);
|
||||
res = CallQueryInterface(factoryInstance, aFactory);
|
||||
|
||||
if (NS_FAILED(res))
|
||||
{
|
||||
@ -100,7 +100,7 @@ extern "C" NS_EXPORT nsresult NSGetFactory(nsISupports* serviceMgr,
|
||||
|
||||
if (aClass.Equals(kLocaleServiceCID)) {
|
||||
factoryInstance = new nsLocaleServiceFactory();
|
||||
res = factoryInstance->QueryInterface(kIFactoryIID,(void**)aFactory);
|
||||
res = CallQueryInterface(factoryInstance, aFactory);
|
||||
if (NS_FAILED(res)) { *aFactory=NULL; delete factoryInstance; }
|
||||
return res;
|
||||
}
|
||||
@ -110,7 +110,7 @@ extern "C" NS_EXPORT nsresult NSGetFactory(nsISupports* serviceMgr,
|
||||
if (aClass.Equals(kWin32LocaleFactoryCID))
|
||||
{
|
||||
factoryInstance = new nsIWin32LocaleFactory();
|
||||
res = factoryInstance->QueryInterface(kIFactoryIID,(void**)aFactory);
|
||||
res = CallQueryInterface(factoryInstance, aFactory);
|
||||
if (NS_FAILED(res))
|
||||
{
|
||||
*aFactory=NULL;
|
||||
@ -129,7 +129,7 @@ extern "C" NS_EXPORT nsresult NSGetFactory(nsISupports* serviceMgr,
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
res = factoryInstance->QueryInterface(kIFactoryIID, (void**)aFactory);
|
||||
res = CallQueryInterface(factoryInstance, aFactory);
|
||||
if (NS_FAILED(res))
|
||||
{
|
||||
*aFactory = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user