commit:     c580af0345725e2d81819433a0de30629326e226
Author:     Stephan Hartmann <sultan <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 14 08:43:11 2021 +0000
Commit:     Stephan Hartmann <sultan <AT> gentoo <DOT> org>
CommitDate: Sun Feb 14 08:43:48 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c580af03

www-client/chromium: beta channel bump to 89.0.4389.47

Add patch to workaround crash in cast message handling.

Bug: https://bugs.gentoo.org/768000
Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Stephan Hartmann <sultan <AT> gentoo.org>

 www-client/chromium/Manifest                       |  2 +-
 ...4389.40.ebuild => chromium-89.0.4389.47.ebuild} |  1 +
 .../files/chromium-89-EnumTable-crash.patch        | 71 ++++++++++++++++++++++
 3 files changed, 73 insertions(+), 1 deletion(-)

diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest
index dd09275593e..0439e8227f3 100644
--- a/www-client/chromium/Manifest
+++ b/www-client/chromium/Manifest
@@ -1,7 +1,7 @@
 DIST chromium-88-patchset-3.tar.xz 8396 BLAKE2B 
4c978f1a6efef3f71e3dd6340c392b74bc6a734b49a9ca43343d03903159dafc66159939f9a6c4b55665ddbe7bd97a26d8d86c285ec02cf76cad5f5cc7410570
 SHA512 
c39afa26f5b0b9930f6f67ce0c42eefd74c09d528b26bc0db57129b150f75ff83c8b1cb97bd9c5d75f288fb4767cc68c9c5ce89231b4a59f8ca02493e4dd281a
 DIST chromium-88.0.4324.150.tar.xz 857377456 BLAKE2B 
65f3d4a0f930743d04786a21c10561a93a2eb27c2c06d260495ead6ebf9344b2938f28c083a4077c9d2413f47cb083a83633b571ab1f54b25823fc8db18f504b
 SHA512 
5e0419ce26e58b6ba30586c806fa3001f6c3c094e09c82fb08ed828a199c582308ce9bc0ea445aa0214d29710a586bf5a972553fbef5eab574fb0dc3ebe6280b
 DIST chromium-89-patchset-6.tar.xz 4308 BLAKE2B 
22e2db8b5e287925f8b550075e48ad381ccf7ef54e23d8f4e4aedff7fd6cfee8f9e70eff1edb8c867c256ee5ec881ef9379e18278b84b47ff08dcc00f5801667
 SHA512 
aa5d902c1959f50eb9a0d773a77bf12e5a955d796ee8b18f6e2143573dd73beec62109940e55a858fd9927753dba1d3bf9c1bd940b18a616e7b70b801e93f041
-DIST chromium-89.0.4389.40.tar.xz 890752920 BLAKE2B 
a4db55ac0621ad2e59c51b80c557c601c48bfd8b4d126195d61c650b8cf3204ed21b5fc65b11708b95d95cfabf48b29e2d5403316bc0523e3355f60e384b251f
 SHA512 
9c31ea969d23197dd4a749648ca404293ee12d14e025c103db8df9e826b7661902ea8edb8a07a8d216026597b058b4efaf4b73afa032a41ad82b8c108dd44c11
+DIST chromium-89.0.4389.47.tar.xz 890733548 BLAKE2B 
55482566fce0d30abed7fe88514314f14860ba2f876af532c7b566c9b32d1caf79ecccd8cc03af7b9cac4457038abf4e5006c8bfb75fd308200f7290f3431d39
 SHA512 
f6828d3d9a346e508511eee8cef63ad6ae4327adb90a6bcb392e862e8406b50798f0d73306794283aaab84550547b31c2b9e90e2068740b9123115796f9a082f
 DIST chromium-90-patchset-3.tar.xz 5344 BLAKE2B 
19b9d69d5d4aecc18e1a3867fd0c53d01dd873fd533b83fbd8c25d435976dd2176975ccf5d4ebb04f84b6c1c0a009315ef4344fbf575b8ae6942ddfb12d1e1e1
 SHA512 
97d756b4b4270c7631ca42792e869815c22a786ebba36c2668b99298bcd60f24fd89b52d2491ade07341c20f2bdac933b46b299e52bfe9e45cb57bf056ee050c
 DIST chromium-90.0.4412.3.tar.xz 920864492 BLAKE2B 
a0d5e6ddc552611231c7ba8fd81da4d2e01e59695eccce33c040ffdd37fa360008cf8c8095f10622902a5e25297db4c10b5c463fdca5e5c46d390db4268f3d17
 SHA512 
bf168dd2a817823bd9ec7b7c925cddd783366460011782884f02ef15952546d6edef6bb2f08813bfd8be2e64c787e80c2cd449032b9eaf19d2ea7a6eb2294da8
 DIST setuptools-44.1.0.zip 858569 BLAKE2B 
