Bug 728990 - Change "The two measurements of 'explicit' memory usage don't match" assertion to a warning, because it fails occasionally due to races. r=jruderman.

--HG--
extra : rebase_source : 3b2a8c8f14690bea041366dd35ff5147895abd56
This commit is contained in:
Nicholas Nethercote 2012-02-26 20:17:46 -08:00
parent 4a0e2dd8e7
commit a60da3f47e

View File

@ -821,9 +821,17 @@ nsMemoryReporterManager::GetExplicit(PRInt64 *aExplicit)
} }
PRInt64 explicitNonHeapMultiSize2 = wrappedExplicitNonHeapMultiSize2->mValue; PRInt64 explicitNonHeapMultiSize2 = wrappedExplicitNonHeapMultiSize2->mValue;
// Check the two measurements give the same result. // Check the two measurements give the same result. This was an
NS_ASSERTION(explicitNonHeapMultiSize == explicitNonHeapMultiSize2, // NS_ASSERTION but they occasionally don't match due to races (bug
"The two measurements of 'explicit' memory usage don't match"); // 728990).
if (explicitNonHeapMultiSize != explicitNonHeapMultiSize2) {
char *msg = PR_smprintf("The two measurements of 'explicit' memory "
"usage don't match (%lld vs %lld)",
explicitNonHeapMultiSize,
explicitNonHeapMultiSize2);
NS_WARNING(msg);
PR_smprintf_free(msg);
}
#endif #endif
*aExplicit = heapAllocated + explicitNonHeapNormalSize + explicitNonHeapMultiSize; *aExplicit = heapAllocated + explicitNonHeapNormalSize + explicitNonHeapMultiSize;