change NS_ASSERTION to NS_WARN_IF_FALSE; r=none

git-svn-id: svn://10.0.0.236/trunk@53459 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rickg%netscape.com
1999-11-14 10:05:40 +00:00
parent bcf8227c2a
commit 00192bb235
6 changed files with 27 additions and 24 deletions

View File

@@ -796,7 +796,7 @@ nsCString& nsCString::Assign(const PRUnichar* aString,PRInt32 aCount) {
// the passed-in string. File a bug on the caller.
#ifdef NS_DEBUG
PRInt32 len=nsCRT::strlen(aString);
NS_ASSERTION(aCount <= len, "potential error in Assign(PRUnichar*)");
NS_WARN_IF_FALSE(len>=aCount,"possible embedded null in Assign(PRUnichar*)");
#endif
}
@@ -901,11 +901,11 @@ nsCString& nsCString::Append(const char* aCString,PRInt32 aCount) {
// If this assertion fires, the caller is probably lying about the length of
// the passed-in string. File a bug on the caller.
#ifdef NS_DEBUG
PRInt32 len=strlen(aCString);
NS_ASSERTION(aCount <= len, "potential error in Append(char*)");
NS_WARN_IF_FALSE(len>=aCount,"possible embedded null in append(char*)");
#endif
}
else aCount=temp.mLength=nsCRT::strlen(aCString);
@@ -1091,7 +1091,7 @@ nsCString& nsCString::Insert(const char* aCString,PRUint32 anOffset,PRInt32 aCou
// the passed-in string. File a bug on the caller.
#ifdef NS_DEBUG
PRInt32 len=strlen(aCString);
NS_ASSERTION(aCount <= len, "potential error in Insert(char*)");
NS_WARN_IF_FALSE(len>=aCount,"possible embedded null in Insert(char*)");
#endif
}