summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2019-09-03 14:56:53 +0200
committerMichael Catanzaro <mcatanzaro@gnome.org>2019-09-03 11:07:36 -0500
commit1a928aa8b13ca671cf18b282451f4353f76498b6 (patch)
tree85847beb3e90053416335afed7a662b24fdc98ba
parent88a0f90e67d84f8b95167c8ce9030bfe784f84c1 (diff)
downloadepiphany-1a928aa8b13ca671cf18b282451f4353f76498b6.tar.gz
web-view: remove the previous extension weak pointer before setting a new one
Now that WebKit has PSON enabled, it's possible to have different web processes for the same web view ID. When the view swaps processes, the page created signal is emitted in the new process, and a new web extension proxy is set. This might fix https://gitlab.gnome.org/GNOME/epiphany/issues/871
-rw-r--r--embed/ephy-web-view.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index a43ed8dc7..03b06da1c 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -891,6 +891,9 @@ page_created_cb (EphyEmbedShell *shell,
if (webkit_web_view_get_page_id (WEBKIT_WEB_VIEW (view)) != page_id)
return;
+ if (view->web_extension)
+ g_object_remove_weak_pointer (G_OBJECT (view->web_extension), (gpointer *)&view->web_extension);
+
view->web_extension = web_extension;
g_object_add_weak_pointer (G_OBJECT (view->web_extension), (gpointer *)&view->web_extension);