mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 96108: Inline ElementAt(), add SafeElementAt(), voidarray usage fixes,
assertions for bad voidarray indexes. r=jst, sr=waterson
This commit is contained in:
parent
73ae417040
commit
b20dd2c69a
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user