aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--embed/mozilla/MozDownload.cpp4
-rw-r--r--embed/mozilla/mozilla-embed.cpp3
3 files changed, 16 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 94c82c7cb..6d2e77f74 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+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.
+
2005-08-10 Christian Persch <chpe@cvs.gnome.org>
* configure.ac:
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);
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp
index 80aa77d26..7344241a9 100644
--- a/embed/mozilla/mozilla-embed.cpp
+++ b/embed/mozilla/mozilla-embed.cpp
@@ -226,7 +226,6 @@ static void
mozilla_embed_realize (GtkWidget *widget)
{
MozillaEmbedPrivate *mpriv = MOZILLA_EMBED (widget)->priv;
- GtkBin *bin = GTK_BIN (widget);
GTK_WIDGET_CLASS (parent_class)->realize (widget);
@@ -269,7 +268,7 @@ mozilla_embed_realize (GtkWidget *widget)
if (mpriv->focus_connected) return;
- GtkWidget *child = gtk_bin_get_child (bin);
+ GtkWidget *child = gtk_bin_get_child (GTK_BIN (widget));
g_return_if_fail (child != NULL);
n = g_signal_handlers_block_matched (child,