diff options
author | Jean-François Rameau <jframeau@cvs.gnome.org> | 2005-08-11 00:27:46 +0800 |
---|---|---|
committer | Jean-François Rameau <jframeau@src.gnome.org> | 2005-08-11 00:27:46 +0800 |
commit | 9f39f8a12ea1b910ae3303f3ef38d6216171ec88 (patch) | |
tree | 5648474cd70a00969e9fd59352307e206b54e310 /embed/mozilla/MozDownload.cpp | |
parent | 3462935ff8e5902045057417bd606f91924f21b9 (diff) | |
download | gsoc2013-epiphany-9f39f8a12ea1b910ae3303f3ef38d6216171ec88.tar gsoc2013-epiphany-9f39f8a12ea1b910ae3303f3ef38d6216171ec88.tar.gz gsoc2013-epiphany-9f39f8a12ea1b910ae3303f3ef38d6216171ec88.tar.bz2 gsoc2013-epiphany-9f39f8a12ea1b910ae3303f3ef38d6216171ec88.tar.lz gsoc2013-epiphany-9f39f8a12ea1b910ae3303f3ef38d6216171ec88.tar.xz gsoc2013-epiphany-9f39f8a12ea1b910ae3303f3ef38d6216171ec88.tar.zst gsoc2013-epiphany-9f39f8a12ea1b910ae3303f3ef38d6216171ec88.zip |
Gecko send several STATE_STOP, but only the final one (completed) is of
2005-08-10 Jean-François Rameau <jframeau@cvs.gnome.org>
* embed/mozilla/MozDownload.cpp (OnStateChange):
Gecko send several STATE_STOP, but only the final one (completed)
is of interest (STATE_STOP&STATE_IS_NETWORK).
Fix crash with gecko 1.8 when downloading.
* embed/mozilla/mozilla-embed.cpp:
Fix compilation warning.
Diffstat (limited to 'embed/mozilla/MozDownload.cpp')
-rw-r--r-- | embed/mozilla/MozDownload.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/embed/mozilla/MozDownload.cpp b/embed/mozilla/MozDownload.cpp index 11978a8bb..b2b7e0e2e 100644 --- a/embed/mozilla/MozDownload.cpp +++ b/embed/mozilla/MozDownload.cpp @@ -369,7 +369,9 @@ MozDownload::OnStateChange (nsIWebProgress *aWebProgress, nsIRequest *aRequest, } /* We will get this even in the event of a cancel */ - if (aStateFlags & STATE_STOP) + /* Be careful that download is only completed when STATE_IS_NETWORK is set + and many lonely STOP events may be triggered before */ + if ((aStateFlags & STATE_STOP) && (aStateFlags & STATE_IS_NETWORK)) { /* Keep us alive */ nsCOMPtr<nsITransfer> kungFuDeathGrip(this); |