kalev / rpms / firefox

Forked from rpms/firefox 5 years ago
Clone
588a63d
Index: modules/libpr0n/src/imgLoader.cpp
588a63d
===================================================================
588a63d
RCS file: /cvsroot/mozilla/modules/libpr0n/src/imgLoader.cpp,v
588a63d
retrieving revision 1.78.2.2
588a63d
diff -d -u -p -r1.78.2.2 imgLoader.cpp
588a63d
--- modules/libpr0n/src/imgLoader.cpp	16 Aug 2004 18:06:37 -0000	1.78.2.2
588a63d
+++ modules/libpr0n/src/imgLoader.cpp	15 Jul 2005 04:31:06 -0000
588a63d
@@ -896,7 +896,7 @@ void imgCacheValidator::AddProxy(imgRequ
588a63d
   // the network.
588a63d
   aProxy->AddToLoadGroup();
588a63d
 
588a63d
-  mProxies.AppendElement(aProxy);
588a63d
+  mProxies.AppendObject(aProxy);
588a63d
 }
588a63d
 
588a63d
 /** nsIRequestObserver methods **/
588a63d
@@ -909,13 +909,10 @@ NS_IMETHODIMP imgCacheValidator::OnStart
588a63d
     PRBool isFromCache;
588a63d
     if (NS_SUCCEEDED(cacheChan->IsFromCache(&isFromCache)) && isFromCache) {
588a63d
 
588a63d
-      PRUint32 count;
588a63d
-      mProxies.Count(&count);
588a63d
+      PRUint32 count = mProxies.Count();
588a63d
       for (PRInt32 i = count-1; i>=0; i--) {
588a63d
-        imgRequestProxy *proxy;
588a63d
-        mProxies.GetElementAt(i, (nsISupports**)&proxy);
588a63d
+        imgRequestProxy *proxy = NS_STATIC_CAST(imgRequestProxy *, mProxies[i]);
588a63d
         mRequest->NotifyProxyListener(proxy);
588a63d
-        NS_RELEASE(proxy);
588a63d
       }
588a63d
 
588a63d
       mRequest->SetLoadId(mContext);
588a63d
@@ -964,14 +961,11 @@ NS_IMETHODIMP imgCacheValidator::OnStart
588a63d
 
588a63d
   mDestListener = NS_STATIC_CAST(nsIStreamListener*, pl);
588a63d
 
588a63d
-  PRUint32 count;
588a63d
-  mProxies.Count(&count);
588a63d
+  PRUint32 count = mProxies.Count();
588a63d
   for (PRInt32 i = count-1; i>=0; i--) {
588a63d
-    imgRequestProxy *proxy;
588a63d
-    mProxies.GetElementAt(i, (nsISupports**)&proxy);
588a63d
+    imgRequestProxy *proxy = NS_STATIC_CAST(imgRequestProxy *, mProxies[i]);
588a63d
     proxy->ChangeOwner(request);
588a63d
     request->NotifyProxyListener(proxy);
588a63d
-    NS_RELEASE(proxy);
588a63d
   }
588a63d
 
588a63d
   NS_RELEASE(request);
588a63d
Index: modules/libpr0n/src/imgLoader.h
588a63d
===================================================================
588a63d
RCS file: /cvsroot/mozilla/modules/libpr0n/src/imgLoader.h,v
588a63d
retrieving revision 1.10.38.1
588a63d
diff -d -u -p -r1.10.38.1 imgLoader.h
588a63d
--- modules/libpr0n/src/imgLoader.h	16 Aug 2004 18:06:37 -0000	1.10.38.1
588a63d
+++ modules/libpr0n/src/imgLoader.h	15 Jul 2005 04:31:06 -0000
588a63d
@@ -90,7 +90,7 @@ private:
588a63d
  * validate checker
588a63d
  */
588a63d
 
588a63d
-#include "nsSupportsArray.h"
588a63d
+#include "nsCOMArray.h"
588a63d
 
588a63d
 class imgCacheValidator : public nsIStreamListener
588a63d
 {
588a63d
@@ -109,7 +109,7 @@ private:
588a63d
   nsCOMPtr<nsIStreamListener> mDestListener;
588a63d
 
588a63d
   imgRequest *mRequest;
588a63d
-  nsSupportsArray mProxies;
588a63d
+  nsCOMArray<imgIRequest> mProxies;
588a63d
 
588a63d
   void *mContext;
588a63d
 };