f59f154e121502a731e51294ccd293d60ffccadacf51e23b53bf7ceba38858948b86783238061136c827ac3373ea7ea8e6253d4bb53f3f1dd69284568ec65a68
 SHA512 
4dfb0f42d334b835758e865a26ecd1e725711fa2b9c38ddc273b8b3849fba04527bc97436d11ba1e98f1a42922aa0f0b9032e32998273c705fac6e10735eacbf

diff --git a/www-client/chromium/chromium-89.0.4389.40.ebuild 
b/www-client/chromium/chromium-89.0.4389.47.ebuild
similarity index 99%
rename from www-client/chromium/chromium-89.0.4389.40.ebuild
rename to www-client/chromium/chromium-89.0.4389.47.ebuild
index 32462fb8427..dca398dbb76 100644
--- a/www-client/chromium/chromium-89.0.4389.40.ebuild
+++ b/www-client/chromium/chromium-89.0.4389.47.ebuild
@@ -232,6 +232,7 @@ src_prepare() {
        local PATCHES=(
                "${WORKDIR}/patches"
                "${FILESDIR}/chromium-89-webcodecs-deps.patch"
+               "${FILESDIR}/chromium-89-EnumTable-crash.patch"
                "${FILESDIR}/chromium-shim_headers.patch"
        )
 

diff --git a/www-client/chromium/files/chromium-89-EnumTable-crash.patch 
b/www-client/chromium/files/chromium-89-EnumTable-crash.patch
new file mode 100644
index 00000000000..89a50702dfa
--- /dev/null
+++ b/www-client/chromium/files/chromium-89-EnumTable-crash.patch
@@ -0,0 +1,71 @@
+diff --git a/components/cast_channel/enum_table.h 
b/components/cast_channel/enum_table.h
+index e3130c7..2ad16ea 100644
+--- a/components/cast_channel/enum_table.h
++++ b/components/cast_channel/enum_table.h
+@@ -212,7 +212,7 @@ class
+ 
+   template <typename E>
+   friend class EnumTable;
+-  DISALLOW_COPY_AND_ASSIGN(GenericEnumTableEntry);
++  DISALLOW_ASSIGN(GenericEnumTableEntry);
+ };
+ 
+ // Yes, these constructors really needs to be inlined.  Even though they look
+@@ -250,8 +250,7 @@ class EnumTable {
+     // Constructor for regular entries.
+     constexpr Entry(E value, base::StringPiece str)
+         : GenericEnumTableEntry(static_cast<int32_t>(value), str) {}
+-
+-    DISALLOW_COPY_AND_ASSIGN(Entry);
++    DISALLOW_ASSIGN(Entry);
+   };
+ 
+   static_assert(sizeof(E) <= sizeof(int32_t),
+@@ -306,15 +305,14 @@ class EnumTable {
+     if (is_sorted_) {
+       const std::size_t index = static_cast<std::size_t>(value);
+       if (ANALYZER_ASSUME_TRUE(index < data_.size())) {
+-        const auto& entry = data_.begin()[index];
++        const auto& entry = data_[index];
+         if (ANALYZER_ASSUME_TRUE(entry.has_str()))
+           return entry.str();
+       }
+       return base::nullopt;
+     }
+     return GenericEnumTableEntry::FindByValue(
+-        reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()),
+-        data_.size(), static_cast<int32_t>(value));
++        &data_[0], data_.size(), static_cast<int32_t>(value));
+   }
+ 
+   // This overload of GetString is designed for cases where the argument is a
+@@ -342,8 +340,7 @@ class EnumTable {
+   // enum value directly.
+   base::Optional<E> GetEnum(base::StringPiece str) const {
+     auto* entry = GenericEnumTableEntry::FindByString(
+-        reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()),
+-        data_.size(), str);
++        &data_[0], data_.size(), str);
+     return entry ? static_cast<E>(entry->value) : base::Optional<E>();
+   }
+ 
+@@ -358,7 +355,7 @@ class EnumTable {
+   // Align the data on a cache line boundary.
+   alignas(64)
+ #endif
+-      std::initializer_list<Entry> data_;
++      const std::vector<Entry> data_;
+   bool is_sorted_;
+ 
+   constexpr EnumTable(std::initializer_list<Entry> data, bool is_sorted)
+@@ -370,8 +367,8 @@ class EnumTable {
+ 
+     for (std::size_t i = 0; i < data.size(); i++) {
+       for (std::size_t j = i + 1; j < data.size(); j++) {
+-        const Entry& ei = data.begin()[i];
+-        const Entry& ej = data.begin()[j];
++        const Entry& ei = data[i];
++        const Entry& ej = data[j];
+         DCHECK(ei.value != ej.value)
+             << "Found duplicate enum values at indices " << i << " and " << j;
+         DCHECK(!(ei.has_str() && ej.has_str() && ei.str() == ej.str()))

Reply via email to