Better fix for SetOriginalURI nsCOMPtr problem.

This commit is contained in:
warren%netscape.com 2000-03-29 06:43:04 +00:00
Родитель e8f86ff0c8
Коммит 9a009d0b48
2 изменённых файлов: 2 добавлений и 2 удалений

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

@ -1201,7 +1201,7 @@ nsWebShell::DoLoadURL(nsIURI * aUri,
rv = NS_OpenURI(getter_AddRefs(pChannel), aUri, pNetService, loadGroup, requestor, aType);
if (NS_SUCCEEDED(rv)) {
// XXX wrong, but needed for now:
rv = pChannel->SetOriginalURI(referrer ? referrer : nsCOMPtr<nsIURI>(aUri));
rv = pChannel->SetOriginalURI(referrer ? referrer.get() : aUri);
}
if (NS_FAILED(rv)) {
if (rv == NS_ERROR_DOM_RETVAL_UNDEFINED) // if causing the channel changed the

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

@ -1201,7 +1201,7 @@ nsWebShell::DoLoadURL(nsIURI * aUri,
rv = NS_OpenURI(getter_AddRefs(pChannel), aUri, pNetService, loadGroup, requestor, aType);
if (NS_SUCCEEDED(rv)) {
// XXX wrong, but needed for now:
rv = pChannel->SetOriginalURI(referrer ? referrer : nsCOMPtr<nsIURI>(aUri));
rv = pChannel->SetOriginalURI(referrer ? referrer.get() : aUri);
}
if (NS_FAILED(rv)) {
if (rv == NS_ERROR_DOM_RETVAL_UNDEFINED) // if causing the channel changed the