зеркало из https://github.com/mozilla/pjs.git
Bug 324911, use different error messages for out-of-range in ElementAt and FastElementAt. r+sr=sicking.
This commit is contained in:
Родитель
eb95767ab6
Коммит
500e22801a
|
@ -1241,7 +1241,7 @@ nsSmallVoidArray::Count() const
|
|||
void*
|
||||
nsSmallVoidArray::FastElementAt(PRInt32 aIndex) const
|
||||
{
|
||||
NS_ASSERTION(0 <= aIndex && aIndex < Count(), "index out of range");
|
||||
NS_ASSERTION(0 <= aIndex && aIndex < Count(), "nsSmallVoidArray::FastElementAt: index out of range");
|
||||
|
||||
if (HasSingle()) {
|
||||
return GetSingle();
|
||||
|
|
|
@ -69,7 +69,7 @@ public:
|
|||
|
||||
void* FastElementAt(PRInt32 aIndex) const
|
||||
{
|
||||
NS_ASSERTION(0 <= aIndex && aIndex < Count(), "index out of range");
|
||||
NS_ASSERTION(0 <= aIndex && aIndex < Count(), "nsVoidArray::FastElementAt: index out of range");
|
||||
return mImpl->mArray[aIndex];
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ public:
|
|||
// crashing for backwards compatibility. See bug 96108.
|
||||
void* ElementAt(PRInt32 aIndex) const
|
||||
{
|
||||
NS_ASSERTION(0 <= aIndex && aIndex < Count(), "index out of range");
|
||||
NS_ASSERTION(0 <= aIndex && aIndex < Count(), "nsVoidArray::ElementAt: index out of range");
|
||||
return SafeElementAt(aIndex);
|
||||
}
|
||||
|
||||
|
@ -370,7 +370,7 @@ public:
|
|||
// crashing for backwards compatibility. See bug 96108.
|
||||
void* ElementAt(PRInt32 aIndex) const
|
||||
{
|
||||
NS_ASSERTION(0 <= aIndex && aIndex < Count(), "index out of range");
|
||||
NS_ASSERTION(0 <= aIndex && aIndex < Count(), "nsSmallVoidArray::ElementAt: index out of range");
|
||||
return SafeElementAt(aIndex);
|
||||
}
|
||||
void* SafeElementAt(PRInt32 aIndex) const {
|
||||
|
|
Загрузка…
Ссылка в новой задаче