aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla')
-rw-r--r--embed/mozilla/ProgressListener.cpp18
-rw-r--r--embed/mozilla/mozilla-embed-persist.cpp11
-rw-r--r--embed/mozilla/mozilla-embed-persist.h2
3 files changed, 27 insertions, 4 deletions
diff --git a/embed/mozilla/ProgressListener.cpp b/embed/mozilla/ProgressListener.cpp
index 039e9af40..f0d719669 100644
--- a/embed/mozilla/ProgressListener.cpp
+++ b/embed/mozilla/ProgressListener.cpp
@@ -647,6 +647,9 @@ nsresult GProgressListener::Resume (void)
nsresult GProgressListener::Abort (void)
{
+ PRBool notify;
+
+ notify = (mAction == ACTION_OBJECT_NOTIFY);
mAction = ACTION_NONE;
if (mIsPaused)
@@ -666,17 +669,24 @@ nsresult GProgressListener::Abort (void)
if (mPersist)
{
- return mPersist->CancelSave ();
+ mPersist->CancelSave ();
}
-
- if (mLauncher)
+ else if (mLauncher)
{
- return mLauncher->Cancel ();
+ mLauncher->Cancel ();
}
else
{
return NS_ERROR_FAILURE;
}
+
+ if (notify)
+ {
+ mozilla_embed_persist_cancelled
+ (MOZILLA_EMBED_PERSIST (mEphyPersist));
+ }
+
+ return NS_OK;
}
NS_DEF_FACTORY (GProgressListener, GProgressListener);
diff --git a/embed/mozilla/mozilla-embed-persist.cpp b/embed/mozilla/mozilla-embed-persist.cpp
index a2db4ac4a..2b19bcc69 100644
--- a/embed/mozilla/mozilla-embed-persist.cpp
+++ b/embed/mozilla/mozilla-embed-persist.cpp
@@ -122,6 +122,13 @@ void
mozilla_embed_persist_completed (MozillaEmbedPersist *persist)
{
g_signal_emit_by_name (persist, "completed");
+ g_object_unref (persist);
+}
+
+void
+mozilla_embed_persist_cancelled (MozillaEmbedPersist *persist)
+{
+ g_object_unref (persist);
}
static gresult
@@ -133,6 +140,8 @@ impl_cancel (EphyEmbedPersist *persist)
bpersist->CancelSave ();
+ g_object_unref (persist);
+
return G_OK;
}
@@ -147,6 +156,8 @@ impl_save (EphyEmbedPersist *persist)
EphyEmbed *embed;
EmbedPersistFlags flags;
EphyWrapper *wrapper = NULL;
+
+ g_object_ref (persist);
g_object_get (persist,
"source", &uri,
diff --git a/embed/mozilla/mozilla-embed-persist.h b/embed/mozilla/mozilla-embed-persist.h
index d65170eda..7abd11e68 100644
--- a/embed/mozilla/mozilla-embed-persist.h
+++ b/embed/mozilla/mozilla-embed-persist.h
@@ -53,6 +53,8 @@ GType mozilla_embed_persist_get_type (void);
void mozilla_embed_persist_completed (MozillaEmbedPersist *persist);
+void mozilla_embed_persist_cancelled (MozillaEmbedPersist *persist);
+
G_END_DECLS
#endif