Bug #342442 --> clone should also copy the url's msg windows object.

sr=bienvenu
This commit is contained in:
scott%scott-macgregor.org 2006-06-23 00:55:59 +00:00
Родитель 88e50fe62b
Коммит b0555c9ba8
1 изменённых файлов: 14 добавлений и 3 удалений

Просмотреть файл

@ -574,10 +574,21 @@ NS_IMETHODIMP nsMsgMailNewsUrl::Clone(nsIURI **_retval)
nsresult rv;
nsCAutoString urlSpec;
nsCOMPtr<nsIIOService> ioService = do_GetService(NS_IOSERVICE_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
NS_ENSURE_SUCCESS(rv, rv);
rv = GetSpec(urlSpec);
if (NS_FAILED(rv)) return rv;
return ioService->NewURI(urlSpec, nsnull, nsnull, _retval);
NS_ENSURE_SUCCESS(rv, rv);
rv = ioService->NewURI(urlSpec, nsnull, nsnull, _retval);
NS_ENSURE_SUCCESS(rv, rv);
// add the msg window to the cloned url
if (m_msgWindow)
{
nsCOMPtr<nsIMsgMailNewsUrl> msgMailNewsUrl = do_QueryInterface(*_retval, &rv);
NS_ENSURE_SUCCESS(rv, rv);
msgMailNewsUrl->SetMsgWindow(m_msgWindow);
}
return rv;
}
NS_IMETHODIMP nsMsgMailNewsUrl::Resolve(const nsACString &relativePath, nsACString &result)