factory needs work

This commit is contained in:
mjudge%netscape.com 1998-11-30 08:35:45 +00:00
parent e139dc5033
commit 1e13676256
2 changed files with 8 additions and 2 deletions

View File

@ -39,11 +39,14 @@ getEditFactory(nsIFactory **aFactory)
{
nsEditFactory *factory = new nsEditFactory(getter_AddRefs(g_pNSIFactory));
*aFactory = g_pNSIFactory;
NS_IF_RELEASE(*aFactory);
if (factory)
result = NS_OK;
}
else
result = g_pNSIFactory->QueryInterface(kIFactoryIID, (void **)aFactory);
PR_ExitMonitor(getEditorMonitor());
return NS_ERROR_FAILURE;
return result;
}
////////////////////////////////////////////////////////////////////////////

View File

@ -39,11 +39,14 @@ getEditFactory(nsIFactory **aFactory)
{
nsEditFactory *factory = new nsEditFactory(getter_AddRefs(g_pNSIFactory));
*aFactory = g_pNSIFactory;
NS_IF_RELEASE(*aFactory);
if (factory)
result = NS_OK;
}
else
result = g_pNSIFactory->QueryInterface(kIFactoryIID, (void **)aFactory);
PR_ExitMonitor(getEditorMonitor());
return NS_ERROR_FAILURE;
return result;
}
////////////////////////////////////////////////////////////////////////////