git: 96b9a69e7010 - main - www/chromium: update to 105.0.5195.102 and fix gpu watchdog thread while here

From: Rene Ladan <rene_at_FreeBSD.org>
Date: Sat, 03 Sep 2022 12:02:08 UTC
The branch main has been updated by rene:

URL: https://cgit.FreeBSD.org/ports/commit/?id=96b9a69e70108efa8f5a4783a530b94f663958ce

commit 96b9a69e70108efa8f5a4783a530b94f663958ce
Author:     Robert Nagy <robert@openbsd.org>
AuthorDate: 2022-09-03 11:30:36 +0000
Commit:     Rene Ladan <rene@FreeBSD.org>
CommitDate: 2022-09-03 11:59:37 +0000

    www/chromium: update to 105.0.5195.102 and fix gpu watchdog thread while here
    
    Security:       f38d25ac-2b7a-11ed-a1ef-3065ec8fd3ec
---
 www/chromium/Makefile                              |  2 +-
 www/chromium/distinfo                              | 14 +++++-----
 www/chromium/files/patch-content_gpu_gpu__main.cc  | 30 ++--------------------
 ...atch-sandbox_policy_freebsd_sandbox__freebsd.cc | 10 ++++++--
 ...atch-sandbox_policy_openbsd_sandbox__openbsd.cc | 10 ++++++--
 5 files changed, 26 insertions(+), 40 deletions(-)

diff --git a/www/chromium/Makefile b/www/chromium/Makefile
index 8d4cdb35057b..d3aba79d5700 100644
--- a/www/chromium/Makefile
+++ b/www/chromium/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	chromium
-PORTVERSION=	105.0.5195.52
+PORTVERSION=	105.0.5195.102
 CATEGORIES=	www wayland
 MASTER_SITES=	https://commondatastorage.googleapis.com/chromium-browser-official/ \
 		https://nerd.hu/distfiles/:external
diff --git a/www/chromium/distinfo b/www/chromium/distinfo
index a0316463f879..d7115a6ea044 100644
--- a/www/chromium/distinfo
+++ b/www/chromium/distinfo
@@ -1,9 +1,9 @@
-TIMESTAMP = 1661937622
-SHA256 (chromium-105.0.5195.52.tar.xz) = dc71b2be9c30c2a7a250b3dbfb26f9b0d1aa2df7335b53ed44a203ff69947c42
-SIZE (chromium-105.0.5195.52.tar.xz) = 1597749968
-SHA256 (chrome-linux-105.0.5195.52-llvm13.profdata.tar.xz) = be6371fbfe9949ee56c8ba5c45c2e3d31c36c153e035b89d4bbda4e35077c8c2
-SIZE (chrome-linux-105.0.5195.52-llvm13.profdata.tar.xz) = 24879272
-SHA256 (chromium-105.0.5195.52-testdata.tar.xz) = 486fe655cfc8a4210598f4797fbbc603a8783702c50b5c3a9badd3a179ba9106
-SIZE (chromium-105.0.5195.52-testdata.tar.xz) = 264061000
+TIMESTAMP = 1662203957
+SHA256 (chromium-105.0.5195.102.tar.xz) = 1cba0527c951e3c506ade96cf6ec2507ee9d43661764731ed896348182369262
+SIZE (chromium-105.0.5195.102.tar.xz) = 1597977496
+SHA256 (chrome-linux-105.0.5195.102-llvm13.profdata.tar.xz) = a32f0155ff13a09e3cd9a34b2eb1ab91d193058c89be8d1a3037bd80d8136c31
+SIZE (chrome-linux-105.0.5195.102-llvm13.profdata.tar.xz) = 24879584
+SHA256 (chromium-105.0.5195.102-testdata.tar.xz) = 8ae1595c598a0941c877d4be1874a07bbef68665f5419433c9b91d2d5416d72a
+SIZE (chromium-105.0.5195.102-testdata.tar.xz) = 264553400
 SHA256 (test_fonts-336e775eec536b2d785cc80eff6ac39051931286.tar.gz) = a2ca2962daf482a8f943163541e1c73ba4b2694fabcd2510981f2db4eda493c8
 SIZE (test_fonts-336e775eec536b2d785cc80eff6ac39051931286.tar.gz) = 32624734
diff --git a/www/chromium/files/patch-content_gpu_gpu__main.cc b/www/chromium/files/patch-content_gpu_gpu__main.cc
index 5330461d3ca7..b79dc03f2618 100644
--- a/www/chromium/files/patch-content_gpu_gpu__main.cc
+++ b/www/chromium/files/patch-content_gpu_gpu__main.cc
@@ -1,4 +1,4 @@
---- content/gpu/gpu_main.cc.orig	2022-08-31 12:19:35 UTC
+--- content/gpu/gpu_main.cc.orig	2022-09-02 10:45:05 UTC
 +++ content/gpu/gpu_main.cc
 @@ -86,7 +86,7 @@
  #include "sandbox/win/src/sandbox.h"
