Bug 441197: Explicitly close file descriptors in nsTraceRefcntImpl rather than expecting the OS to clean up properly. r=dbaron

This commit is contained in:
Kyle Huey 2011-06-24 07:22:37 -07:00
parent cb7e11eb84
commit f2e5ab3f4e

View File

@ -1286,6 +1286,26 @@ nsTraceRefcntImpl::Shutdown()
PL_HashTableDestroy(gSerialNumbers);
gSerialNumbers = nsnull;
}
if (gBloatLog) {
fclose(gBloatLog);
gBloatLog = nsnull;
}
if (gRefcntsLog) {
fclose(gRefcntsLog);
gRefcntsLog = nsnull;
}
if (gAllocLog) {
fclose(gAllocLog);
gAllocLog = nsnull;
}
if (gLeakyLog) {
fclose(gLeakyLog);
gLeakyLog = nsnull;
}
if (gCOMPtrLog) {
fclose(gCOMPtrLog);
gCOMPtrLog = nsnull;
}
#endif
}