nsCOMPtr<nsIURL> url;  rv = nsComponentManager::CreateInstance("@mozilla.org/network/standard-url;1", nsnull, NS_GET_IID(nsIURL), getter_AddRefs(url));
nsCOMPtr<nsIURI> url; nsCAutoString str; str.AssignWithConversion(valueStr); rv = NS_NewURI(getter_AddRefs(url), str);
NS_IMETHODIMP nsOverlayEnumerator::GetNext(nsISupports **aResult){  nsresult rv;  *aResult = nsnull;  if (!mCurrentArcs) {    mCurrentArcs = mInstallArcs;    if (!mCurrentArcs)      return NS_ERROR_FAILURE;  }  else if (mCurrentArcs == mProfileArcs) {    PRBool hasMore;    rv = mCurrentArcs->HasMoreElements(&hasMore);    if (NS_FAILED(rv)) return rv;    if (!hasMore)      mCurrentArcs = mInstallArcs;    if (!mInstallArcs)      return NS_ERROR_FAILURE;  }  nsCOMPtr<nsISupports> supports;  rv = mCurrentArcs->GetNext(getter_AddRefs(supports));  if (NS_FAILED(rv)) return rv;  nsCOMPtr<nsIRDFLiteral> value = do_QueryInterface(supports, &rv);  if (NS_FAILED(rv))    return NS_OK;  const PRUnichar* valueStr;  rv = value->GetValueConst(&valueStr);  if (NS_FAILED(rv))    return rv;  nsCOMPtr<nsIURL> url;    rv = nsComponentManager::CreateInstance("@mozilla.org/network/standard-url;1",                                          nsnull,                                          NS_GET_IID(nsIURL),                                          getter_AddRefs(url));  if (NS_FAILED(rv))    return NS_OK;  nsCAutoString str; str.AssignWithConversion(valueStr);  rv = url->SetSpec(str);  if (NS_FAILED(rv)) return rv;    nsCOMPtr<nsISupports> sup;  sup = do_QueryInterface(url, &rv);  if (NS_FAILED(rv))    return NS_OK;  *aResult = sup;  NS_ADDREF(*aResult);  return NS_OK;}