[epiphany/mcatanzaro/#1065] view-source-handler: complete request at most once
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/#1065] view-source-handler: complete request at most once
- Date: Wed, 22 Jan 2020 21:18:18 +0000 (UTC)
commit 6f60f4eb362592609103e501f4a7c661710c17cc
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Wed Jan 22 15:17:04 2020 -0600
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
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 f0ff4d23a..43fb9be17 100644
--- a/embed/ephy-view-source-handler.c
+++ b/embed/ephy-view-source-handler.c
@@ -155,8 +155,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]