backing out 345517 due to leak test bustage

This commit is contained in:
pavlov@pavlov.net
2006-11-10 04:42:03 +00:00
parent 50b87c31b8
commit f7bb7881cf
55 changed files with 468 additions and 568 deletions

View File

@@ -342,7 +342,7 @@ static PRBool ns_strnimatch(const PRUnichar *aStr, const char* aSubstring,
if (!NS_IsAscii(*aStr))
return PR_FALSE;
if (NS_ToLower((char) *aStr) != NS_ToLower(*aSubstring))
if (NS_ToLower((char) *aStr) != *aSubstring)
return PR_FALSE;
}
@@ -350,7 +350,7 @@ static PRBool ns_strnimatch(const PRUnichar *aStr, const char* aSubstring,
}
PRInt32
nsAString::Find(const char *aStr, PRUint32 aOffset, PRBool aIgnoreCase) const
nsAString::Find(const char *aStr, PRBool aIgnoreCase) const
{
PRBool (*match)(const PRUnichar*, const char*, PRUint32) =
aIgnoreCase ? ns_strnimatch : ns_strnmatch;
@@ -358,9 +358,6 @@ nsAString::Find(const char *aStr, PRUint32 aOffset, PRBool aIgnoreCase) const
const char_type *begin, *end;
PRUint32 selflen = BeginReading(&begin, &end);
if (aOffset > selflen)
return -1;
PRUint32 otherlen = strlen(aStr);
if (otherlen > selflen)
@@ -369,7 +366,7 @@ nsAString::Find(const char *aStr, PRUint32 aOffset, PRBool aIgnoreCase) const
// We want to stop searching otherlen characters before the end of the string
end -= otherlen;
for (const char_type *cur = begin + aOffset; cur <= end; ++cur) {
for (const char_type *cur = begin; cur <= end; ++cur) {
if (match(cur, aStr, otherlen)) {
return cur - begin;
}
@@ -685,7 +682,7 @@ nsACString::Find(const char_type *aStr, PRUint32 aLen, ComparatorFunc c) const
end -= aLen;
for (const char_type *cur = begin; cur <= end; ++cur) {
if (!c(cur, aStr, aLen))
if (!c(begin, aStr, aLen))
return cur - begin;
}
return -1;