[epiphany/pgriffis/web-extension-storage] WebExtensions: Destroy background page on disable
- From: Patrick Griffis <pgriffis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/pgriffis/web-extension-storage] WebExtensions: Destroy background page on disable
- Date: Tue, 24 May 2022 16:41:39 +0000 (UTC)
commit 90dea96639a1ea665596a6e66c234b3c13e4dced
Author: Patrick Griffis <pgriffis igalia com>
Date: Tue May 24 11:39:50 2022 -0500
WebExtensions: Destroy background page on disable
src/webextension/ephy-web-extension-manager.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/webextension/ephy-web-extension-manager.c b/src/webextension/ephy-web-extension-manager.c
index d48b5630c..71d6def44 100644
--- a/src/webextension/ephy-web-extension-manager.c
+++ b/src/webextension/ephy-web-extension-manager.c
@@ -201,7 +201,7 @@ ephy_web_extension_manager_constructed (GObject *object)
EphyWebExtensionManager *self = EPHY_WEB_EXTENSION_MANAGER (object);
g_autofree char *dir = g_build_filename (ephy_default_profile_dir (), "web_extensions", NULL);
- self->background_web_views = g_hash_table_new (NULL, NULL);
+ self->background_web_views = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL,
(GDestroyNotify)gtk_widget_destroy);
self->page_action_map = g_hash_table_new_full (NULL, NULL, NULL, (GDestroyNotify)g_hash_table_destroy);
self->browser_action_map = g_hash_table_new_full (NULL, NULL, NULL, (GDestroyNotify)destroy_widget_list);
self->web_extensions = NULL;
@@ -1068,6 +1068,7 @@ ephy_web_extension_manager_set_active (EphyWebExtensionManager *self,
run_background_script (self, web_extension);
} else {
g_hash_table_remove (self->browser_action_map, web_extension);
+ g_hash_table_remove (self->background_web_views, web_extension);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]