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; }
nsresult rv = mElements->Count(&cnt); if (NS_FAILED(rv)) return rv; *aLength = cnt;
nsAnonymousContentList::GetLength(PRUint32* aLength){  NS_ASSERTION(aLength != nsnull, "null ptr");  if (! aLength)      return NS_ERROR_NULL_POINTER;  PRUint32 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;  }  return NS_OK;}