summaryrefslogtreecommitdiff
path: root/firefox-1.0-imgloader-comarray.patch
diff options
context:
space:
mode:
authorChristopher Aillon <caillon@fedoraproject.org>2005-07-17 15:32:51 +0000
committerChristopher Aillon <caillon@fedoraproject.org>2005-07-17 15:32:51 +0000
commit588a63d7b443ec4f70f543eaaf8231d5a3111f0c (patch)
tree6efa08b1bb9293b52391f149e587bb9ccaabc4d8 /firefox-1.0-imgloader-comarray.patch
parent- Add firefox-1.0-pango-cairo.patch to get rid of the last few Xft (diff)
downloadlibrewolf-fedora-ff-588a63d7b443ec4f70f543eaaf8231d5a3111f0c.tar.gz
librewolf-fedora-ff-588a63d7b443ec4f70f543eaaf8231d5a3111f0c.tar.bz2
librewolf-fedora-ff-588a63d7b443ec4f70f543eaaf8231d5a3111f0c.zip
- Avoid a crash on 64bit platforms
- Use system NSPR
Diffstat (limited to 'firefox-1.0-imgloader-comarray.patch')
-rw-r--r--firefox-1.0-imgloader-comarray.patch74
1 files changed, 74 insertions, 0 deletions
diff --git a/firefox-1.0-imgloader-comarray.patch b/firefox-1.0-imgloader-comarray.patch
new file mode 100644
index 0000000..547e19a
--- /dev/null
+++ b/firefox-1.0-imgloader-comarray.patch
@@ -0,0 +1,74 @@
+Index: modules/libpr0n/src/imgLoader.cpp
+===================================================================
+RCS file: /cvsroot/mozilla/modules/libpr0n/src/imgLoader.cpp,v
+retrieving revision 1.78.2.2
+diff -d -u -p -r1.78.2.2 imgLoader.cpp
+--- modules/libpr0n/src/imgLoader.cpp 16 Aug 2004 18:06:37 -0000 1.78.2.2
++++ modules/libpr0n/src/imgLoader.cpp 15 Jul 2005 04:31:06 -0000
+@@ -896,7 +896,7 @@ void imgCacheValidator::AddProxy(imgRequ
+ // the network.
+ aProxy->AddToLoadGroup();
+
+- mProxies.AppendElement(aProxy);
++ mProxies.AppendObject(aProxy);
+ }
+
+ /** nsIRequestObserver methods **/
+@@ -909,13 +909,10 @@ NS_IMETHODIMP imgCacheValidator::OnStart
+ 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 @@ NS_IMETHODIMP imgCacheValidator::OnStart
+
+ 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);
+Index: modules/libpr0n/src/imgLoader.h
+===================================================================
+RCS file: /cvsroot/mozilla/modules/libpr0n/src/imgLoader.h,v
+retrieving revision 1.10.38.1
+diff -d -u -p -r1.10.38.1 imgLoader.h
+--- modules/libpr0n/src/imgLoader.h 16 Aug 2004 18:06:37 -0000 1.10.38.1
++++ modules/libpr0n/src/imgLoader.h 15 Jul 2005 04:31:06 -0000
+@@ -90,7 +90,7 @@ private:
+ * validate checker
+ */
+
+-#include "nsSupportsArray.h"
++#include "nsCOMArray.h"
+
+ class imgCacheValidator : public nsIStreamListener
+ {
+@@ -109,7 +109,7 @@ private:
+ nsCOMPtr<nsIStreamListener> mDestListener;
+
+ imgRequest *mRequest;
+- nsSupportsArray mProxies;
++ nsCOMArray<imgIRequest> mProxies;
+
+ void *mContext;
+ };
bgstack15