mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
bug 525573: in --enable-tracemalloc builds, initialize tracemalloc in XPCOM unit tests so as to support multi-threaded tests. r=jwalden
This commit is contained in:
parent
3be750b8f3
commit
213fbd7685
@ -59,6 +59,10 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef NS_TRACE_MALLOC
|
||||
# include "nsTraceMalloc.h"
|
||||
#endif
|
||||
|
||||
static PRUint32 gFailCount = 0;
|
||||
|
||||
/**
|
||||
@ -247,6 +251,11 @@ class ScopedXPCOM : public nsIDirectoryServiceProvider2
|
||||
mTestName = testName;
|
||||
printf("Running %s tests...\n", mTestName);
|
||||
|
||||
#ifdef NS_TRACE_MALLOC
|
||||
// nsAppRunner starts tracemalloc before init'ing XPCOM
|
||||
NS_TraceMallocStartup(-1); // -1 == no logging
|
||||
#endif
|
||||
|
||||
nsresult rv = NS_InitXPCOM2(&mServMgr, NULL, this);
|
||||
if (NS_FAILED(rv))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user