зеркало из https://github.com/mozilla/pjs.git
Add trace-malloc logfile flushing from an idle handler (r=rayw, a=waterson, not part of build).
This commit is contained in:
Родитель
4c89c9e0d6
Коммит
9de5dea0d9
|
@ -318,6 +318,17 @@ NS_IMETHODIMP nsAppShell::Spindown()
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef NS_TRACE_MALLOC
|
||||
#include "nsTraceMalloc.h"
|
||||
|
||||
static gint
|
||||
tm_flush_logfiles(gpointer data)
|
||||
{
|
||||
NS_TraceMallocFlushLogfiles();
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Run
|
||||
|
@ -331,6 +342,10 @@ NS_IMETHODIMP nsAppShell::Run()
|
|||
if (!mEventQueue)
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
|
||||
#ifdef NS_TRACE_MALLOC
|
||||
gtk_idle_add(tm_flush_logfiles, nsnull);
|
||||
#endif
|
||||
|
||||
// kick up gtk_main. this won't return until gtk_main_quit is called
|
||||
gtk_main();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче