const PRUnichar *buffer; medium->GetUnicode(&buffer);
nsAutoString buffer; medium->ToString(buffer);
DOMMediaListImpl::GetText(nsAString& aMediaText){  aMediaText.Truncate();  PRUint32 cnt;  nsresult rv = Count(&cnt);  if (NS_FAILED(rv)) return rv;  PRInt32 count = cnt, index = 0;  while (index < count) {    nsCOMPtr<nsIAtom> medium;    QueryElementAt(index++, NS_GET_IID(nsIAtom), getter_AddRefs(medium));    NS_ENSURE_TRUE(medium, NS_ERROR_FAILURE);    const PRUnichar *buffer;    medium->GetUnicode(&buffer);    aMediaText.Append(buffer);    if (index < count) {      aMediaText.Append(NS_LITERAL_STRING(", "));    }  }  return NS_OK;}