nsresult rv = mElements->Count(&cnt); if (NS_FAILED(rv)) return rv; *aLength = cnt;
mElements->Count(&cnt);  *aLength = 0; nsCOMPtr<nsIXBLInsertionPoint> point; PRUint32 l; for (PRUint32 i = 0; i < cnt; i++) { point = getter_AddRefs((nsIXBLInsertionPoint*)(mElements->ElementAt(i))); point->ChildCount(&l); *aLength += l; }
nsAnonymousContentList::GetLength(PRUint32* aLength){  NS_ASSERTION(aLength != nsnull, "null ptr");  if (! aLength)      return NS_ERROR_NULL_POINTER;  PRUint32 cnt;  nsresult rv = mElements->Count(&cnt);  if (NS_FAILED(rv)) return rv;  *aLength = cnt;  return NS_OK;}