зеркало из https://github.com/mozilla/gecko-dev.git
Fix to get nsLeakDetector building again after shaver's changes to NS_NewGenericFactory(). r=dbaron@fas.harvard.edu, sr=waterson, amen=leaf.
This commit is contained in:
Родитель
eddf282393
Коммит
89354c8ed3
|
@ -169,23 +169,32 @@ nsresult NS_InitLeakDetector()
|
||||||
|
|
||||||
// open the first leak file.
|
// open the first leak file.
|
||||||
rv = nextLeakFile();
|
rv = nextLeakFile();
|
||||||
if (rv != NS_OK)
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
|
||||||
|
static nsModuleComponentInfo info = {
|
||||||
|
"Leak Detector", kCLeakDetectorCID, NS_CLEAKDETECTOR_CONTRACTID, nsLeakDetectorConstructor
|
||||||
|
};
|
||||||
|
|
||||||
// create a generic factory for the leak detector.
|
// create a generic factory for the leak detector.
|
||||||
nsCOMPtr<nsIGenericFactory> factory;
|
nsCOMPtr<nsIGenericFactory> factory;
|
||||||
rv = NS_NewGenericFactory(getter_AddRefs(factory), &nsLeakDetectorConstructor);
|
rv = NS_NewGenericFactory(getter_AddRefs(factory), &info);
|
||||||
if (rv != NS_OK)
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
|
||||||
// register this factory with the component manager.
|
// register this factory with the component manager.
|
||||||
rv = nsComponentManager::RegisterFactory(kCLeakDetectorCID, "LeakDetector", NS_CLEAKDETECTOR_CONTRACTID, factory, PR_TRUE);
|
return nsComponentManager::RegisterFactory(info.mCID, info.mDescription, info.mContractID, factory, PR_TRUE);
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef XP_MAC
|
||||||
|
#define SHUTDOWN_LEAKS_EARLY
|
||||||
|
#undef SHUTDOWN_LEAKS_MEDIUM
|
||||||
|
#undef SHUTDOWN_LEAKS_LATE
|
||||||
|
#else
|
||||||
#undef SHUTDOWN_LEAKS_EARLY
|
#undef SHUTDOWN_LEAKS_EARLY
|
||||||
#undef SHUTDOWN_LEAKS_MEDIUM
|
#undef SHUTDOWN_LEAKS_MEDIUM
|
||||||
#define SHUTDOWN_LEAKS_LATE
|
#define SHUTDOWN_LEAKS_LATE
|
||||||
|
#endif
|
||||||
|
|
||||||
class LeakDetectorFinalizer
|
class LeakDetectorFinalizer
|
||||||
{
|
{
|
||||||
|
|
Загрузка…
Ссылка в новой задаче