Bug 96108: Inline ElementAt(), add SafeElementAt(), voidarray usage fixes,
assertions for bad voidarray indexes. r=jst, sr=waterson
This commit is contained in:
Родитель
f58baa1eee
Коммит
f12a072981
|
@ -354,13 +354,8 @@ NS_IMETHODIMP
|
|||
nsSHEntry::GetChildAt(PRInt32 aIndex, nsISHEntry ** aResult)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aResult);
|
||||
if (PRUint32(aIndex) >= PRUint32(mChildren.Count())) {
|
||||
*aResult = nsnull;
|
||||
}
|
||||
else {
|
||||
*aResult = (nsISHEntry*) mChildren.ElementAt(aIndex);
|
||||
NS_IF_ADDREF(*aResult);
|
||||
}
|
||||
*aResult = (nsISHEntry*) mChildren.SafeElementAt(aIndex);
|
||||
NS_IF_ADDREF(*aResult);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче