aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-08-13 19:08:34 +0800
committerChristian Persch <chpe@src.gnome.org>2005-08-13 19:08:34 +0800
commit2837d6736fc3af78003dd23aee211053522274b7 (patch)
tree4e19c52597a3e1aa82c946da04f9597c579d9f00
parent08477cd1a9ef1958f993bb626339d6a96b85d0b8 (diff)
downloadgsoc2013-epiphany-2837d6736fc3af78003dd23aee211053522274b7.tar
gsoc2013-epiphany-2837d6736fc3af78003dd23aee211053522274b7.tar.gz
gsoc2013-epiphany-2837d6736fc3af78003dd23aee211053522274b7.tar.bz2
gsoc2013-epiphany-2837d6736fc3af78003dd23aee211053522274b7.tar.lz
gsoc2013-epiphany-2837d6736fc3af78003dd23aee211053522274b7.tar.xz
gsoc2013-epiphany-2837d6736fc3af78003dd23aee211053522274b7.tar.zst
gsoc2013-epiphany-2837d6736fc3af78003dd23aee211053522274b7.zip
Work around mozilla bug
2005-08-13 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/MozDownload.cpp: Work around mozilla bug https://bugzilla.mozilla.org/show_bug.cgi?id=304353 . Fixes bug #313215.
-rw-r--r--ChangeLog8
-rw-r--r--embed/mozilla/MozDownload.cpp28
2 files changed, 34 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6c6c014c5..82e298f6a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,12 @@
2005-08-13 Christian Persch <chpe@cvs.gnome.org>
+
+ * embed/mozilla/MozDownload.cpp:
+
+ Work around mozilla bug
+ https://bugzilla.mozilla.org/show_bug.cgi?id=304353 .
+ Fixes bug #313215.
+
+2005-08-13 Christian Persch <chpe@cvs.gnome.org>
* embed/ephy-favicon-cache.c: (ephy_favicon_cache_get):
* lib/ephy-dnd.c: (ephy_dnd_drag_data_get):
diff --git a/embed/mozilla/MozDownload.cpp b/embed/mozilla/MozDownload.cpp
index b2b7e0e2e..787cc7c5c 100644
--- a/embed/mozilla/MozDownload.cpp
+++ b/embed/mozilla/MozDownload.cpp
@@ -369,10 +369,34 @@ MozDownload::OnStateChange (nsIWebProgress *aWebProgress, nsIRequest *aRequest,
}
/* We will get this even in the event of a cancel */
+ /* Due to a mozilla bug [https://bugzilla.mozilla.org/show_bug.cgi?id=304353],
+ * we'll only get STATE_STOP if we're driven from external app handler; elsewhere
+ * we get STATE_STOP | STATE_IS_NETWORK | STATE_IS_REQUEST. So check first if
+ * STATE_IS_REQUEST is set.
+ */
/* 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))
+ * and many lonely STOP events may be triggered before.
+ */
+#ifdef GNOME_ENABLE_DEBUG
+{
+ nsEmbedCString spec;
+ if (mSource) mSource->GetSpec(spec);
+
+ LOG ("url %s, status %x, state %x (is-stop:%s, is-network:%s, is-request:%s)",
+ spec.get(), aStatus, aStateFlags,
+ aStateFlags & STATE_STOP ? "t" : "f",
+ aStateFlags & STATE_IS_NETWORK ? "t" : "f",
+ aStateFlags & STATE_IS_REQUEST ? "t" : "f");
+}
+#endif
+
+ if (((aStateFlags & STATE_IS_REQUEST) &&
+ (aStateFlags & STATE_IS_NETWORK) &&
+ (aStateFlags & STATE_STOP)) ||
+ aStateFlags == STATE_STOP)
{
+ LOG ("STATE_STOP");
+
/* Keep us alive */
nsCOMPtr<nsITransfer> kungFuDeathGrip(this);