From: "Matt Turner" <mattst88@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/webkit-gtk/, net-libs/webkit-gtk/files/
Date: Tue, 2 Aug 2022 20:17:10 +0000 (UTC) [thread overview]
Message-ID: <1659471413.93f9253163fced331c183be24b515b8c22666fa0.mattst88@gentoo> (raw)
commit: 93f9253163fced331c183be24b515b8c22666fa0
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 2 17:27:51 2022 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Aug 2 20:16:53 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93f92531
net-libs/webkit-gtk: Fix crash regression
Closes: https://bugs.gentoo.org/863008
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
net-libs/webkit-gtk/files/2.36.5-fix-crash.patch | 82 ++++++++++++++++++++++
...k-2.36.5.ebuild => webkit-gtk-2.36.5-r1.ebuild} | 2 +
2 files changed, 84 insertions(+)
diff --git a/net-libs/webkit-gtk/files/2.36.5-fix-crash.patch b/net-libs/webkit-gtk/files/2.36.5-fix-crash.patch
new file mode 100644
index 000000000000..0f676a942d06
--- /dev/null
+++ b/net-libs/webkit-gtk/files/2.36.5-fix-crash.patch
@@ -0,0 +1,82 @@
+https://bugs.gentoo.org/863008
+https://bugs.webkit.org/show_bug.cgi?id=243401
+
+From a6277d4834cce0dea2f999d4c06ffa57abfbb82d Mon Sep 17 00:00:00 2001
+From: Michael Catanzaro <mcatanzaro@redhat.com>
+Date: Mon, 1 Aug 2022 14:07:04 -0700
+Subject: [PATCH] REGRESSION(252485@main): [GTK]
+ webkit_web_context_get_default() crashes in Eclipse since webkit-gtk v2.36.5,
+ v2.36.4 was fine https://bugs.webkit.org/show_bug.cgi?id=243401
+
+Reviewed by Adrian Perez de Castro.
+
+Turns out WebKit's "main thread" may not actually be the real main
+thread. This is OK as long as it matches the GTK "main thread," and as
+long as the application is careful to iterate the default main context
+only on the WebKit/GTK "main thread," as as long as the application does
+not ever attempt to use these libraries on any other thread.
+
+The motivation to do this is if the programming language controls the
+real thread 1, as is the case with Java, where the Java main thread that
+applications can use to run GTK and WebKit is apparently not the same as
+the real main thread that's running the JVM. These applications have no
+control over what their "main thread" is, and it seems unkind to break
+them.
+
+I've checked in with the GTK developers, and consensus is that this
+is actually expected to work, so let's not break it.
+
+* Source/WTF/wtf/generic/MainThreadGeneric.cpp:
+(WTF::initializeMainThreadPlatform):
+(WTF::isMainThread):
+
+Canonical link: https://commits.webkit.org/253010@main
+---
+ Source/WTF/wtf/generic/MainThreadGeneric.cpp | 13 ++-----------
+ 1 file changed, 2 insertions(+), 11 deletions(-)
+
+diff --git a/Source/WTF/wtf/generic/MainThreadGeneric.cpp b/Source/WTF/wtf/generic/MainThreadGeneric.cpp
+index 3a9208b0f9ab..b51e2e456047 100644
+--- a/Source/WTF/wtf/generic/MainThreadGeneric.cpp
++++ b/Source/WTF/wtf/generic/MainThreadGeneric.cpp
+@@ -31,29 +31,22 @@
+ */
+
+ #include "config.h"
+-#if !OS(LINUX)
+ #include <pthread.h>
+-#endif
+ #if HAVE(PTHREAD_NP_H)
+ #include <pthread_np.h>
+ #endif
+-#if OS(LINUX)
+-#include <sys/syscall.h>
+-#include <sys/types.h>
+-#include <unistd.h>
+-#endif
+
+ #include <wtf/RunLoop.h>
+
+ namespace WTF {
+
+-#if !HAVE(PTHREAD_MAIN_NP) && !OS(LINUX)
++#if !HAVE(PTHREAD_MAIN_NP)
+ static pthread_t mainThread;
+ #endif
+
+ void initializeMainThreadPlatform()
+ {
+-#if !HAVE(PTHREAD_MAIN_NP) && !OS(LINUX)
++#if !HAVE(PTHREAD_MAIN_NP)
+ mainThread = pthread_self();
+ #endif
+ }
+@@ -62,8 +55,6 @@ bool isMainThread()
+ {
+ #if HAVE(PTHREAD_MAIN_NP)
+ return pthread_main_np();
+-#elif OS(LINUX)
+- return getpid() == static_cast<pid_t>(syscall(SYS_gettid));
+ #else
+ return pthread_equal(pthread_self(), mainThread);
+ #endif
diff --git a/net-libs/webkit-gtk/webkit-gtk-2.36.5.ebuild b/net-libs/webkit-gtk/webkit-gtk-2.36.5-r1.ebuild
similarity index 99%
rename from net-libs/webkit-gtk/webkit-gtk-2.36.5.ebuild
rename to net-libs/webkit-gtk/webkit-gtk-2.36.5-r1.ebuild
index ac5ee1a431b0..ad7b4de216cf 100644
--- a/net-libs/webkit-gtk/webkit-gtk-2.36.5.ebuild
+++ b/net-libs/webkit-gtk/webkit-gtk-2.36.5-r1.ebuild
@@ -153,6 +153,8 @@ pkg_setup() {
}
src_prepare() {
+ eapply "${FILESDIR}"/${PV}-fix-crash.patch
+
cmake_src_prepare
gnome2_src_prepare
}
next reply other threads:[~2022-08-02 20:17 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-02 20:17 Matt Turner [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-12-06 11:18 [gentoo-commits] repo/gentoo:master commit in: net-libs/webkit-gtk/, net-libs/webkit-gtk/files/ Sam James
2024-10-09 15:09 Michael Orlitzky
2024-06-25 16:45 Jakov Smolić
2024-04-20 11:42 Mart Raudsepp
2024-02-23 19:07 Sam James
2023-08-09 18:07 Matt Turner
2023-07-16 14:38 Matt Turner
2023-04-25 21:38 Matt Turner
2023-04-22 3:08 Matt Turner
2023-01-30 4:01 Sam James
2022-05-13 12:27 Matt Turner
2022-01-18 21:39 Mart Raudsepp
2022-01-05 16:22 Mart Raudsepp
2022-01-02 22:46 Mart Raudsepp
2021-05-31 2:00 Matt Turner
2021-05-12 22:00 Matt Turner
2020-11-27 20:54 Mart Raudsepp
2020-07-29 14:09 Mart Raudsepp
2020-07-19 6:00 Mart Raudsepp
2020-07-11 13:34 Mart Raudsepp
2020-01-31 19:19 Mart Raudsepp
2020-01-19 18:49 Mart Raudsepp
2019-11-23 19:28 Matt Turner
2019-10-29 22:22 Andreas Sturmlechner
2018-07-25 16:47 Mart Raudsepp
2017-10-29 22:11 Mart Raudsepp
2017-04-17 8:10 Mart Raudsepp
2016-08-27 20:20 Sergei Trofimovich
2015-08-25 0:45 Alexandre Rostovtsev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1659471413.93f9253163fced331c183be24b515b8c22666fa0.mattst88@gentoo \
--to=mattst88@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox