зеркало из https://github.com/mozilla/gecko-dev.git
Giving these files Purify loving. r=dveditz
This commit is contained in:
Родитель
d9a6754c4b
Коммит
bae665046a
|
@ -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**)®istryLocation);
|
||||
getter_AddRefs(registryLocation));
|
||||
|
||||
if (registryLocation != nsnull)
|
||||
foundReg = PR_TRUE;
|
||||
|
@ -432,6 +432,8 @@ NS_IMETHODIMP nsRegistry::OpenWellKnownRegistry( nsWellKnownRegistry regid ) {
|
|||
|
||||
char *regFile;
|
||||
registryLocation->GetPath(®File); // 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**)®istryLocation);
|
||||
getter_AddRefs(registryLocation));
|
||||
|
||||
if (registryLocation != nsnull)
|
||||
foundReg = PR_TRUE;
|
||||
|
@ -432,6 +432,8 @@ NS_IMETHODIMP nsRegistry::OpenWellKnownRegistry( nsWellKnownRegistry regid ) {
|
|||
|
||||
char *regFile;
|
||||
registryLocation->GetPath(®File); // 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;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче