[epiphany/gnome-3-30] web-view: remove the previous extension weak pointer before setting a new one



commit ec60b894e2d098b01dc9608365c5f4c2db6285a9
Author: Carlos Garcia Campos <cgarcia igalia com>
Date:   Tue Sep 3 14:56:53 2019 +0200

    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

 embed/ephy-web-view.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 84fa0a49a..ef04e2783 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -889,6 +889,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);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]