--- content/browser/renderer_host/render_process_host_impl.cc.orig 2024-05-21 18:07:39 UTC +++ content/browser/renderer_host/render_process_host_impl.cc @@ -225,7 +225,7 @@ #include "third_party/blink/public/mojom/android_font_lookup/android_font_lookup.mojom.h" #endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) #include #include "components/services/font/public/mojom/font_service.mojom.h" // nogncheck @@ -967,7 +967,7 @@ static constexpr size_t kUnknownPlatformProcessLimit = // to indicate failure and std::numeric_limits::max() to indicate // unlimited. size_t GetPlatformProcessLimit() { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) struct rlimit limit; if (getrlimit(RLIMIT_NPROC, &limit) != 0) return kUnknownPlatformProcessLimit; @@ -1153,7 +1153,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public IOThreadHostImpl& operator=(const IOThreadHostImpl& other) = delete; void SetPid(base::ProcessId child_pid) { -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) child_thread_type_switcher_.SetPid(child_pid); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) } @@ -1170,7 +1170,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public return; } -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) if (auto font_receiver = receiver.As()) { ConnectToFontService(std::move(font_receiver)); return; @@ -1264,7 +1264,7 @@ class RenderProcessHostImpl::IOThreadHostImpl : public std::unique_ptr binders_; mojo::Receiver receiver_{this}; -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD) mojo::Remote video_encode_accelerator_factory_remote_; ChildThreadTypeSwitcher child_thread_type_switcher_; @@ -3362,7 +3362,7 @@ void RenderProcessHostImpl::AppendRendererCommandLine( base::TimeTicks::UnixEpoch().since_origin().InMicroseconds())); } -#if BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_BSD) // Append `kDisableVideoCaptureUseGpuMemoryBuffer` flag if there is no support // for NV12 GPU memory buffer. if (switches::IsVideoCaptureUseGpuMemoryBufferEnabled() && @@ -3421,6 +3421,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLin switches::kDisableSpeechAPI, switches::kDisableThreadedCompositing, switches::kDisableTouchDragDrop, + switches::kDisableUnveil, switches::kDisableV8IdleTasks, switches::kDisableVideoCaptureUseGpuMemoryBuffer, switches::kDisableWebGLImageChromium,