Add assertion to ns{C}String::Adopt. r=/sr=mozbot

git-svn-id: svn://10.0.0.236/trunk@111232 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jaggernaut%netscape.com
2002-01-02 09:00:02 +00:00
parent 9f04502e25
commit 21218c3fcb
4 changed files with 4 additions and 0 deletions

View File

@@ -865,6 +865,7 @@ void nsCString::InsertWithConversion(PRUnichar aChar,PRUint32 anOffset){
void nsCString::Adopt(char* aPtr, PRInt32 aLength) {
NS_ASSERTION(aPtr, "Can't adopt |0|");
nsStr::Destroy(*this);
if (aLength == -1)
aLength = nsCharTraits<char>::length(aPtr);