[epiphany/gnome-40] Fix some user content and user scripts leaks
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-40] Fix some user content and user scripts leaks
- Date: Sat, 16 Oct 2021 12:15:56 +0000 (UTC)
commit ed348e4b25c224b38a8f5eb5ced2044ffa66e898
Author: Michael Catanzaro <mcatanzaro redhat com>
Date: Fri Oct 15 16:33:12 2021 -0500
Fix some user content and user scripts leaks
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1020>
embed/ephy-web-view.c | 6 +++---
src/webextension/ephy-web-extension-manager.c | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index d107c153c..44b1786ba 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -4153,7 +4153,7 @@ ephy_web_view_class_init (EphyWebViewClass *klass)
static void
ephy_web_view_ucm_add_custom_scripts (WebKitUserContentManager *ucm)
{
- WebKitUserScript *script;
+ g_autoptr (WebKitUserScript) script = NULL;
g_autoptr (GBytes) youtube_js = NULL;
g_auto (GStrv) allow_list = NULL;
g_autoptr (GError) error = NULL;
@@ -4188,7 +4188,7 @@ GtkWidget *
ephy_web_view_new (void)
{
EphyEmbedShell *shell = ephy_embed_shell_get_default ();
- WebKitUserContentManager *ucm = webkit_user_content_manager_new ();
+ g_autoptr (WebKitUserContentManager) ucm = webkit_user_content_manager_new ();
ephy_embed_shell_register_ucm_handler (shell, ucm);
ephy_embed_prefs_register_ucm (ucm);
@@ -4207,7 +4207,7 @@ GtkWidget *
ephy_web_view_new_with_related_view (WebKitWebView *related_view)
{
EphyEmbedShell *shell = ephy_embed_shell_get_default ();
- WebKitUserContentManager *ucm = webkit_user_content_manager_new ();
+ g_autoptr (WebKitUserContentManager) ucm = webkit_user_content_manager_new ();
ephy_web_view_ucm_add_custom_scripts (ucm);
diff --git a/src/webextension/ephy-web-extension-manager.c b/src/webextension/ephy-web-extension-manager.c
index 4cf80a6b6..3ff9ca32d 100644
--- a/src/webextension/ephy-web-extension-manager.c
+++ b/src/webextension/ephy-web-extension-manager.c
@@ -620,7 +620,7 @@ static GtkWidget *
create_web_extensions_webview (EphyWebExtension *web_extension,
gboolean custom_web_context)
{
- WebKitUserContentManager *ucm;
+ g_autoptr (WebKitUserContentManager) ucm = NULL;
WebKitWebContext *web_context;
WebKitSettings *settings;
GtkWidget *web_view;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]