--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
Control: block -1 by 1029206
Please unblock package gnome-builder. Note that this has to happen
together with #1029206: either both packages migrate or none will.
[ Reason ]
The new upstream stable branch of WebKitGTK has replaced the 5.0
version of the API (for GTK4 users) with version 6.0. The older API
was experimental but it was nevertheless used by a few packages, which
need to switch to the new API.
In Debian this affects three packages: evolution-data-server,
gnome-builder and gnome-initial-setup (#1033249).
[ Impact ]
Future security updates of WebKitGTK won't provide the 5.0 API so it
won't be possible to provide them if these packages don't switch to
the 6.0 API.
[ Tests ]
Tested manually, and verified that gnome-builder can launch a WebKit
web view normally, using the 6.0 API of WebKit.
[ Risks ]
>From this package's point of view the risks are small because we're
only doing the switch to the new WebKit API, which already happened
upstream.
[ Checklist ]
[x] all changes are documented in the d/changelog
[x] I reviewed all changes and I approve them
[x] attach debdiff against the package in testing
unblock gnome-builder/43.6-3
diff -Nru gnome-builder-43.6/debian/changelog gnome-builder-43.6/debian/changelog
--- gnome-builder-43.6/debian/changelog 2023-02-04 00:21:57.000000000 +0100
+++ gnome-builder-43.6/debian/changelog 2023-03-20 12:45:40.000000000 +0100
@@ -1,3 +1,20 @@
+gnome-builder (43.6-3) unstable; urgency=medium
+
+ * Team upload
+ * debian/control.in: depend on gir1.2-webkit-6.0 instead of 5.0
+ (Closes: #1033224)
+
+ -- Alberto Garcia <berto@igalia.com> Mon, 20 Mar 2023 12:45:40 +0100
+
+gnome-builder (43.6-2) unstable; urgency=medium
+
+ * debian/gbp.conf, debian/control.in: Branch for bookworm
+ * Cherry-pick patches from stable gnome-43 branch to build against
+ latest webkitgtk
+ * Build against webkitgtk 6.0 instead of 5.0
+
+ -- Jeremy Bicha <jbicha@ubuntu.com> Wed, 15 Mar 2023 20:29:37 -0400
+
gnome-builder (43.6-1) unstable; urgency=medium
* New upstream release
diff -Nru gnome-builder-43.6/debian/control gnome-builder-43.6/debian/control
--- gnome-builder-43.6/debian/control 2023-02-04 00:21:57.000000000 +0100
+++ gnome-builder-43.6/debian/control 2023-03-20 12:45:40.000000000 +0100
@@ -6,7 +6,7 @@
Section: editors
Priority: optional
Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
-Uploaders: Jeremy Bicha <jbicha@ubuntu.com>, Laurent Bigonville <bigon@debian.org>
+Uploaders: Alberto Garcia <berto@igalia.com>, Jeremy Bicha <jbicha@ubuntu.com>
Build-Depends: appstream-util,
at-spi2-core <!nocheck>,
ca-certificates <!nocheck>,
@@ -46,7 +46,7 @@
libtemplate-glib-1.0-dev (>= 3.36.0),
libvala-dev,
libvte-2.91-gtk4-dev (>= 0.70.0),
- libwebkit2gtk-5.0-dev,
+ libwebkitgtk-6.0-dev,
libxml2-dev (>= 2.9.0),
llvm,
llvm-dev,
@@ -62,8 +62,8 @@
Rules-Requires-Root: no
Standards-Version: 4.6.2
X-Ubuntu-Use-Langpack: yes
-Vcs-Browser: https://salsa.debian.org/gnome-team/gnome-builder
-Vcs-Git: https://salsa.debian.org/gnome-team/gnome-builder.git
+Vcs-Browser: https://salsa.debian.org/gnome-team/gnome-builder/tree/debian/bookworm
+Vcs-Git: https://salsa.debian.org/gnome-team/gnome-builder.git -b debian/bookworm
Homepage: https://wiki.gnome.org/Apps/Builder
Package: gnome-builder
@@ -77,7 +77,7 @@
gir1.2-jsonrpc-1.0 (>= 3.42.0),
gir1.2-panel-1 (>= 1.0.0),
gir1.2-peas-1.0 (>= 1.34.0),
- gir1.2-webkit2-5.0,
+ gir1.2-webkit-6.0,
python3-gi,
libvala-dev,
clang,
diff -Nru gnome-builder-43.6/debian/control.in gnome-builder-43.6/debian/control.in
--- gnome-builder-43.6/debian/control.in 2023-02-04 00:21:57.000000000 +0100
+++ gnome-builder-43.6/debian/control.in 2023-03-20 12:45:40.000000000 +0100
@@ -42,7 +42,7 @@
libtemplate-glib-1.0-dev (>= 3.36.0),
libvala-dev,
libvte-2.91-gtk4-dev (>= 0.70.0),
- libwebkit2gtk-5.0-dev,
+ libwebkitgtk-6.0-dev,
libxml2-dev (>= 2.9.0),
llvm,
llvm-dev,
@@ -58,8 +58,8 @@
Rules-Requires-Root: no
Standards-Version: 4.6.2
X-Ubuntu-Use-Langpack: yes
-Vcs-Browser: https://salsa.debian.org/gnome-team/gnome-builder
-Vcs-Git: https://salsa.debian.org/gnome-team/gnome-builder.git
+Vcs-Browser: https://salsa.debian.org/gnome-team/gnome-builder/tree/debian/bookworm
+Vcs-Git: https://salsa.debian.org/gnome-team/gnome-builder.git -b debian/bookworm
Homepage: https://wiki.gnome.org/Apps/Builder
Package: gnome-builder
@@ -73,7 +73,7 @@
gir1.2-jsonrpc-1.0 (>= 3.42.0),
gir1.2-panel-1 (>= 1.0.0),
gir1.2-peas-1.0 (>= 1.34.0),
- gir1.2-webkit2-5.0,
+ gir1.2-webkit-6.0,
python3-gi,
libvala-dev,
clang,
diff -Nru gnome-builder-43.6/debian/gbp.conf gnome-builder-43.6/debian/gbp.conf
--- gnome-builder-43.6/debian/gbp.conf 2023-02-04 00:21:57.000000000 +0100
+++ gnome-builder-43.6/debian/gbp.conf 2023-03-16 01:29:37.000000000 +0100
@@ -1,6 +1,6 @@
[DEFAULT]
pristine-tar = True
-debian-branch = debian/master
+debian-branch = debian/bookworm
upstream-branch = upstream/latest
[buildpackage]
diff -Nru gnome-builder-43.6/debian/patches/build-make-sure-configured-webkit-package-is-loaded.patch gnome-builder-43.6/debian/patches/build-make-sure-configured-webkit-package-is-loaded.patch
--- gnome-builder-43.6/debian/patches/build-make-sure-configured-webkit-package-is-loaded.patch 1970-01-01 01:00:00.000000000 +0100
+++ gnome-builder-43.6/debian/patches/build-make-sure-configured-webkit-package-is-loaded.patch 2023-03-16 01:29:37.000000000 +0100
@@ -0,0 +1,55 @@
+From: Christian Hergert <chergert@redhat.com>
+Date: Mon, 9 Jan 2023 20:29:17 -0800
+Subject: build: make sure configured webkit package is loaded
+
+This fixes loading of WebKit in Nightly builds so the proper 6.0 is used.
+
+(cherry picked from commit 9d0864c8cc2e3ebf1f7479b0ca47ba7afedca65c)
+---
+ meson.build | 2 ++
+ src/libide/gui/ide-application.c | 2 +-
+ src/libide/webkit/ide-webkit-plugin.c | 5 ++++-
+ 3 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index c399a24..5005f38 100644
+--- a/meson.build
++++ b/meson.build
+@@ -326,6 +326,8 @@ if get_option('webkit').enabled()
+ '',
+ ]
+ config_h.set_quoted('HAVE_WEBKIT', webkit_api)
++ config_h.set_quoted('PACKAGE_WEBKIT_GIR_NAME', webkit_gir.split('-')[0])
++ config_h.set_quoted('PACKAGE_WEBKIT_GIR_VERSION', webkit_gir.split('-')[1])
+ else
+ status += [
+ 'WebKit ................ : Disabled',
+diff --git a/src/libide/gui/ide-application.c b/src/libide/gui/ide-application.c
+index 9242c90..dfd7fc1 100644
+--- a/src/libide/gui/ide-application.c
++++ b/src/libide/gui/ide-application.c
+@@ -179,7 +179,7 @@ ide_application_load_typelibs (IdeApplication *self)
+ "Template", "1.0",
+ "Vte", "3.91",
+ #ifdef HAVE_WEBKIT
+- "WebKit2", "5.0",
++ PACKAGE_WEBKIT_GIR_NAME, PACKAGE_WEBKIT_GIR_VERSION,
+ #endif
+ "Ide", PACKAGE_ABI_S,
+ NULL))
+diff --git a/src/libide/webkit/ide-webkit-plugin.c b/src/libide/webkit/ide-webkit-plugin.c
+index 04d9077..e009d0e 100644
+--- a/src/libide/webkit/ide-webkit-plugin.c
++++ b/src/libide/webkit/ide-webkit-plugin.c
+@@ -41,7 +41,10 @@ _ide_webkit_register_types (PeasObjectModule *module)
+ g_type_ensure (WEBKIT_TYPE_WEB_VIEW);
+ g_type_ensure (IDE_TYPE_WEBKIT_PAGE);
+
+- if (!g_irepository_require (NULL, "WebKit2", "5.0", 0, &error))
++ if (!g_irepository_require (NULL,
++ PACKAGE_WEBKIT_GIR_NAME,
++ PACKAGE_WEBKIT_GIR_VERSION,
++ 0, &error))
+ g_warning ("%s", error->message);
+
+ context = webkit_web_context_get_default ();
diff -Nru gnome-builder-43.6/debian/patches/libide-webkit-handle-ABI-change-in-WebKit-for-favicon.patch gnome-builder-43.6/debian/patches/libide-webkit-handle-ABI-change-in-WebKit-for-favicon.patch
--- gnome-builder-43.6/debian/patches/libide-webkit-handle-ABI-change-in-WebKit-for-favicon.patch 1970-01-01 01:00:00.000000000 +0100
+++ gnome-builder-43.6/debian/patches/libide-webkit-handle-ABI-change-in-WebKit-for-favicon.patch 2023-03-16 01:29:37.000000000 +0100
@@ -0,0 +1,107 @@
+From: Christian Hergert <chergert@redhat.com>
+Date: Sun, 12 Mar 2023 14:45:12 -0700
+Subject: libide/webkit: handle ABI change in WebKit for favicon
+
+(cherry picked from commit b5322dc05713499bae8594a1bdaf8043ceb3b6f5)
+---
+ src/libide/webkit/ide-webkit-page.c | 70 ++++++++++++++++++-------------------
+ 1 file changed, 35 insertions(+), 35 deletions(-)
+
+diff --git a/src/libide/webkit/ide-webkit-page.c b/src/libide/webkit/ide-webkit-page.c
+index 3dc5bc7..afef376 100644
+--- a/src/libide/webkit/ide-webkit-page.c
++++ b/src/libide/webkit/ide-webkit-page.c
+@@ -75,50 +75,50 @@ transform_title_with_fallback (GBinding *binding,
+ return TRUE;
+ }
+
+-static gboolean
+-transform_cairo_surface_to_gicon (GBinding *binding,
+- const GValue *from_value,
+- GValue *to_value,
+- gpointer user_data)
++static GIcon *
++favicon_get_from_texture_scaled (GdkTexture *texture,
++ int width,
++ int height)
+ {
+- IdeWebkitPage *self = user_data;
+- cairo_surface_t *surface;
+- GdkPixbuf *pixbuf;
++ g_autoptr (GdkPixbuf) pixbuf = NULL;
+ int favicon_width;
+ int favicon_height;
+- int width;
+- int height;
+
+- g_assert (G_IS_BINDING (binding));
+- g_assert (G_VALUE_HOLDS_POINTER (from_value));
+- g_assert (G_VALUE_HOLDS_OBJECT (to_value));
+- g_assert (IDE_IS_WEBKIT_PAGE (self));
++ if (!texture)
++ return NULL;
+
+- /* No ownership transfer */
+- surface = g_value_get_pointer (from_value);
++ /* A size of (0, 0) means the original size of the favicon. */
++ if (width == 0 && height == 0)
++ return G_ICON (g_object_ref (texture));
+
+- if (surface == NULL)
+- {
+- g_value_take_object (to_value, g_themed_icon_new ("web-browser-symbolic"));
+- return TRUE;
+- }
++ favicon_width = gdk_texture_get_width (texture);
++ favicon_height = gdk_texture_get_height (texture);
++ if (favicon_width == width && favicon_height == height)
++ return G_ICON (g_object_ref (texture));
+
+- width = 16 * gtk_widget_get_scale_factor (GTK_WIDGET (self));
+- height = 16 * gtk_widget_get_scale_factor (GTK_WIDGET (self));
+- favicon_width = cairo_image_surface_get_width (surface);
+- favicon_height = cairo_image_surface_get_height (surface);
+- pixbuf = gdk_pixbuf_get_from_surface (surface, 0, 0, favicon_width, favicon_height);
++ pixbuf = gdk_pixbuf_get_from_texture (texture);
++ return G_ICON (gdk_pixbuf_scale_simple (pixbuf, width, height, GDK_INTERP_BILINEAR));
++}
+
+- if ((favicon_width != width || favicon_height != height))
+- {
+- GdkPixbuf *scaled_pixbuf = gdk_pixbuf_scale_simple (pixbuf, width, height, GDK_INTERP_BILINEAR);
+- g_object_unref (pixbuf);
+- pixbuf = scaled_pixbuf;
+- }
++static gboolean
++transform_texture_to_gicon (GBinding *binding,
++ const GValue *from_value,
++ GValue *to_value,
++ gpointer user_data)
++{
++ IdeWebkitPage *self = user_data;
++ GdkTexture *texture;
+
+- g_assert (!pixbuf || G_IS_ICON (pixbuf));
++ g_assert (G_IS_BINDING (binding));
++ g_assert (G_VALUE_HOLDS (from_value, GDK_TYPE_TEXTURE));
++ g_assert (G_VALUE_HOLDS_OBJECT (to_value));
++ g_assert (IDE_IS_WEBKIT_PAGE (self));
+
+- g_value_take_object (to_value, pixbuf);
++ if ((texture = g_value_get_object (from_value)))
++ g_value_take_object (to_value,
++ favicon_get_from_texture_scaled (texture,
++ 16 * gtk_widget_get_scale_factor (GTK_WIDGET (self)),
++ 16 * gtk_widget_get_scale_factor (GTK_WIDGET (self))));
+
+ return TRUE;
+ }
+@@ -470,7 +470,7 @@ ide_webkit_page_init (IdeWebkitPage *self)
+ transform_title_with_fallback,
+ NULL, self, NULL);
+ g_object_bind_property_full (priv->web_view, "favicon", self, "icon", 0,
+- transform_cairo_surface_to_gicon,
++ transform_texture_to_gicon,
+ NULL, self, NULL);
+
+ list = webkit_web_view_get_back_forward_list (priv->web_view);
diff -Nru gnome-builder-43.6/debian/patches/libide-webkit-manually-enable-the-favicon-database.patch gnome-builder-43.6/debian/patches/libide-webkit-manually-enable-the-favicon-database.patch
--- gnome-builder-43.6/debian/patches/libide-webkit-manually-enable-the-favicon-database.patch 1970-01-01 01:00:00.000000000 +0100
+++ gnome-builder-43.6/debian/patches/libide-webkit-manually-enable-the-favicon-database.patch 2023-03-16 01:29:37.000000000 +0100
@@ -0,0 +1,42 @@
+From: Michael Catanzaro <mcatanzaro@redhat.com>
+Date: Mon, 6 Feb 2023 09:31:57 -0600
+Subject: libide/webkit: manually enable the favicon database
+
+In WebKitGTK 2.39.6 and 2.39.7, the favicon database is enabled by
+default. But in all other versions, it is disabled by default.
+
+The new API for enabling the favicon database was added in 2.39.6, so we
+can use that for the WEBKIT_CHECK_VERSION, even though this code is a
+no-op before 2.39.8.
+
+(cherry picked from commit f7d8a394a4f1574d3a122afa3deb7431cd317e16)
+---
+ src/libide/webkit/ide-webkit-page.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/libide/webkit/ide-webkit-page.c b/src/libide/webkit/ide-webkit-page.c
+index 649fbd9..3dc5bc7 100644
+--- a/src/libide/webkit/ide-webkit-page.c
++++ b/src/libide/webkit/ide-webkit-page.c
+@@ -451,11 +451,21 @@ ide_webkit_page_init (IdeWebkitPage *self)
+ {
+ IdeWebkitPagePrivate *priv = ide_webkit_page_get_instance_private (self);
+ WebKitBackForwardList *list;
++#if WEBKIT_CHECK_VERSION(2, 39, 6)
++ WebKitNetworkSession *session;
++ WebKitWebsiteDataManager *manager;
++#endif
+
+ panel_widget_set_can_maximize (PANEL_WIDGET (self), TRUE);
+
+ gtk_widget_init_template (GTK_WIDGET (self));
+
++#if WEBKIT_CHECK_VERSION(2, 39, 6)
++ session = webkit_web_view_get_network_session (priv->web_view);
++ manager = webkit_network_session_get_website_data_manager (session);
++ webkit_website_data_manager_set_favicons_enabled (manager, TRUE);
++#endif
++
+ g_object_bind_property_full (priv->web_view, "title", self, "title", 0,
+ transform_title_with_fallback,
+ NULL, self, NULL);
diff -Nru gnome-builder-43.6/debian/patches/libide-webkit-update-for-removal-of-sandbox-API.patch gnome-builder-43.6/debian/patches/libide-webkit-update-for-removal-of-sandbox-API.patch
--- gnome-builder-43.6/debian/patches/libide-webkit-update-for-removal-of-sandbox-API.patch 1970-01-01 01:00:00.000000000 +0100
+++ gnome-builder-43.6/debian/patches/libide-webkit-update-for-removal-of-sandbox-API.patch 2023-03-16 01:29:37.000000000 +0100
@@ -0,0 +1,25 @@
+From: Michael Catanzaro <mcatanzaro@redhat.com>
+Date: Thu, 19 Jan 2023 20:05:18 -0600
+Subject: libide/webkit: update for removal of sandbox API
+
+WebKitGTK 2.39.5 contains an ABI break. The sandbox is now mandatory, so
+the API to enable/disable it is gone.
+
+(cherry picked from commit 52bd325910b146eb15ed572c3aa26001c398f403)
+---
+ src/libide/webkit/ide-webkit-plugin.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/libide/webkit/ide-webkit-plugin.c b/src/libide/webkit/ide-webkit-plugin.c
+index e009d0e..e16d6d7 100644
+--- a/src/libide/webkit/ide-webkit-plugin.c
++++ b/src/libide/webkit/ide-webkit-plugin.c
+@@ -48,6 +48,8 @@ _ide_webkit_register_types (PeasObjectModule *module)
+ g_warning ("%s", error->message);
+
+ context = webkit_web_context_get_default ();
++#if !WEBKIT_CHECK_VERSION(2, 39, 5)
+ webkit_web_context_set_sandbox_enabled (context, TRUE);
++#endif
+ webkit_web_context_set_favicon_database_directory (context, NULL);
+ }
diff -Nru gnome-builder-43.6/debian/patches/libide-webkit-update-for-WebKitGTK-2.39.6-2.39.7.patch gnome-builder-43.6/debian/patches/libide-webkit-update-for-WebKitGTK-2.39.6-2.39.7.patch
--- gnome-builder-43.6/debian/patches/libide-webkit-update-for-WebKitGTK-2.39.6-2.39.7.patch 1970-01-01 01:00:00.000000000 +0100
+++ gnome-builder-43.6/debian/patches/libide-webkit-update-for-WebKitGTK-2.39.6-2.39.7.patch 2023-03-16 01:29:37.000000000 +0100
@@ -0,0 +1,51 @@
+From: Christian Hergert <chergert@redhat.com>
+Date: Wed, 15 Mar 2023 17:09:03 -0700
+Subject: libide/webkit: update for WebKitGTK 2.39.6/2.39.7
+
+This is really confusing, but calling
+webkit_web_context_set_favicon_database_directory() with NULL enables
+the favicon database using WebKit's default directory. This function has
+been removed from WebKit, and the favicon database is enabled by default
+now, so there's no need to replace this code with anything else.
+
+P.S. This creates a mess, but all this code will disappear once you
+remove the WEBKIT_CHECK_VERSION guards. I've added them just to keep
+Builder's CI happy for now, since we can't add 2.39.7 to the runtime
+until applications are ready for it.
+
+# Conflicts:
+# src/libide/webkit/ide-webkit-plugin.c
+
+(cherry picked from commit e6ca9b2edbb1504f9d410310ba48d531c2a057d8)
+---
+ src/libide/webkit/ide-webkit-plugin.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/libide/webkit/ide-webkit-plugin.c b/src/libide/webkit/ide-webkit-plugin.c
+index e16d6d7..0c79d30 100644
+--- a/src/libide/webkit/ide-webkit-plugin.c
++++ b/src/libide/webkit/ide-webkit-plugin.c
+@@ -35,7 +35,9 @@ _IDE_EXTERN void _ide_webkit_register_types (PeasObjectModule *module);
+ void
+ _ide_webkit_register_types (PeasObjectModule *module)
+ {
++#if !WEBKIT_CHECK_VERSION(2, 39, 6)
+ WebKitWebContext *context;
++#endif
+ g_autoptr(GError) error = NULL;
+
+ g_type_ensure (WEBKIT_TYPE_WEB_VIEW);
+@@ -47,9 +49,13 @@ _ide_webkit_register_types (PeasObjectModule *module)
+ 0, &error))
+ g_warning ("%s", error->message);
+
++#if !WEBKIT_CHECK_VERSION(2, 39, 6)
+ context = webkit_web_context_get_default ();
++#endif
+ #if !WEBKIT_CHECK_VERSION(2, 39, 5)
+ webkit_web_context_set_sandbox_enabled (context, TRUE);
+ #endif
++#if !WEBKIT_CHECK_VERSION(2, 39, 6)
+ webkit_web_context_set_favicon_database_directory (context, NULL);
++#endif
+ }
diff -Nru gnome-builder-43.6/debian/patches/plugins-web-browser-work-around-Webkit-miss-initializatio.patch gnome-builder-43.6/debian/patches/plugins-web-browser-work-around-Webkit-miss-initializatio.patch
--- gnome-builder-43.6/debian/patches/plugins-web-browser-work-around-Webkit-miss-initializatio.patch 1970-01-01 01:00:00.000000000 +0100
+++ gnome-builder-43.6/debian/patches/plugins-web-browser-work-around-Webkit-miss-initializatio.patch 2023-03-16 01:29:37.000000000 +0100
@@ -0,0 +1,57 @@
+From: Christian Hergert <chergert@redhat.com>
+Date: Wed, 15 Mar 2023 17:10:54 -0700
+Subject: plugins/web-browser: work around Webkit miss-initialization
+
+Creating the WebKitWebView first ensures that webkitInitialize() is called
+so that internal assertions/invariants hold true.
+
+Works around https://bugs.webkit.org/show_bug.cgi?id=253858
+
+Fixes #2005
+
+# Conflicts:
+# src/plugins/web-browser/gbp-web-browser-workspace-addin.c
+
+(cherry picked from commit 30bb82b450993292fa72befa5823313ca3975119)
+---
+ .../web-browser/gbp-web-browser-workspace-addin.c | 18 ++++++++++++++----
+ 1 file changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/src/plugins/web-browser/gbp-web-browser-workspace-addin.c b/src/plugins/web-browser/gbp-web-browser-workspace-addin.c
+index 220bb91..824e1b5 100644
+--- a/src/plugins/web-browser/gbp-web-browser-workspace-addin.c
++++ b/src/plugins/web-browser/gbp-web-browser-workspace-addin.c
+@@ -1,6 +1,6 @@
+ /* gbp-web-browser-workspace-addin.c
+ *
+- * Copyright 2022 Christian Hergert <chergert@redhat.com>
++ * Copyright 2022-2023 Christian Hergert <chergert@redhat.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+@@ -161,12 +161,22 @@ gbp_web_browser_workspace_addin_restore_session_item (IdeWorkspaceAddin *addin,
+ */
+ bytes = g_bytes_new (data, n_elements);
+
++ /* Create the WebkitWebView _BEFORE_ we deserialize the session state or
++ * we risk Webkit assertions due to RunLoop::isMain() failure simply due
++ * to missing initialization paths.
++ *
++ * See #2005 and https://bugs.webkit.org/show_bug.cgi?id=253858
++ */
++ page = ide_webkit_page_new ();
++ view = ide_webkit_page_get_view (page);
++
+ if (!(state = webkit_web_view_session_state_new (bytes)))
+- IDE_EXIT;
++ {
++ g_object_unref (page);
++ IDE_EXIT;
++ }
+
+ position = ide_session_item_get_position (item);
+- page = ide_webkit_page_new ();
+- view = ide_webkit_page_get_view (page);
+
+ webkit_web_view_restore_session_state (WEBKIT_WEB_VIEW (view), state);
+
diff -Nru gnome-builder-43.6/debian/patches/series gnome-builder-43.6/debian/patches/series
--- gnome-builder-43.6/debian/patches/series 2023-02-04 00:21:57.000000000 +0100
+++ gnome-builder-43.6/debian/patches/series 2023-03-16 01:29:37.000000000 +0100
@@ -0,0 +1,6 @@
+build-make-sure-configured-webkit-package-is-loaded.patch
+libide-webkit-update-for-removal-of-sandbox-API.patch
+libide-webkit-update-for-WebKitGTK-2.39.6-2.39.7.patch
+libide-webkit-manually-enable-the-favicon-database.patch
+libide-webkit-handle-ABI-change-in-WebKit-for-favicon.patch
+plugins-web-browser-work-around-Webkit-miss-initializatio.patch
--- End Message ---