Move temporary debugging code for bug 538462 to where it's more likely to work when we leak the world.

This commit is contained in:
L. David Baron 2010-05-05 12:39:44 -07:00
Родитель 003dd9e457
Коммит a31eb69d34
1 изменённых файлов: 13 добавлений и 8 удалений

Просмотреть файл

@ -153,14 +153,6 @@ nsXPConnect::~nsXPConnect()
mRuntime->SystemIsBeingShutDown(cx);
JS_EndRequest(cx);
// Temporary code to debug a persistent leak on tinderbox
// unit tests (bug 538462).
#if defined(DEBUG_cltbld) && defined(XP_MACOSX)
printf("Dump of entire JS heap at shutdown:\n");
JS_DumpHeap(cx, stdout, nsnull, 0, nsnull, size_t(-1), nsnull);
#endif
JS_DestroyContext(cx);
}
@ -236,6 +228,19 @@ nsXPConnect::ReleaseXPConnectSingleton()
}
#endif
// Temporary code to debug a persistent leak on tinderbox
// unit tests (bug 538462).
#if defined(DEBUG_cltbld) && defined(XP_MACOSX)
{
XPCCallContext ccx(NATIVE_CALLER);
if(ccx.IsValid())
{
printf("Dump of entire JS heap at shutdown:\n");
JS_DumpHeap(ccx, stdout, nsnull, 0, nsnull, size_t(-1), nsnull);
}
}
#endif
#ifdef DEBUG
// force a dump of the JavaScript gc heap if JS is still alive
// if requested through XPC_SHUTDOWN_HEAP_DUMP environment variable