Giving these files Purify loving. r=dveditz

This commit is contained in:
dougt%netscape.com 2000-01-28 23:37:27 +00:00
Родитель d9a6754c4b
Коммит bae665046a
4 изменённых файлов: 15 добавлений и 5 удалений

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

@ -415,7 +415,7 @@ NS_IMETHODIMP nsRegistry::OpenWellKnownRegistry( nsWellKnownRegistry regid ) {
getter_AddRefs(directoryService));
if (NS_FAILED(rv)) return rv;
directoryService->Get("xpcom.currentProcess.componentRegistry", NS_GET_IID(nsIFile),
(void**)&registryLocation);
getter_AddRefs(registryLocation));
if (registryLocation != nsnull)
foundReg = PR_TRUE;
@ -432,6 +432,8 @@ NS_IMETHODIMP nsRegistry::OpenWellKnownRegistry( nsWellKnownRegistry regid ) {
char *regFile;
registryLocation->GetPath(&regFile); // dougt fix...
// dveditz needs to fix his registry so that I can pass an
// nsIFile interface and not hack
#ifdef DEBUG_dp
@ -442,6 +444,8 @@ NS_IMETHODIMP nsRegistry::OpenWellKnownRegistry( nsWellKnownRegistry regid ) {
err = NR_RegOpen((char*)regFile, &mReg );
PR_Unlock(mregLock);
nsAllocator::Free(regFile);
// Store the registry that was opened for optimizing future opens.
mCurRegID = regid;

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

@ -286,7 +286,9 @@ nsresult nsComponentManagerImpl::Shutdown(void)
NS_IF_RELEASE(mRegistry);
#endif /* USE_REGISTRY */
delete mComponentsDir;
// This is were the nsFileSpec was deleted, so I am
// going to assign zero to
mComponentsDir = 0;
// Release all the component loaders
if (mLoaders)
@ -422,7 +424,7 @@ nsComponentManagerImpl::PlatformInit(void)
NS_GET_IID(nsIProperties),
getter_AddRefs(directoryService));
directoryService->Get("xpcom.currentProcess.componentDirectory", NS_GET_IID(nsIFile), (void**)&mComponentsDir);
directoryService->Get("xpcom.currentProcess.componentDirectory", NS_GET_IID(nsIFile), getter_AddRefs(mComponentsDir));
if (!mComponentsDir)
return NS_ERROR_OUT_OF_MEMORY;

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

@ -116,7 +116,7 @@ protected:
PRBool mPrePopulationDone;
nsRegistryKey mLoadersKey;
nsNativeComponentLoader *mNativeComponentLoader;
nsIFile *mComponentsDir;
nsCOMPtr<nsIFile> mComponentsDir;
// Shutdown
#define NS_SHUTDOWN_NEVERHAPPENED 0

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

@ -415,7 +415,7 @@ NS_IMETHODIMP nsRegistry::OpenWellKnownRegistry( nsWellKnownRegistry regid ) {
getter_AddRefs(directoryService));
if (NS_FAILED(rv)) return rv;
directoryService->Get("xpcom.currentProcess.componentRegistry", NS_GET_IID(nsIFile),
(void**)&registryLocation);
getter_AddRefs(registryLocation));
if (registryLocation != nsnull)
foundReg = PR_TRUE;
@ -432,6 +432,8 @@ NS_IMETHODIMP nsRegistry::OpenWellKnownRegistry( nsWellKnownRegistry regid ) {
char *regFile;
registryLocation->GetPath(&regFile); // dougt fix...
// dveditz needs to fix his registry so that I can pass an
// nsIFile interface and not hack
#ifdef DEBUG_dp
@ -442,6 +444,8 @@ NS_IMETHODIMP nsRegistry::OpenWellKnownRegistry( nsWellKnownRegistry regid ) {
err = NR_RegOpen((char*)regFile, &mReg );
PR_Unlock(mregLock);
nsAllocator::Free(regFile);
// Store the registry that was opened for optimizing future opens.
mCurRegID = regid;