diff --git a/modules/libpr0n/decoders/icon/nsIconDecoder.cpp b/modules/libpr0n/decoders/icon/nsIconDecoder.cpp index 1c75809440c2..cfcef93bb9a2 100644 --- a/modules/libpr0n/decoders/icon/nsIconDecoder.cpp +++ b/modules/libpr0n/decoders/icon/nsIconDecoder.cpp @@ -56,7 +56,8 @@ NS_IMETHODIMP nsIconDecoder::Init(imgIRequest *aRequest) mObserver = do_QueryInterface(aRequest); // we're holding 2 strong refs to the request. - aRequest->GetImage(getter_AddRefs(mImage)); + mImage = do_CreateInstance("@mozilla.org/image/container;1"); + aRequest->SetImage(mImage); mFrame = do_CreateInstance("@mozilla.org/gfx/image/frame;2"); if (!mFrame) return NS_ERROR_FAILURE; diff --git a/modules/libpr0n/decoders/icon/nsIconProtocolHandler.cpp b/modules/libpr0n/decoders/icon/nsIconProtocolHandler.cpp index 348ac000edb7..7fe37c992654 100644 --- a/modules/libpr0n/decoders/icon/nsIconProtocolHandler.cpp +++ b/modules/libpr0n/decoders/icon/nsIconProtocolHandler.cpp @@ -28,6 +28,7 @@ #include "nsCOMPtr.h" #include "nsIComponentManager.h" #include "nsIServiceManager.h" +#include "nsNetCID.h" static NS_DEFINE_CID(kStandardURICID, NS_STANDARDURL_CID); diff --git a/modules/libpr0n/decoders/icon/nsIconURI.cpp b/modules/libpr0n/decoders/icon/nsIconURI.cpp index f469eb2ead17..b907008596c5 100644 --- a/modules/libpr0n/decoders/icon/nsIconURI.cpp +++ b/modules/libpr0n/decoders/icon/nsIconURI.cpp @@ -214,7 +214,15 @@ nsMozIconURI::SetPath(const char * aPath) NS_IMETHODIMP nsMozIconURI::Equals(nsIURI *other, PRBool *result) { - *result = PR_FALSE; + nsXPIDLCString spec1; + nsXPIDLCString spec2; + + other->GetSpec(getter_Copies(spec2)); + GetSpec(getter_Copies(spec1)); + if (!nsCRT::strcasecmp(spec1, spec2)) + *result = PR_TRUE; + else + *result = PR_FALSE; return NS_OK; } diff --git a/modules/libpr0n/decoders/icon/win/nsIconChannel.cpp b/modules/libpr0n/decoders/icon/win/nsIconChannel.cpp index 8dfae2ffdff2..34aabaf9c672 100644 --- a/modules/libpr0n/decoders/icon/win/nsIconChannel.cpp +++ b/modules/libpr0n/decoders/icon/win/nsIconChannel.cpp @@ -123,12 +123,6 @@ NS_IMETHODIMP nsIconChannel::GetURI(nsIURI* *aURI) return NS_OK; } -NS_IMETHODIMP nsIconChannel::SetURI(nsIURI* aURI) -{ - mUrl = aURI; - return NS_OK; -} - NS_IMETHODIMP nsIconChannel::Open(nsIInputStream **_retval) { @@ -308,7 +302,7 @@ NS_IMETHODIMP nsIconChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports nsCOMPtr inputStr (do_QueryInterface(streamSupports)); aListener->OnDataAvailable(this, ctxt, inputStr, 0, iconBuffer.Length()); - aListener->OnStopRequest(this, ctxt, NS_OK, nsnull); + aListener->OnStopRequest(this, ctxt, NS_OK); } // if we got valid bits for the main bitmap mask @@ -323,13 +317,13 @@ NS_IMETHODIMP nsIconChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports return NS_OK; } -NS_IMETHODIMP nsIconChannel::GetLoadAttributes(PRUint32 *aLoadAttributes) +NS_IMETHODIMP nsIconChannel::GetLoadFlags(PRUint32 *aLoadAttributes) { *aLoadAttributes = mLoadAttributes; return NS_OK; } -NS_IMETHODIMP nsIconChannel::SetLoadAttributes(PRUint32 aLoadAttributes) +NS_IMETHODIMP nsIconChannel::SetLoadFlags(PRUint32 aLoadAttributes) { mLoadAttributes = aLoadAttributes; return NS_OK;