зеркало из https://github.com/mozilla/gecko-dev.git
change NS_ASSERTION to NS_WARN_IF_FALSE; r=none
This commit is contained in:
Родитель
1694cf9261
Коммит
948d04c6d8
|
@ -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
|
||||
|
||||
}
|
||||
|
|
|
@ -1042,9 +1042,10 @@ nsString& nsString::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
|
||||
|
||||
}
|
||||
|
@ -1076,7 +1077,7 @@ nsString& nsString::Append(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 append(PRUnichar*)");
|
||||
NS_WARN_IF_FALSE(len>=aCount,"possible embedded null in append(PRUnichar*)");
|
||||
#endif
|
||||
|
||||
}
|
||||
|
@ -1266,7 +1267,7 @@ nsString& nsString::Insert(const char* aCString,PRUint32 anOffset,PRInt32 aCount
|
|||
// 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
|
||||
|
||||
}
|
||||
|
@ -1301,7 +1302,7 @@ nsString& nsString::Insert(const PRUnichar* aString,PRUint32 anOffset,PRInt32 aC
|
|||
// 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 Insert(PRUnichar*)");
|
||||
NS_WARN_IF_FALSE(len>=aCount,"possible embedded null in Insert(PRUnichar*)");
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
}
|
||||
|
|
|
@ -1042,9 +1042,10 @@ nsString& nsString::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
|
||||
|
||||
}
|
||||
|
@ -1076,7 +1077,7 @@ nsString& nsString::Append(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 append(PRUnichar*)");
|
||||
NS_WARN_IF_FALSE(len>=aCount,"possible embedded null in append(PRUnichar*)");
|
||||
#endif
|
||||
|
||||
}
|
||||
|
@ -1266,7 +1267,7 @@ nsString& nsString::Insert(const char* aCString,PRUint32 anOffset,PRInt32 aCount
|
|||
// 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
|
||||
|
||||
}
|
||||
|
@ -1301,7 +1302,7 @@ nsString& nsString::Insert(const PRUnichar* aString,PRUint32 anOffset,PRInt32 aC
|
|||
// 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 Insert(PRUnichar*)");
|
||||
NS_WARN_IF_FALSE(len>=aCount,"possible embedded null in Insert(PRUnichar*)");
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
}
|
||||
|
|
|
@ -1042,9 +1042,10 @@ nsString& nsString::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
|
||||
|
||||
}
|
||||
|
@ -1076,7 +1077,7 @@ nsString& nsString::Append(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 append(PRUnichar*)");
|
||||
NS_WARN_IF_FALSE(len>=aCount,"possible embedded null in append(PRUnichar*)");
|
||||
#endif
|
||||
|
||||
}
|
||||
|
@ -1266,7 +1267,7 @@ nsString& nsString::Insert(const char* aCString,PRUint32 anOffset,PRInt32 aCount
|
|||
// 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
|
||||
|
||||
}
|
||||
|
@ -1301,7 +1302,7 @@ nsString& nsString::Insert(const PRUnichar* aString,PRUint32 anOffset,PRInt32 aC
|
|||
// 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 Insert(PRUnichar*)");
|
||||
NS_WARN_IF_FALSE(len>=aCount,"possible embedded null in Insert(PRUnichar*)");
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче