[epiphany/mcatanzaro/cancellables: 5/10] embed-shell: use cancellable where required
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/cancellables: 5/10] embed-shell: use cancellable where required
- Date: Tue, 17 Dec 2019 03:14:23 +0000 (UTC)
commit 7b6d20aef6ffa99119af744b325a0278fbb1e26f
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Mon Dec 16 18:13:28 2019 -0600
embed-shell: use cancellable where required
I was going to remove the cancellable, because it is unused, but it's
actually required here for safety.
embed/ephy-embed-shell.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index 9feee095d..7e0ac4ea9 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -541,7 +541,7 @@ got_snapshot_path_for_url_cb (EphySnapshotService *service,
snapshot = ephy_snapshot_service_get_snapshot_path_for_url_finish (service, result, &error);
if (snapshot) {
ephy_embed_shell_set_thumbnail_path (ephy_embed_shell_get_default (), url, snapshot);
- } else {
+ } else if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
/* Bad luck, not something to warn about. */
g_info ("Failed to get snapshot for URL %s: %s", url, error->message);
}
@@ -553,6 +553,7 @@ void
ephy_embed_shell_schedule_thumbnail_update (EphyEmbedShell *shell,
EphyHistoryURL *url)
{
+ EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell);
EphySnapshotService *service;
const char *snapshot;
@@ -564,7 +565,7 @@ ephy_embed_shell_schedule_thumbnail_update (EphyEmbedShell *shell,
} else {
ephy_snapshot_service_get_snapshot_path_for_url_async (service,
url->url,
- NULL,
+ priv->cancellable,
(GAsyncReadyCallback)got_snapshot_path_for_url_cb,
g_strdup (url->url));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]