Fix Eclipse after update to 2.36.5

Related: #2061996
This commit is contained in:
Michael Catanzaro 2022-08-02 09:51:17 -05:00
parent ad58495496
commit 0697ad9887
2 changed files with 68 additions and 1 deletions

60
is-main-thread.patch Normal file
View File

@ -0,0 +1,60 @@
From 336ebea6d24e8ddda8c33a91c8cd039a7ae8326f Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@redhat.com>
Date: Mon, 1 Aug 2022 11:45:42 -0500
Subject: [PATCH] Revert changes to isMainThread
This introduced a regression:
https://bugs.webkit.org/show_bug.cgi?id=243401
---
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
--
2.36.1

View File

@ -17,7 +17,7 @@
Name: webkit2gtk3
Version: 2.36.5
Release: 1%{?dist}
Release: 2%{?dist}
Summary: GTK Web content engine library
License: LGPLv2
@ -35,6 +35,9 @@ Source2: webkitgtk-keys.gpg
Patch0: aarch64-page-size.patch
%endif
# https://bugs.webkit.org/show_bug.cgi?id=243401
Patch1: is-main-thread.patch
BuildRequires: bison
BuildRequires: bubblewrap
BuildRequires: cmake
@ -320,6 +323,10 @@ export NINJA_STATUS="[%f/%t][%e] "
%endif
%changelog
* Tue Aug 02 2022 Michael Catanzaro <mcatanzaro@redhat.com> - 2.36.5-2
- Fix Eclipse after update to 2.36.5
Related: #2061996
* Thu Jul 28 2022 Michael Catanzaro <mcatanzaro@redhat.com> - 2.36.5-1
- Update to 2.36.5
Related: #2061996