From 9a009d0b4845473e232865e03b71fdef6e33c3d2 Mon Sep 17 00:00:00 2001 From: "warren%netscape.com" Date: Wed, 29 Mar 2000 06:43:04 +0000 Subject: [PATCH] Better fix for SetOriginalURI nsCOMPtr problem. --- docshell/base/nsWebShell.cpp | 2 +- webshell/src/nsWebShell.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docshell/base/nsWebShell.cpp b/docshell/base/nsWebShell.cpp index f5831206c182..e9420eb91f54 100644 --- a/docshell/base/nsWebShell.cpp +++ b/docshell/base/nsWebShell.cpp @@ -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(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 diff --git a/webshell/src/nsWebShell.cpp b/webshell/src/nsWebShell.cpp index f5831206c182..e9420eb91f54 100644 --- a/webshell/src/nsWebShell.cpp +++ b/webshell/src/nsWebShell.cpp @@ -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(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