NS_ENSURE_ARG_POINTER(aLength);  PRUint32 cnt;  nsresult rv = Count(&cnt); if (NS_FAILED(rv)) return rv;  *aLength = cnt;
if (nsnull != mStyleSheet) { PRInt32 count; mStyleSheet->StyleRuleCount(count); *aLength = (PRUint32)count; } else { *aLength = 0; }
DOMMediaListImpl::GetLength(PRUint32* aLength){  NS_ENSURE_ARG_POINTER(aLength);  PRUint32 cnt;  nsresult rv = Count(&cnt);  if (NS_FAILED(rv)) return rv;  *aLength = cnt;  return NS_OK;}