Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Feb 2022 16:54:35 GMT
From:      Rene Ladan <rene@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org
Subject:   git: 5d3a2cfbe493 - 2022Q1 - www/chromium: fix MP4 video playback
Message-ID:  <202202231654.21NGsZZK020878@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch 2022Q1 has been updated by rene:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5d3a2cfbe493ca12f6945fc3eca803b13ddffd97

commit 5d3a2cfbe493ca12f6945fc3eca803b13ddffd97
Author:     Robert Nagy <robert@openbsd.org>
AuthorDate: 2022-02-23 16:50:34 +0000
Commit:     Rene Ladan <rene@FreeBSD.org>
CommitDate: 2022-02-23 16:53:58 +0000

    www/chromium: fix MP4 video playback
    
    PR:             255561
    Reported by:    patovm04@gmail.com
    
    (cherry picked from commit 2bc6cc38f24dd256461df52f2eda7be12b1c28c5)
---
 www/chromium/Makefile                                    |  1 +
 ...base_allocator_partition__allocator_page__allocator.h | 11 +++++++++++
 ...tition__allocator_page__allocator__internals__posix.h | 16 ++++++++++++++++
 3 files changed, 28 insertions(+)

diff --git a/www/chromium/Makefile b/www/chromium/Makefile
index d8adb70ae88c..cc137ed98bf4 100644
--- a/www/chromium/Makefile
+++ b/www/chromium/Makefile
@@ -2,6 +2,7 @@
 
 PORTNAME=	chromium
 PORTVERSION=	98.0.4758.102
+PORTREVISION=	1
 CATEGORIES=	www
 MASTER_SITES=	https://commondatastorage.googleapis.com/chromium-browser-official/ \
 		LOCAL/rene/chromium/:fonts
diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_page__allocator.h b/www/chromium/files/patch-base_allocator_partition__allocator_page__allocator.h
new file mode 100644
index 000000000000..3d932a28ff32
--- /dev/null
+++ b/www/chromium/files/patch-base_allocator_partition__allocator_page__allocator.h
@@ -0,0 +1,11 @@
+--- base/allocator/partition_allocator/page_allocator.h.orig	2022-02-23 16:08:07 UTC
++++ base/allocator/partition_allocator/page_allocator.h
+@@ -170,7 +170,7 @@ BASE_EXPORT void DecommitAndZeroSystemPages(void* addr
+ // Whether decommitted memory is guaranteed to be zeroed when it is
+ // recommitted. Do not assume that this will not change over time.
+ constexpr BASE_EXPORT bool DecommittedMemoryIsAlwaysZeroed() {
+-#if defined(OS_APPLE)
++#if defined(OS_APPLE) || defined(OS_BSD)
+   return false;
+ #else
+   return true;
diff --git a/www/chromium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h b/www/chromium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h
new file mode 100644
index 000000000000..c5069330b3dd
--- /dev/null
+++ b/www/chromium/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h
@@ -0,0 +1,16 @@
+--- base/allocator/partition_allocator/page_allocator_internals_posix.h.orig	2022-02-23 16:08:07 UTC
++++ base/allocator/partition_allocator/page_allocator_internals_posix.h
+@@ -339,8 +339,12 @@ bool TryRecommitSystemPagesInternal(
+ }
+ 
+ void DiscardSystemPagesInternal(void* address, size_t length) {
+-#if defined(OS_APPLE)
++#if defined(OS_APPLE) || defined(OS_BSD)
++#if defined(OS_BSD)
++  int ret = madvise(address, length, MADV_FREE);
++#else
+   int ret = madvise(address, length, MADV_FREE_REUSABLE);
++#endif
+   if (ret) {
+     // MADV_FREE_REUSABLE sometimes fails, so fall back to MADV_DONTNEED.
+     ret = madvise(address, length, MADV_DONTNEED);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202202231654.21NGsZZK020878>