Do better logging of string leaks. Bug 336914, r+sr=darin

git-svn-id: svn://10.0.0.236/trunk@196369 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2006-05-12 03:36:37 +00:00
parent caee2e9858
commit b21642b02c
3 changed files with 34 additions and 5 deletions

View File

@@ -425,6 +425,11 @@ nsTSubstring_CharT::Adopt( char_type* data, size_type length )
SetDataFlags(F_TERMINATED | F_OWNED);
STRING_STAT_INCREMENT(Adopt);
#ifdef NS_BUILD_REFCNT_LOGGING
// Treat this as construction of a "StringAdopt" object for leak
// tracking purposes.
NS_LogCtor(mData, "StringAdopt", 1);
#endif // NS_BUILD_REFCNT_LOGGING
}
else
{