get rid of more setpriority(2) to avoid pledge violations
This commit is contained in:
parent
70a1a50571
commit
150b9ca0b0
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.98 2020/04/02 15:11:56 robert Exp $
|
||||
# $OpenBSD: Makefile,v 1.99 2020/04/05 09:02:19 robert Exp $
|
||||
|
||||
.include <bsd.port.arch.mk>
|
||||
|
||||
@ -13,6 +13,7 @@ DPB_PROPERTIES= lonesome
|
||||
COMMENT= Iridium browser
|
||||
|
||||
V= 2020.03.80
|
||||
REVISION= 0
|
||||
|
||||
DISTNAME= iridium-browser-${V}
|
||||
PKGNAME= iridium-${V}
|
||||
|
@ -0,0 +1,23 @@
|
||||
$OpenBSD: patch-components_startup_metric_utils_browser_startup_metric_utils_cc,v 1.1 2020/04/05 09:02:19 robert Exp $
|
||||
|
||||
Index: components/startup_metric_utils/browser/startup_metric_utils.cc
|
||||
--- components/startup_metric_utils/browser/startup_metric_utils.cc.orig
|
||||
+++ components/startup_metric_utils/browser/startup_metric_utils.cc
|
||||
@@ -305,7 +305,7 @@ base::TimeTicks StartupTimeToTimeTicks(base::Time time
|
||||
|
||||
// Enabling this logic on OS X causes a significant performance regression.
|
||||
// https://crbug.com/601270
|
||||
-#if !defined(OS_MACOSX)
|
||||
+#if !defined(OS_MACOSX) && !defined(OS_BSD)
|
||||
static bool statics_initialized = false;
|
||||
|
||||
base::ThreadPriority previous_priority = base::ThreadPriority::NORMAL;
|
||||
@@ -319,7 +319,7 @@ base::TimeTicks StartupTimeToTimeTicks(base::Time time
|
||||
static const base::Time time_base = base::Time::Now();
|
||||
static const base::TimeTicks trace_ticks_base = base::TimeTicks::Now();
|
||||
|
||||
-#if !defined(OS_MACOSX)
|
||||
+#if !defined(OS_MACOSX) && !defined(OS_BSD)
|
||||
if (!statics_initialized) {
|
||||
base::PlatformThread::SetCurrentThreadPriority(previous_priority);
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-content_browser_browser_main_loop_cc,v 1.23 2020/04/02 15:11:58 robert Exp $
|
||||
$OpenBSD: patch-content_browser_browser_main_loop_cc,v 1.24 2020/04/05 09:02:19 robert Exp $
|
||||
|
||||
Index: content/browser/browser_main_loop.cc
|
||||
--- content/browser/browser_main_loop.cc.orig
|
||||
@ -29,3 +29,12 @@ Index: content/browser/browser_main_loop.cc
|
||||
#endif
|
||||
|
||||
#if defined(USE_X11)
|
||||
@@ -638,7 +650,7 @@ int BrowserMainLoop::EarlyInitialization() {
|
||||
|
||||
// Up the priority of the UI thread unless it was already high (since Mac
|
||||
// and recent versions of Android (O+) do this automatically).
|
||||
-#if !defined(OS_MACOSX)
|
||||
+#if !defined(OS_MACOSX) && !defined(OS_BSD)
|
||||
if (base::FeatureList::IsEnabled(
|
||||
features::kBrowserUseDisplayThreadPriority) &&
|
||||
base::PlatformThread::GetCurrentThreadPriority() <
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-content_gpu_gpu_main_cc,v 1.23 2020/04/02 15:11:58 robert Exp $
|
||||
$OpenBSD: patch-content_gpu_gpu_main_cc,v 1.24 2020/04/05 09:02:19 robert Exp $
|
||||
|
||||
Index: content/gpu/gpu_main.cc
|
||||
--- content/gpu/gpu_main.cc.orig
|
||||
@ -30,6 +30,15 @@ Index: content/gpu/gpu_main.cc
|
||||
return StartSandboxLinux(watchdog_thread, gpu_info, gpu_prefs);
|
||||
#elif defined(OS_WIN)
|
||||
return StartSandboxWindows(sandbox_info_);
|
||||
@@ -316,7 +316,7 @@ int GpuMain(const MainFunctionParams& parameters) {
|
||||
|
||||
base::PlatformThread::SetName("CrGpuMain");
|
||||
|
||||
-#if !defined(OS_MACOSX)
|
||||
+#if !defined(OS_MACOSX) && !defined(OS_BSD)
|
||||
if (base::FeatureList::IsEnabled(features::kGpuUseDisplayThreadPriority)) {
|
||||
// Set thread priority before sandbox initialization.
|
||||
base::PlatformThread::SetCurrentThreadPriority(
|
||||
@@ -409,17 +409,19 @@ int GpuMain(const MainFunctionParams& parameters) {
|
||||
|
||||
namespace {
|
||||
|
@ -0,0 +1,17 @@
|
||||
$OpenBSD: patch-third_party_blink_renderer_platform_graphics_begin_frame_provider_cc,v 1.1 2020/04/05 09:02:19 robert Exp $
|
||||
|
||||
Index: third_party/blink/renderer/platform/graphics/begin_frame_provider.cc
|
||||
--- third_party/blink/renderer/platform/graphics/begin_frame_provider.cc.orig
|
||||
+++ third_party/blink/renderer/platform/graphics/begin_frame_provider.cc
|
||||
@@ -61,7 +61,11 @@ void BeginFrameProvider::CreateCompositorFrameSinkIfNe
|
||||
|
||||
// Once we are using RAF, this thread is driving Display updates. Update
|
||||
// priority accordingly.
|
||||
+ // pledge(2)
|
||||
+ // stop this baloney
|
||||
+#if !defined(OS_OPENBSD)
|
||||
base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY);
|
||||
+#endif
|
||||
|
||||
mojo::Remote<mojom::blink::EmbeddedFrameSinkProvider> provider;
|
||||
Platform::Current()->GetInterfaceProvider()->GetInterface(
|
Loading…
Reference in New Issue
Block a user