mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-04 13:07:52 +00:00
Add assertion to ns{C}String::Adopt. r=/sr=mozbot
This commit is contained in:
parent
11a49ae318
commit
467b3a5d8d
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user