зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
0e2d3c90a8
Коммит
6347de83d1
|
@ -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))
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче