summaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-content_browser_browser__main__loop.cc
diff options
context:
space:
mode:
authorRene Ladan <rene@FreeBSD.org>2022-02-20 12:35:15 +0100
committerRene Ladan <rene@FreeBSD.org>2022-02-20 12:42:02 +0100
commita23dfd214ae04e8b4d116ca6411570b684eb5ed6 (patch)
treea42703b6563673398eee97ae6ad4d01eafd77738 /www/chromium/files/patch-content_browser_browser__main__loop.cc
parentgraphics/libglvnd: reduce dependency on gcc for everyone on powerpc64* by usi... (diff)
www/chromium: update to 98.0.4758.102
- The port now uses the combined patch set for OpenBSD and FreeBSD maintained by Robert Nagy. - Fix build on i386 again. Obtained from: Robert Nagy <robert@openbsd.org> Security: https://vuxml.freebsd.org/freebsd/e12432af-8e73-11ec-8bc4-3065ec8fd3ec.html Security: https://vuxml.freebsd.org/freebsd/e852f43c-846e-11ec-b043-3065ec8fd3ec.html
Diffstat (limited to 'www/chromium/files/patch-content_browser_browser__main__loop.cc')
-rw-r--r--www/chromium/files/patch-content_browser_browser__main__loop.cc47
1 files changed, 32 insertions, 15 deletions
diff --git a/www/chromium/files/patch-content_browser_browser__main__loop.cc b/www/chromium/files/patch-content_browser_browser__main__loop.cc
index 9991ccbf7bae..f5894fcc95f3 100644
--- a/www/chromium/files/patch-content_browser_browser__main__loop.cc
+++ b/www/chromium/files/patch-content_browser_browser__main__loop.cc
@@ -1,6 +1,32 @@
---- content/browser/browser_main_loop.cc.orig 2021-12-31 00:57:32 UTC
+--- content/browser/browser_main_loop.cc.orig 2022-02-07 13:39:41 UTC
+++ content/browser/browser_main_loop.cc
-@@ -552,7 +552,7 @@ int BrowserMainLoop::EarlyInitialization() {
+@@ -238,6 +238,12 @@
+ #include "mojo/public/cpp/bindings/lib/test_random_mojo_delays.h"
+ #endif
+
++#if defined(OS_BSD)
++#include "content/browser/sandbox_host_linux.h"
++#include "content/public/common/zygote/sandbox_support_linux.h"
++#include "sandbox/policy/sandbox.h"
++#endif
++
+ // One of the linux specific headers defines this as a macro.
+ #ifdef DestroyAll
+ #undef DestroyAll
+@@ -545,6 +551,12 @@ int BrowserMainLoop::EarlyInitialization() {
+ // by now since a thread to start the ServiceManager has been created
+ // before the browser main loop starts.
+ DCHECK(SandboxHostLinux::GetInstance()->IsInitialized());
++#elif defined(OS_BSD)
++ base::FileHandleMappingVector additional_remapped_fds;
++ base::LaunchOptions options;
++ SandboxHostLinux::GetInstance()->Init();
++ const int sfd = SandboxHostLinux::GetInstance()->GetChildSocket();
++ options.fds_to_remap.push_back(std::make_pair(sfd, GetSandboxFD()));
+ #endif
+
+ // GLib's spawning of new processes is buggy, so it's important that at this
+@@ -572,7 +584,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).
@@ -9,21 +35,12 @@
if (base::FeatureList::IsEnabled(
features::kBrowserUseDisplayThreadPriority) &&
base::PlatformThread::GetCurrentThreadPriority() <
-@@ -562,7 +562,7 @@ int BrowserMainLoop::EarlyInitialization() {
- }
+@@ -583,7 +595,7 @@ int BrowserMainLoop::EarlyInitialization() {
#endif // !defined(OS_MAC)
--#if defined(OS_MAC) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \
-+#if defined(OS_MAC) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) || \
- defined(OS_ANDROID)
+ #if defined(OS_MAC) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \
+- defined(OS_ANDROID)
++ defined(OS_ANDROID) || defined(OS_BSD)
// We use quite a few file descriptors for our IPC as well as disk the disk
// cache,and the default limit on the Mac is low (256), so bump it up.
-@@ -572,7 +572,7 @@ int BrowserMainLoop::EarlyInitialization() {
- // users can easily hit this limit with many open tabs. Bump up the limit to
- // an arbitrarily high number. See https://crbug.com/539567
- base::IncreaseFdLimitTo(8192);
--#endif // defined(OS_MAC) || defined(OS_LINUX) || defined(OS_CHROMEOS) ||
-+#endif // defined(OS_MAC) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) ||
- // defined(OS_ANDROID)
- #if defined(OS_WIN)