From 1e1a7ce883a0222f4e7903affa53d947fc3babd1 Mon Sep 17 00:00:00 2001 From: "mstoltz%netscape.com" Date: Fri, 15 Sep 2000 21:12:36 +0000 Subject: [PATCH] Better bustage fix without leak r=scc --- modules/libjar/nsJARChannel.cpp | 6 +++--- netwerk/protocol/jar/src/nsJARChannel.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/libjar/nsJARChannel.cpp b/modules/libjar/nsJARChannel.cpp index 161e4315df4..c86cf613e3e 100644 --- a/modules/libjar/nsJARChannel.cpp +++ b/modules/libjar/nsJARChannel.cpp @@ -216,10 +216,10 @@ NS_IMETHODIMP nsJARChannel::GetOriginalURI(nsIURI* *aOriginalURI) { if (mOriginalURI) - *aOriginalURI = mOriginalURI.get(); + *aOriginalURI = mOriginalURI; else - mURI->QueryInterface(NS_GET_IID(nsIURI), (void**)aOriginalURI); - + *aOriginalURI = NS_STATIC_CAST(nsIURI*, mURI); + NS_IF_ADDREF(*aOriginalURI); return NS_OK; } diff --git a/netwerk/protocol/jar/src/nsJARChannel.cpp b/netwerk/protocol/jar/src/nsJARChannel.cpp index 161e4315df4..c86cf613e3e 100644 --- a/netwerk/protocol/jar/src/nsJARChannel.cpp +++ b/netwerk/protocol/jar/src/nsJARChannel.cpp @@ -216,10 +216,10 @@ NS_IMETHODIMP nsJARChannel::GetOriginalURI(nsIURI* *aOriginalURI) { if (mOriginalURI) - *aOriginalURI = mOriginalURI.get(); + *aOriginalURI = mOriginalURI; else - mURI->QueryInterface(NS_GET_IID(nsIURI), (void**)aOriginalURI); - + *aOriginalURI = NS_STATIC_CAST(nsIURI*, mURI); + NS_IF_ADDREF(*aOriginalURI); return NS_OK; }