Blame SOURCES/enable-sandbox.patch

e3f84e
From 87e5db488d509fb3f88fdd5aed3d58afcc930814 Mon Sep 17 00:00:00 2001
e3f84e
From: Felipe Borges <felipeborges@gnome.org>
e3f84e
Date: Mon, 4 Apr 2022 10:06:07 +0200
e3f84e
Subject: [PATCH] Enable webkit sandbox on GApplication.startup
e3f84e
e3f84e
This needs to be done only once, so this is a good place for it.
e3f84e
e3f84e
In commit 3fcb670f7385 we enabled it using Gjs "static" syntax, which
e3f84e
is not available in Gjs versions older than 1.71.1.
e3f84e
https://gitlab.gnome.org/GNOME/gjs/-/blob/70552bee79f644836a5e9f9a54845791b1ef7a94/NEWS#L67
e3f84e
e3f84e
Let's enable it on GApplication.startup for GNOME 41.
e3f84e
e3f84e
Fixes #81
e3f84e
---
e3f84e
 src/ui/application.js | 3 +++
e3f84e
 1 file changed, 3 insertions(+)
e3f84e
e3f84e
diff --git a/src/ui/application.js b/src/ui/application.js
e3f84e
index 53fe2b4..f84a9bc 100644
e3f84e
--- a/src/ui/application.js
e3f84e
+++ b/src/ui/application.js
e3f84e
@@ -85,6 +85,9 @@ var Application = GObject.registerClass(class Application extends Gtk.Applicatio
e3f84e
     vfunc_startup() {
e3f84e
         super.vfunc_startup();
e3f84e
 
e3f84e
+        // Enable web process sandbox
e3f84e
+        WebKit2.WebContext.get_default().set_sandbox_enabled(true);
e3f84e
+
e3f84e
         this._defineStyleAndThemes();
e3f84e
     }
e3f84e
 
e3f84e
-- 
e3f84e
GitLab
e3f84e