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:
@@ -867,6 +867,7 @@ void nsString::InsertWithConversion(const char* aCString,PRUint32 anOffset,PRInt
|
||||
}
|
||||
|
||||
void nsString::Adopt(PRUnichar* aPtr, PRInt32 aLength) {
|
||||
NS_ASSERTION(aPtr, "Can't adopt |0|");
|
||||
nsStr::Destroy(*this);
|
||||
if (aLength == -1)
|
||||
aLength = nsCharTraits<PRUnichar>::length(aPtr);
|
||||
|
||||
Reference in New Issue
Block a user