diff options
Diffstat (limited to 'www/ungoogled-chromium/files/patch-content_utility_utility__main.cc')
-rw-r--r-- | www/ungoogled-chromium/files/patch-content_utility_utility__main.cc | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/www/ungoogled-chromium/files/patch-content_utility_utility__main.cc b/www/ungoogled-chromium/files/patch-content_utility_utility__main.cc index 1adb7c259825..4239a3025a30 100644 --- a/www/ungoogled-chromium/files/patch-content_utility_utility__main.cc +++ b/www/ungoogled-chromium/files/patch-content_utility_utility__main.cc @@ -1,6 +1,6 @@ ---- content/utility/utility_main.cc.orig 2023-10-13 13:20:35 UTC +--- content/utility/utility_main.cc.orig 2023-12-23 12:33:28 UTC +++ content/utility/utility_main.cc -@@ -34,7 +34,7 @@ +@@ -37,7 +37,7 @@ #include "third_party/icu/source/common/unicode/unistr.h" #include "third_party/icu/source/i18n/unicode/timezone.h" @@ -9,7 +9,7 @@ #include "base/file_descriptor_store.h" #include "base/files/file_util.h" #include "base/pickle.h" -@@ -42,7 +42,9 @@ +@@ -46,7 +46,9 @@ #include "content/utility/speech/speech_recognition_sandbox_hook_linux.h" #include "gpu/config/gpu_info_collector.h" #include "media/gpu/sandbox/hardware_video_encoding_sandbox_hook_linux.h" @@ -19,7 +19,7 @@ #include "services/audio/audio_sandbox_hook_linux.h" #include "services/network/network_sandbox_hook_linux.h" // gn check is not smart enough to realize that this include only applies to -@@ -54,10 +56,14 @@ +@@ -58,10 +60,14 @@ #endif #endif @@ -35,7 +35,7 @@ #if BUILDFLAG(IS_CHROMEOS_ASH) #include "chromeos/ash/components/assistant/buildflags.h" #include "chromeos/ash/services/ime/ime_sandbox_hook.h" -@@ -69,7 +75,7 @@ +@@ -73,7 +79,7 @@ #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if (BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) && \ @@ -44,7 +44,7 @@ #include "components/services/screen_ai/sandbox/screen_ai_sandbox_hook_linux.h" // nogncheck #endif -@@ -95,7 +101,7 @@ namespace content { +@@ -99,7 +105,7 @@ namespace content { namespace { @@ -53,7 +53,7 @@ std::vector<std::string> GetNetworkContextsParentDirectories() { base::MemoryMappedFile::Region region; base::ScopedFD read_pipe_fd = base::FileDescriptorStore::GetInstance().TakeFD( -@@ -123,7 +129,7 @@ std::vector<std::string> GetNetworkContextsParentDirec +@@ -127,7 +133,7 @@ std::vector<std::string> GetNetworkContextsParentDirec bool ShouldUseAmdGpuPolicy(sandbox::mojom::Sandbox sandbox_type) { const bool obtain_gpu_info = @@ -62,16 +62,26 @@ sandbox_type == sandbox::mojom::Sandbox::kHardwareVideoDecoding || #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) sandbox_type == sandbox::mojom::Sandbox::kHardwareVideoEncoding; -@@ -239,7 +245,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -248,7 +254,8 @@ int UtilityMain(MainFunctionParams parameters) { } } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ++// XXX BSD ++#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !BUILDFLAG(IS_BSD) + // Thread type delegate of the process should be registered before + // first thread type change in ChildProcess constructor. + // It also needs to be registered before the process has multiple threads, +@@ -259,7 +266,7 @@ int UtilityMain(MainFunctionParams parameters) { + } + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + +-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) // Initializes the sandbox before any threads are created. // TODO(jorgelo): move this after GTK initialization when we enable a strict // Seccomp-BPF policy. -@@ -268,7 +274,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -288,7 +295,7 @@ int UtilityMain(MainFunctionParams parameters) { pre_sandbox_hook = base::BindOnce(&screen_ai::ScreenAIPreSandboxHook); break; #endif @@ -80,7 +90,7 @@ case sandbox::mojom::Sandbox::kHardwareVideoDecoding: pre_sandbox_hook = base::BindOnce(&media::HardwareVideoDecodingPreSandboxHook); -@@ -295,6 +301,7 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -315,6 +322,7 @@ int UtilityMain(MainFunctionParams parameters) { default: break; } @@ -88,7 +98,7 @@ if (!sandbox::policy::IsUnsandboxedSandboxType(sandbox_type) && (parameters.zygote_child || !pre_sandbox_hook.is_null())) { sandbox::policy::SandboxLinux::Options sandbox_options; -@@ -303,6 +310,11 @@ int UtilityMain(MainFunctionParams parameters) { +@@ -323,6 +331,11 @@ int UtilityMain(MainFunctionParams parameters) { sandbox::policy::Sandbox::Initialize( sandbox_type, std::move(pre_sandbox_hook), sandbox_options); } |