From bug 345517 - fix adoptcount logging for the frozen string API, r=darin

git-svn-id: svn://10.0.0.236/trunk@215113 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
benjamin%smedbergs.us
2006-11-10 20:05:04 +00:00
parent c50a589122
commit cae89c5987
2 changed files with 18 additions and 9 deletions

View File

@@ -36,6 +36,23 @@
*
* ***** END LICENSE BLOCK ***** */
nsTSubstring_CharT::nsTSubstring_CharT( char_type *data, size_type length,
PRUint32 flags)
#ifdef MOZ_V1_STRING_ABI
: abstract_string_type(data, length, flags)
#else
: mData(data),
mLength(length),
mFlags(flags)
#endif
{
if (flags & F_OWNED) {
STRING_STAT_INCREMENT(Adopt);
#ifdef NS_BUILD_REFCNT_LOGGING
NS_LogCtor(mData, "StringAdopt", 1);
#endif
}
}
/**
* helper function for down-casting a nsTSubstring to a nsTFixedString.