@@ -36,7 +36,7 @@
  #error "Unsupported Linux platform."
  #elif BUILDFLAG(IS_MAC)
      // Cross-process CoreAnimation requires a CFRunLoop to function at all, and
-@@ -396,17 +396,19 @@ int GpuMain(MainFunctionParams parameters) {
+@@ -396,7 +396,7 @@ int GpuMain(MainFunctionParams parameters) {
  
  namespace {
  
@@ -45,29 +45,3 @@
  bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdog_thread,
                         const gpu::GPUInfo* gpu_info,
                         const gpu::GpuPreferences& gpu_prefs) {
-   TRACE_EVENT0("gpu,startup", "Initialize sandbox");
- 
-+#if !BUILDFLAG(IS_BSD)
-   if (watchdog_thread) {
-     // SandboxLinux needs to be able to ensure that the thread
-     // has really been stopped.
-     sandbox::policy::SandboxLinux::GetInstance()->StopThread(watchdog_thread);
-   }
-+#endif
- 
-   // SandboxLinux::InitializeSandbox() must always be called
-   // with only one thread.
-@@ -453,11 +455,13 @@ bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdo
-           *base::CommandLine::ForCurrentProcess()),
-       base::BindOnce(GpuProcessPreSandboxHook), sandbox_options);
- 
-+#if !BUILDFLAG(IS_BSD)
-   if (watchdog_thread) {
-     base::Thread::Options thread_options;
-     thread_options.timer_slack = base::TIMER_SLACK_MAXIMUM;
-     watchdog_thread->StartWithOptions(std::move(thread_options));
-   }
-+#endif
- 
-   return res;
- }
diff --git a/www/chromium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.cc b/www/chromium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.cc
index b853583c6f47..ad30b2a4413e 100644
--- a/www/chromium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.cc
+++ b/www/chromium/files/patch-sandbox_policy_freebsd_sandbox__freebsd.cc
@@ -1,6 +1,6 @@
---- sandbox/policy/freebsd/sandbox_freebsd.cc.orig	2022-04-21 18:48:31 UTC
+--- sandbox/policy/freebsd/sandbox_freebsd.cc.orig	2022-09-02 10:45:05 UTC
 +++ sandbox/policy/freebsd/sandbox_freebsd.cc
-@@ -0,0 +1,247 @@
+@@ -0,0 +1,253 @@
 +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
 +// Use of this source code is governed by a BSD-style license that can be
 +// found in the LICENSE file.
@@ -35,6 +35,7 @@
 +#include "base/posix/eintr_wrapper.h"
 +#include "base/strings/string_number_conversions.h"
 +#include "base/system/sys_info.h"
++#include "base/threading/thread.h"
 +#include "base/time/time.h"
 +#include "build/build_config.h"
 +#include "sandbox/constants.h"
@@ -97,6 +98,11 @@
 +  return instance;
 +}
 +
++void SandboxLinux::StopThread(base::Thread* thread) {
++  DCHECK(thread);
++  thread->Stop();
++}
++
 +void SandboxLinux::PreinitializeSandbox(sandbox::mojom::Sandbox sandbox_type) {
 +  CHECK(!pre_initialized_);
 +#if BUILDFLAG(USING_SANITIZER)
diff --git a/www/chromium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.cc b/www/chromium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.cc
index 0898af1e5a6c..307217ed3ac3 100644
--- a/www/chromium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.cc
+++ b/www/chromium/files/patch-sandbox_policy_openbsd_sandbox__openbsd.cc
@@ -1,6 +1,6 @@
---- sandbox/policy/openbsd/sandbox_openbsd.cc.orig	2022-04-21 18:48:31 UTC
+--- sandbox/policy/openbsd/sandbox_openbsd.cc.orig	2022-09-02 10:45:05 UTC
 +++ sandbox/policy/openbsd/sandbox_openbsd.cc
-@@ -0,0 +1,407 @@
+@@ -0,0 +1,413 @@
 +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
 +// Use of this source code is governed by a BSD-style license that can be
 +// found in the LICENSE file.
@@ -36,6 +36,7 @@
 +#include "base/posix/eintr_wrapper.h"
 +#include "base/strings/string_number_conversions.h"
 +#include "base/system/sys_info.h"
++#include "base/threading/thread.h"
 +#include "base/time/time.h"
 +#include "build/build_config.h"
 +#include "sandbox/constants.h"
@@ -101,6 +102,11 @@
 +  return instance;
 +}
 +
++void SandboxLinux::StopThread(base::Thread* thread) {
++  DCHECK(thread);
++  thread->Stop();
++}
++
 +void SandboxLinux::PreinitializeSandbox(sandbox::mojom::Sandbox sandbox_type) {
 +  CHECK(!pre_initialized_);
 +#if BUILDFLAG(USING_SANITIZER)