diff -Naur mozilla.orig/modules/libpr0n/src/imgLoader.cpp mozilla/modules/libpr0n/src/imgLoader.cpp --- mozilla.orig/modules/libpr0n/src/imgLoader.cpp 2005-08-06 23:45:47.000000000 +0200 +++ mozilla/modules/libpr0n/src/imgLoader.cpp 2005-08-06 23:51:25.000000000 +0200 @@ -896,7 +896,7 @@ // the network. aProxy->AddToLoadGroup(); - mProxies.AppendElement(aProxy); + mProxies.AppendObject(aProxy); } /** nsIRequestObserver methods **/ @@ -909,13 +909,10 @@ PRBool isFromCache; if (NS_SUCCEEDED(cacheChan->IsFromCache(&isFromCache)) && isFromCache) { - PRUint32 count; - mProxies.Count(&count); + PRUint32 count = mProxies.Count(); for (PRInt32 i = count-1; i>=0; i--) { - imgRequestProxy *proxy; - mProxies.GetElementAt(i, (nsISupports**)&proxy); + imgRequestProxy *proxy = NS_STATIC_CAST(imgRequestProxy *, mProxies[i]); mRequest->NotifyProxyListener(proxy); - NS_RELEASE(proxy); } mRequest->SetLoadId(mContext); @@ -964,14 +961,11 @@ mDestListener = NS_STATIC_CAST(nsIStreamListener*, pl); - PRUint32 count; - mProxies.Count(&count); + PRUint32 count = mProxies.Count(); for (PRInt32 i = count-1; i>=0; i--) { - imgRequestProxy *proxy; - mProxies.GetElementAt(i, (nsISupports**)&proxy); + imgRequestProxy *proxy = NS_STATIC_CAST(imgRequestProxy *, mProxies[i]); proxy->ChangeOwner(request); request->NotifyProxyListener(proxy); - NS_RELEASE(proxy); } NS_RELEASE(request); diff -Naur mozilla.orig/modules/libpr0n/src/imgLoader.h mozilla/modules/libpr0n/src/imgLoader.h --- mozilla.orig/modules/libpr0n/src/imgLoader.h 2005-08-06 23:45:47.000000000 +0200 +++ mozilla/modules/libpr0n/src/imgLoader.h 2005-08-06 23:48:22.000000000 +0200 @@ -90,7 +90,7 @@ * validate checker */ -#include "nsSupportsArray.h" +#include "nsCOMArray.h" class imgCacheValidator : public nsIStreamListener { @@ -109,7 +109,7 @@ nsCOMPtr mDestListener; imgRequest *mRequest; - nsSupportsArray mProxies; + nsCOMArray mProxies; void *mContext; };