if (tmp) { nsCOMPtr<nsIAtom> medium(do_QueryInterface(tmp)); NS_ENSURE_TRUE(medium, NS_ERROR_FAILURE);
*aReturn = nsnull; if (nsnull != mStyleSheet) { result = mStyleSheet->EnsureUniqueInner(); if (NS_SUCCEEDED(result)) { nsICSSRule *rule;
DOMMediaListImpl::Item(PRUint32 aIndex, nsAWritableString& aReturn){  nsCOMPtr<nsISupports> tmp(dont_AddRef(ElementAt(aIndex)));  if (tmp) {    nsCOMPtr<nsIAtom> medium(do_QueryInterface(tmp));    NS_ENSURE_TRUE(medium, NS_ERROR_FAILURE);    const PRUnichar *buffer;    medium->GetUnicode(&buffer);    aReturn.Assign(buffer);  } else {    aReturn.Truncate();  }  return NS_OK;}