[epiphany/gnome-3-32] view-source-handler: complete request at most once
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-32] view-source-handler: complete request at most once
- Date: Wed, 29 Jan 2020 03:59:20 +0000 (UTC)
commit b79d3896761a10ec5ddd3f63f8feebcb7c8a6b5c
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Wed Jan 22 21:17:04 2020 +0000
view-source-handler: complete request at most once
If we fail to disconnect the signal after the page loads, it could start
another load on its own using JS, which would be a disaster because we
already freed the EphyViewSourceRequest after the first load.
Hopefully fixes #1065
(cherry picked from commit 65a97fecee6a8db32316fe1bb3aa7faea4e5892a)
embed/ephy-view-source-handler.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/embed/ephy-view-source-handler.c b/embed/ephy-view-source-handler.c
index 3b7fbda10..d1e4e6d2c 100644
--- a/embed/ephy-view-source-handler.c
+++ b/embed/ephy-view-source-handler.c
@@ -158,8 +158,12 @@ load_changed_cb (WebKitWebView *web_view,
WebKitLoadEvent load_event,
EphyViewSourceRequest *request)
{
- if (load_event == WEBKIT_LOAD_FINISHED)
+ if (load_event == WEBKIT_LOAD_FINISHED) {
+ g_signal_handler_disconnect (request->web_view, request->load_changed_id);
+ request->load_changed_id = 0;
+
ephy_view_source_request_begin_get_source_from_web_view (request, web_view);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]