diff options
Diffstat (limited to 'devel/electron29/files/patch-base_threading_platform__thread__posix.cc')
-rw-r--r-- | devel/electron29/files/patch-base_threading_platform__thread__posix.cc | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/devel/electron29/files/patch-base_threading_platform__thread__posix.cc b/devel/electron29/files/patch-base_threading_platform__thread__posix.cc new file mode 100644 index 000000000000..3705c054b4f3 --- /dev/null +++ b/devel/electron29/files/patch-base_threading_platform__thread__posix.cc @@ -0,0 +1,45 @@ +--- base/threading/platform_thread_posix.cc.orig 2024-02-21 00:20:30 UTC ++++ base/threading/platform_thread_posix.cc +@@ -78,12 +78,12 @@ void* ThreadFunc(void* params) { + if (!thread_params->joinable) + base::DisallowSingleton(); + +-#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(USE_STARSCAN) ++#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(USE_STARSCAN) && !BUILDFLAG(IS_BSD) + partition_alloc::internal::PCScan::NotifyThreadCreated( + partition_alloc::internal::GetStackPointer()); + #endif + +-#if !BUILDFLAG(IS_NACL) ++#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_BSD) + #if BUILDFLAG(IS_APPLE) + PlatformThread::SetCurrentThreadRealtimePeriodValue( + delegate->GetRealtimePeriod()); +@@ -357,7 +357,7 @@ bool PlatformThreadBase::CanChangeThreadType(ThreadTyp + + // static + bool PlatformThreadBase::CanChangeThreadType(ThreadType from, ThreadType to) { +-#if BUILDFLAG(IS_NACL) ++#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_BSD) + return false; + #else + if (from >= to) { +@@ -378,6 +378,9 @@ void SetCurrentThreadTypeImpl(ThreadType thread_type, + MessagePumpType pump_type_hint) { + #if BUILDFLAG(IS_NACL) + NOTIMPLEMENTED(); ++// avoid pledge(2) violation ++#elif BUILDFLAG(IS_BSD) ++ NOTIMPLEMENTED(); + #else + if (internal::SetCurrentThreadTypeForPlatform(thread_type, pump_type_hint)) + return; +@@ -400,7 +403,7 @@ ThreadPriorityForTest PlatformThreadBase::GetCurrentTh + + // static + ThreadPriorityForTest PlatformThreadBase::GetCurrentThreadPriorityForTest() { +-#if BUILDFLAG(IS_NACL) ++#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_BSD) + NOTIMPLEMENTED(); + return ThreadPriorityForTest::kNormal; + #else |