Commit 58499c03 authored by Michael Catanzaro's avatar Michael Catanzaro

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 65a97fec)
parent 2aa5473a
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment