Hello community,

here is the log from the commit of package chromium.13380 for 
openSUSE:Leap:15.1:Update checked in at 2020-07-20 16:26:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.1:Update/chromium.13380 (Old)
 and      /work/SRC/openSUSE:Leap:15.1:Update/.chromium.13380.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "chromium.13380"

Mon Jul 20 16:26:51 2020 rev:1 rq:821617 version:84.0.4147.89

Changes:
--------
New Changes file:

--- /dev/null   2020-07-16 02:54:20.700682797 +0200
+++ 
/work/SRC/openSUSE:Leap:15.1:Update/.chromium.13380.new.3592/chromium.changes   
    2020-07-20 16:27:34.728332836 +0200
@@ -0,0 +1,5773 @@
+-------------------------------------------------------------------
+Fri Jul 17 07:00:20 UTC 2020 - Tomáš Chvátal <tchva...@suse.com>
+
+- Try to fix non-wayland build for Leap builds
+
+-------------------------------------------------------------------
+Thu Jul 16 11:33:24 UTC 2020 - Tomáš Chvátal <tchva...@suse.com>
+
+- Update to 84.0.4147.89 bsc#1174189:
+  * Critical CVE-2020-6510: Heap buffer overflow in background fetch. 
+  * High CVE-2020-6511: Side-channel information leakage in content security 
policy. 
+  * High CVE-2020-6512: Type Confusion in V8. 
+  * High CVE-2020-6513: Heap buffer overflow in PDFium. 
+  * High CVE-2020-6514: Inappropriate implementation in WebRTC. 
+  * High CVE-2020-6515: Use after free in tab strip. 
+  * High CVE-2020-6516: Policy bypass in CORS. 
+  * High CVE-2020-6517: Heap buffer overflow in history. 
+  * Medium CVE-2020-6518: Use after free in developer tools. 
+  * Medium CVE-2020-6519: Policy bypass in CSP. 
+  * Medium CVE-2020-6520: Heap buffer overflow in Skia. 
+  * Medium CVE-2020-6521: Side-channel information leakage in autofill.
+  * Medium CVE-2020-6522: Inappropriate implementation in external protocol 
handlers. 
+  * Medium CVE-2020-6523: Out of bounds write in Skia. 
+  * Medium CVE-2020-6524: Heap buffer overflow in WebAudio. 
+  * Medium CVE-2020-6525: Heap buffer overflow in Skia. 
+  * Low CVE-2020-6526: Inappropriate implementation in iframe sandbox. 
+  * Low CVE-2020-6527: Insufficient policy enforcement in CSP. 
+  * Low CVE-2020-6528: Incorrect security UI in basic auth. 
+  * Low CVE-2020-6529: Inappropriate implementation in WebRTC. 
+  * Low CVE-2020-6530: Out of bounds memory access in developer tools. 
+  * Low CVE-2020-6531: Side-channel information leakage in scroll to text. 
+  * Low CVE-2020-6533: Type Confusion in V8. 
+  * Low CVE-2020-6534: Heap buffer overflow in WebRTC. 
+  * Low CVE-2020-6535: Insufficient data validation in WebUI. 
+  * Low CVE-2020-6536: Incorrect security UI in PWAs.
+- Use bundled xcb-proto as we need to generate py2 bindings
+- Add new patches:
+  * chromium-84-AXObject-stl-iterator.patch
+  * chromium-84-FilePath-add-noexcept.patch
+  * chromium-84-base-has_bultin.patch
+  * chromium-84-blink-disable-clang-format.patch
+  * chromium-84-fix-decltype.patch
+  * chromium-84-gcc-DOMRect-constexpr.patch
+  * chromium-84-gcc-include.patch
+  * chromium-84-gcc-noexcept.patch
+  * chromium-84-gcc-template.patch
+  * chromium-84-gcc-unique_ptr.patch
+  * chromium-84-gcc-use-brace-initializer.patch
+  * chromium-84-nss-include.patch
+  * chromium-84-ozone-include.patch
+  * chromium-84-revert-manage-ManifestManagerHost-per-document.patch
+  * chromium-84-std-vector-const.patch
+  * chromium-84.0.4147.89.tar.xz
+  * chromium-blink-gcc-diagnostic-pragma.patch
+  * chromium-clang_lto_visibility_public.patch
+  * chromium-quiche-invalid-offsetof.patch
+  * system-libdrm.patch
+- Remove no longer needed patches:
+  * chromium-81-re2-0.2020.05.01.patch
+  * chromium-82-gcc-incomplete-type.patch
+  * chromium-82-gcc-iterator.patch
+  * chromium-82-gcc-noexcept.patch
+  * chromium-83-gcc-include.patch
+  * chromium-83-gcc-iterator.patch
+  * chromium-83-gcc-permissive.patch
+  * chromium-83-gcc-serviceworker.patch
+  * chromium-83-gcc-template.patch
+  * chromium-83-icu67.patch
+  * chromium-83.0.4103.97-skia-gcc-no_sanitize-fixes.patch
+  * chromium-dev-shm.patch
+- Rebase and update patches:
+  * build-with-pipewire-0.3.patch
+  * chromium-83-gcc-10.patch
+  * chromium-84-mediaalloc.patch
+  * chromium-norar.patch
+  * chromium-vaapi-fix.patch
+
+-------------------------------------------------------------------
+Sun Jun 28 02:27:12 UTC 2020 - Atri Bhattacharya <badshah...@gmail.com>
+
+- Refresh build-with-pipewire-0.3.patch to mirror similar patch
+  by Fedora for Firefox; screen-capture wasn't actually working
+  with the previous version of the patch.
+- Add BuildRequires: pkgconfig(libspa-2.0) when building with
+  pipewire support to guard against potential package splitting
+  off of pipewire-spa-devel from pipewire-devel.
+
+-------------------------------------------------------------------
+Thu Jun 25 07:12:24 UTC 2020 - Tomáš Chvátal <tchva...@suse.com>
+
+- Disable the LTO again as it still OOMs quite often
+
+-------------------------------------------------------------------
+Wed Jun 24 07:40:07 UTC 2020 - Tomáš Chvátal <tchva...@suse.com>
+
+- Add patch to work with new ffmpeg wrt bsc#1173292:
+  * chromium-84-mediaalloc.patch
+
+-------------------------------------------------------------------
+Tue Jun 23 14:20:46 UTC 2020 - Tomáš Chvátal <tchva...@suse.com>
+
+- Add multimedia fix for disabled location and also try one
+  additional patch from Debian on the same issue bsc#1173107
+  Update patch:
+  * no-location-leap151.patch
+
+-------------------------------------------------------------------
+Tue Jun 23 08:20:43 UTC 2020 - Tomáš Chvátal <tchva...@suse.com>
+
+- Add patch from Fedora to avoid attribute overrides in skia:
+  * chromium-83.0.4103.97-skia-gcc-no_sanitize-fixes.patch
+
+-------------------------------------------------------------------
+Tue Jun 23 08:08:08 UTC 2020 - Tomáš Chvátal <tchva...@suse.com>
+
+- Add patch to hopefully fix bsc#1173107:
+  * chromium-dev-shm.patch
+
+-------------------------------------------------------------------
+Tue Jun 23 07:51:28 UTC 2020 - Tomáš Chvátal <tchva...@suse.com>
+
+- Update to 83.0.4103.116 bsc#1173251:
+  * CVE-2020-6509: Use after free in extensions
+
+-------------------------------------------------------------------
+Fri Jun 19 07:34:53 UTC 2020 - Tomáš Chvátal <tchva...@suse.com>
+
+- Reduce constraints to say 20 GB disk space is enough
+
+-------------------------------------------------------------------
+Fri Jun 19 07:13:03 UTC 2020 - Tomáš Chvátal <tchva...@suse.com>
+
+- Disable wayland integration on 15.x bsc#1173187 bsc#1173188
+  bsc#1173254
+
+-------------------------------------------------------------------
+Thu Jun 18 07:39:50 UTC 2020 - Tomáš Chvátal <tchva...@suse.com>
+
+- Enforce to not use system borders bsc#1173063
+
+-------------------------------------------------------------------
+Wed Jun 17 08:32:06 UTC 2020 - Tomáš Chvátal <tchva...@suse.com>
+
+- Update to 83.0.4103.106 bsc#1173029:
+  * CVE-2020-6505: Use after free in speech
+  * CVE-2020-6506: Insufficient policy enforcement in WebView
+  * CVE-2020-6507: Out of bounds write in V8
+
+-------------------------------------------------------------------
+Mon Jun 15 14:05:36 UTC 2020 - Tomáš Chvátal <tchva...@suse.com>
+
+- Another attempt on the location handling for Leap 15.1:
+  * no-location-leap151.patch
+
+-------------------------------------------------------------------
+Thu Jun 11 16:31:50 UTC 2020 - Tomáš Chvátal <tchva...@suse.com>
+
+- Attempt to build with wayland/ozone enabled
+
+-------------------------------------------------------------------
+Thu Jun 11 12:14:32 UTC 2020 - Tomáš Chvátal <tchva...@suse.com>
+
+- Enable more system libs on 15.2+
+- Remove the chromium-83-gcc-location-revert.patch as it is wrong
+  approach to fix the problem
+
+-------------------------------------------------------------------
+Thu Jun 11 09:05:00 UTC 2020 - Tomáš Chvátal <tchva...@suse.com>
+
+- Update _constraints to match up LTO enablement
+
+-------------------------------------------------------------------
+Wed Jun 10 12:20:57 UTC 2020 - Tomáš Chvátal <tchva...@suse.com>
+
+- With GCC 10 released we should be able to enable LTO again
+
+-------------------------------------------------------------------
+Thu Jun  4 06:28:45 UTC 2020 - Tomáš Chvátal <tchva...@suse.com>
+
+- Update to 83.0.4103.97 bsc#1172496:
+  * CVE-2020-6493: Use after free in WebAuthentication.
+  * CVE-2020-6494: Incorrect security UI in payments.
+  * CVE-2020-6495: Insufficient policy enforcement in developer tools.
+  * CVE-2020-6496: Use after free in payments.
+
+-------------------------------------------------------------------
+Thu May 28 09:18:05 UTC 2020 - Tomáš Chvátal <tchva...@suse.com>
+
+- Add patch to not use bundled unrar:
+  * chromium-norar.patch
+
+-------------------------------------------------------------------
+Thu May 28 08:59:02 UTC 2020 - Fabian Vogt <fv...@suse.com>
+
+- Amend chromium-prop-codecs.patch to allow proprietary_codecs
+  without building third_party/openh264
+
++++ 5576 more lines (skipped)
++++ between /dev/null
++++ and 
/work/SRC/openSUSE:Leap:15.1:Update/.chromium.13380.new.3592/chromium.changes

New:
----
  _constraints
  build-with-pipewire-0.3.patch
  chromium-79-gcc-alignas.patch
  chromium-80-gcc-quiche.patch
  chromium-82-gcc-constexpr.patch
  chromium-82-gcc-template.patch
  chromium-83-gcc-10.patch
  chromium-84-AXObject-stl-iterator.patch
  chromium-84-FilePath-add-noexcept.patch
  chromium-84-base-has_bultin.patch
  chromium-84-blink-disable-clang-format.patch
  chromium-84-fix-decltype.patch
  chromium-84-gcc-DOMRect-constexpr.patch
  chromium-84-gcc-include.patch
  chromium-84-gcc-noexcept.patch
  chromium-84-gcc-template.patch
  chromium-84-gcc-unique_ptr.patch
  chromium-84-gcc-use-brace-initializer.patch
  chromium-84-mediaalloc.patch
  chromium-84-nss-include.patch
  chromium-84-ozone-include.patch
  chromium-84-revert-manage-ManifestManagerHost-per-document.patch
  chromium-84-std-vector-const.patch
  chromium-84.0.4147.89.tar.xz
  chromium-blink-gcc-diagnostic-pragma.patch
  chromium-browser.desktop
  chromium-browser.sh
  chromium-browser.xml
  chromium-buildname.patch
  chromium-clang_lto_visibility_public.patch
  chromium-dma-buf.patch
  chromium-drm.patch
  chromium-fix-char_traits.patch
  chromium-libusb_interrupt_event_handler.patch
  chromium-master-prefs-path.patch
  chromium-norar.patch
  chromium-prop-codecs.patch
  chromium-quiche-invalid-offsetof.patch
  chromium-symbolic.svg
  chromium-system-libusb.patch
  chromium-vaapi-fix.patch
  chromium-vaapi.patch
  chromium.changes
  chromium.default
  chromium.spec
  exclude_ymp.patch
  fix_building_widevinecdm_with_chromium.patch
  gcc-enable-lto.patch
  gpu-timeout.patch
  master_preferences
  no-location-leap151.patch
  old-libva.patch
  system-libdrm.patch
  xcb-proto-1.14.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ chromium.spec ++++++
++++ 846 lines (skipped)

++++++ _constraints ++++++
<?xml version="1.0"?>
<constraints>
  <hardware>
    <disk>
      <size unit="G">16</size>
    </disk>
    <physicalmemory>
    <size unit="G">8</size>
    </physicalmemory>
  </hardware>
  <overwrite>
    <conditions>
      <arch>x86_64</arch>
    </conditions>
    <hardware>
      <memory>
        <size unit="G">16</size>
      </memory>
    </hardware>
  </overwrite>
</constraints>
++++++ build-with-pipewire-0.3.patch ++++++
++++ 793 lines (skipped)

++++++ chromium-79-gcc-alignas.patch ++++++
Re-use chromium alignas workaround in protobuf.
---

diff --git a/third_party/protobuf/src/google/protobuf/arena.h 
b/third_party/protobuf/src/google/protobuf/arena.h
index dedc221..a8515ce 100644
--- a/third_party/protobuf/src/google/protobuf/arena.h
+++ b/third_party/protobuf/src/google/protobuf/arena.h
@@ -245,7 +245,7 @@ struct ArenaOptions {
 // well as protobuf container types like RepeatedPtrField and Map. The protocol
 // is internal to protobuf and is not guaranteed to be stable. Non-proto types
 // should not rely on this protocol.
-class PROTOBUF_EXPORT alignas(8) Arena final {
+class PROTOBUF_EXPORT PROTOBUF_ALIGNAS(8) Arena final {
  public:
   // Arena constructor taking custom options. See ArenaOptions below for
   // descriptions of the options available.
diff --git a/third_party/protobuf/src/google/protobuf/port_def.inc 
b/third_party/protobuf/src/google/protobuf/port_def.inc
index f1bd85d..6d02b53 100644
--- a/third_party/protobuf/src/google/protobuf/port_def.inc
+++ b/third_party/protobuf/src/google/protobuf/port_def.inc
@@ -528,6 +528,35 @@ PROTOBUF_EXPORT_TEMPLATE_TEST(DEFAULT, 
__declspec(dllimport));
 #undef IN
 #endif  // _MSC_VER
 
+// Specify memory alignment for structs, classes, etc.
+// Use like:
+//   class PROTOBUF_ALIGNAS(16) MyClass { ... }
+//   PROTOBUF_ALIGNAS(16) int array[4];
+//
+// In most places you can use the C++11 keyword "alignas", which is preferred.
+//
+// But compilers have trouble mixing __attribute__((...)) syntax with
+// alignas(...) syntax.
+//
+// Doesn't work in clang or gcc:
+//   struct alignas(16) __attribute__((packed)) S { char c; };
+// Works in clang but not gcc:
+//   struct __attribute__((packed)) alignas(16) S2 { char c; };
+// Works in clang and gcc:
+//   struct alignas(16) S3 { char c; } __attribute__((packed));
+//
+// There are also some attributes that must be specified *before* a class
+// definition: visibility (used for exporting functions/classes) is one of
+// these attributes. This means that it is not possible to use alignas() with a
+// class that is marked as exported.
+#if defined(_MSC_VER)
+#define PROTOBUF_ALIGNAS(byte_alignment) __declspec(align(byte_alignment))
+#elif defined(__GNUC__)
+#define PROTOBUF_ALIGNAS(byte_alignment) 
__attribute__((aligned(byte_alignment)))
+#else
+#define PROTOBUF_ALIGNAS(byte_alignment) alignas(byte_alignment)
+#endif
+
 #if defined(__clang__)
 #pragma clang diagnostic push
 // TODO(gerbens) ideally we cleanup the code. But a cursory try shows many
diff --git a/third_party/protobuf/src/google/protobuf/port_undef.inc 
b/third_party/protobuf/src/google/protobuf/port_undef.inc
index b7e67fe..ba1fffc 100644
--- a/third_party/protobuf/src/google/protobuf/port_undef.inc
+++ b/third_party/protobuf/src/google/protobuf/port_undef.inc
@@ -80,6 +80,7 @@
 #undef PROTOBUF_EXPORT_TEMPLATE_STYLE_MATCH_foj3FJo5StF0OvIzl7oMxA__declspec
 #undef PROTOBUF_EXPORT_TEMPLATE_STYLE_MATCH_DECLSPEC_dllexport
 #undef PROTOBUF_EXPORT_TEMPLATE_STYLE_MATCH_DECLSPEC_dllimport
+#undef PROTOBUF_ALIGNAS
 
 
 
++++++ chromium-80-gcc-quiche.patch ++++++
>From 00f47df999c9b19e80fdc01db0ae9ca1b6a12b3a Mon Sep 17 00:00:00 2001
From: vasilvv <vasi...@google.com>
Date: Wed, 03 Apr 2019 13:58:53 -0700
Subject: [PATCH] GCC: do not delete move constructor of QuicStreamSendBuffer

QuicStreamSendBuffer constructor is implicitely required in the
initialization of the vector of substreams in QuicCryptoStream.
Though clang apparently ignores that, GCC fails to build.

BUG=chromium:819294

Originally submitted by José Dapena Paz <jose.dap...@lge.com> at 
https://quiche-review.googlesource.com/c/quiche/+/2420

PiperOrigin-RevId: 241800134
Change-Id: I4e3c97d6e5895d85340e8c1b740e6196d9104066
---

diff --git a/net/third_party/quiche/src/quic/core/quic_stream_send_buffer.h 
b/net/third_party/quiche/src/quic/core/quic_stream_send_buffer.h
index e34514b..74e9d0d 100644
--- a/net/third_party/quiche/src/quic/core/quic_stream_send_buffer.h
+++ b/net/third_party/quiche/src/quic/core/quic_stream_send_buffer.h
@@ -62,7 +62,7 @@
  public:
   explicit QuicStreamSendBuffer(QuicBufferAllocator* allocator);
   QuicStreamSendBuffer(const QuicStreamSendBuffer& other) = delete;
-  QuicStreamSendBuffer(QuicStreamSendBuffer&& other) = delete;
+  QuicStreamSendBuffer(QuicStreamSendBuffer&& other) = default;
   ~QuicStreamSendBuffer();
 
   // Save |data_length| of data starts at |iov_offset| in |iov| to send buffer.
++++++ chromium-82-gcc-constexpr.patch ++++++
>From 5812cd9bc2c15a034db24e0d2a43cc923d8a66cc Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jdap...@igalia.com>
Date: Thu, 20 Feb 2020 13:00:16 +0100
Subject: [PATCH] GCC: DOMRect constexpr equal operator depends on non constexpr 
operators

Make accessors of DOMRectReadOnly constexpr so the equal operator can be
also constexpr.

../../third_party/blink/renderer/core/geometry/dom_rect.h: In function 
‘constexpr bool blink::operator==(const blink::DOMRect&, const 
blink::DOMRect&)’:
../../third_party/blink/renderer/core/geometry/dom_rect.h:38:15: error: call to 
non-‘constexpr’ function ‘double blink::DOMRectReadOnly::x() const’

Bug: 819294
Change-Id: Ic1fed89c5480ce4eedaaf7add2779d000b77cc48
---

Index: 
chromium-83.0.4103.14/third_party/blink/renderer/core/geometry/dom_rect_read_only.h
===================================================================
--- 
chromium-83.0.4103.14.orig/third_party/blink/renderer/core/geometry/dom_rect_read_only.h
+++ 
chromium-83.0.4103.14/third_party/blink/renderer/core/geometry/dom_rect_read_only.h
@@ -31,10 +31,10 @@ class CORE_EXPORT DOMRectReadOnly : publ
 
   DOMRectReadOnly(double x, double y, double width, double height);
 
-  double x() const { return x_; }
-  double y() const { return y_; }
-  double width() const { return width_; }
-  double height() const { return height_; }
+  constexpr double x() const { return x_; }
+  constexpr double y() const { return y_; }
+  constexpr double width() const { return width_; }
+  constexpr double height() const { return height_; }
 
   double top() const { return geometry_util::NanSafeMin(y_, y_ + height_); }
   double right() const { return geometry_util::NanSafeMax(x_, x_ + width_); }
++++++ chromium-82-gcc-template.patch ++++++
diff --git a/content/public/browser/web_ui.h b/content/public/browser/web_ui.h
index 4e6aa0e..fa6f10c 100644
--- a/content/public/browser/web_ui.h
+++ b/content/public/browser/web_ui.h
@@ -138,22 +138,6 @@ class CONTENT_EXPORT WebUI {
   template <typename T>
   static T GetValue(const base::Value& value);
 
-  template <>
-  inline bool GetValue<bool>(const base::Value& value) {
-    return value.GetBool();
-  }
-
-  template <>
-  inline int GetValue<int>(const base::Value& value) {
-    return value.GetInt();
-  }
-
-  template <>
-  inline const std::string& GetValue<const std::string&>(
-      const base::Value& value) {
-    return value.GetString();
-  }
-
   template <typename Is, typename... Args>
   struct Call;
 
@@ -169,6 +153,22 @@ class CONTENT_EXPORT WebUI {
   };
 };
 
+template <>
+inline bool WebUI::GetValue<bool>(const base::Value& value) {
+  return value.GetBool();
+}
+
+template <>
+inline int WebUI::GetValue<int>(const base::Value& value) {
+  return value.GetInt();
+}
+
+template <>
+inline const std::string& WebUI::GetValue<const std::string&>(
+    const base::Value& value) {
+  return value.GetString();
+}
+
 }  // namespace content
 
 #endif  // CONTENT_PUBLIC_BROWSER_WEB_UI_H_
++++++ chromium-83-gcc-10.patch ++++++
>From e473f41284ccc8fa4bc4622d087194b18a1ec23a Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <sth...@googlemail.com>
Date: Tue, 7 Apr 2020 16:37:10 +0000
Subject: [PATCH] GCC: fix includes for gcc-10

---
 chrome/browser/search/background/ntp_backgrounds.h              | 1 +
 third_party/webrtc/call/rtx_receive_stream.h                    | 1 +
 .../webrtc/modules/audio_processing/aec3/clockdrift_detector.h  | 1 +
 ui/gfx/linux/drm_util_linux.h                                   | 2 ++
 5 files changed, 6 insertions(+)

Index: chromium-84.0.4147.30/chrome/browser/search/background/ntp_backgrounds.h
===================================================================
--- 
chromium-84.0.4147.30.orig/chrome/browser/search/background/ntp_backgrounds.h
+++ chromium-84.0.4147.30/chrome/browser/search/background/ntp_backgrounds.h
@@ -6,6 +6,7 @@
 #define CHROME_BROWSER_SEARCH_BACKGROUND_NTP_BACKGROUNDS_H_
 
 #include <array>
+#include <cstddef>
 
 class GURL;
 
Index: chromium-84.0.4147.30/third_party/webrtc/call/rtx_receive_stream.h
===================================================================
--- chromium-84.0.4147.30.orig/third_party/webrtc/call/rtx_receive_stream.h
+++ chromium-84.0.4147.30/third_party/webrtc/call/rtx_receive_stream.h
@@ -13,6 +13,7 @@
 
 #include <cstdint>
 #include <map>
+#include <cstdint>
 
 #include "call/rtp_packet_sink_interface.h"
 
Index: 
chromium-84.0.4147.30/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h
===================================================================
--- 
chromium-84.0.4147.30.orig/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h
+++ 
chromium-84.0.4147.30/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h
@@ -12,6 +12,7 @@
 #define MODULES_AUDIO_PROCESSING_AEC3_CLOCKDRIFT_DETECTOR_H_
 
 #include <array>
+#include <cstddef>
 
 namespace webrtc {
 
Index: chromium-84.0.4147.30/ui/gfx/linux/drm_util_linux.h
===================================================================
--- chromium-84.0.4147.30.orig/ui/gfx/linux/drm_util_linux.h
+++ chromium-84.0.4147.30/ui/gfx/linux/drm_util_linux.h
@@ -9,6 +9,8 @@
 
 #include "ui/gfx/buffer_types.h"
 
+#include <cstdint>
+
 namespace ui {
 
 int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format);
++++++ chromium-84-AXObject-stl-iterator.patch ++++++
>From f3dfe39f9fd3091cf1a7146b936d9de77a459435 Mon Sep 17 00:00:00 2001
From: Piotr Tworek <ptwo...@vewd.com>
Date: Mon, 18 May 2020 15:24:35 +0000
Subject: [PATCH] Make blink::AXObject::AncestorsIterator STL compatible.

Commit 31e5188ffc9a04295997d22bfdb68fc367bef047, "Used some methods from
AXRoleProperties in AXObject" started using std::any_of with this custom
iterator type. Unfortunately this iterator does not provide traits
mandated by the standard. This works fine for libcxx, but fails when
compiling the code against libstdc++.

Bug: 819294
Change-Id: I78fe25475593d73ce255f1de955aa41e936dff86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2207112
Reviewed-by: Kentaro Hara <hara...@chromium.org>
Commit-Queue: Piotr Tworek <ptwo...@vewd.com>
Cr-Commit-Position: refs/heads/master@{#769713}
---

diff --git a/third_party/blink/renderer/modules/accessibility/ax_object.h 
b/third_party/blink/renderer/modules/accessibility/ax_object.h
index 841715b..fbb87bf 100644
--- a/third_party/blink/renderer/modules/accessibility/ax_object.h
+++ b/third_party/blink/renderer/modules/accessibility/ax_object.h
@@ -274,6 +274,12 @@
   class MODULES_EXPORT AncestorsIterator final
       : public GarbageCollected<AncestorsIterator> {
    public:
+    using iterator_category = std::forward_iterator_tag;
+    using value_type = AXObject;
+    using difference_type = ptrdiff_t;
+    using pointer = value_type*;
+    using reference = value_type&;
+
     ~AncestorsIterator() = default;
 
     AncestorsIterator(const AncestorsIterator& other)
++++++ chromium-84-FilePath-add-noexcept.patch ++++++
>From c65b4d03c76da607b6b678c4a46baa75ca0cf7b3 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <sth...@googlemail.com>
Date: Wed, 27 May 2020 18:46:40 +0000
Subject: [PATCH] GCC: make base::FilePath move assignment operator noexcept

The move assignment operator in PaintPreviewClient::PaintPreviewData is
noexcept. Because this class has a member of type base::FilePath, the
move assignment operator of base::FilePath must be noexcept too.

Otherwise GCC fails like this:

../../components/paint_preview/browser/paint_preview_client.cc:107:1:

error: function 'paint_preview::PaintPreviewClient::PaintPreviewData&
paint_preview::PaintPreviewClient::PaintPreviewData::operator=
(paint_preview::PaintPreviewClient::PaintPreviewData&&)' defaulted on
its redeclaration with an exception-specification that differs from
the implicit exception-specification ''
  107 | PaintPreviewClient::PaintPreviewData::operator=(
      | ^~~~~~~~~~~~~~~~~~

Bug: 819294
Change-Id: I87b88a81e8af6b7e61f0d1a8c8444fd6707e50d2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2218168
Commit-Queue: Lei Zhang <thes...@chromium.org>
Reviewed-by: Lei Zhang <thes...@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772348}
---

diff --git a/base/files/file_path.cc b/base/files/file_path.cc
index 6dc6854..56c02d2b 100644
--- a/base/files/file_path.cc
+++ b/base/files/file_path.cc
@@ -186,7 +186,7 @@
 
 FilePath& FilePath::operator=(const FilePath& that) = default;
 
-FilePath& FilePath::operator=(FilePath&& that) = default;
+FilePath& FilePath::operator=(FilePath&& that) noexcept = default;
 
 bool FilePath::operator==(const FilePath& that) const {
 #if defined(FILE_PATH_USES_DRIVE_LETTERS)
diff --git a/base/files/file_path.h b/base/files/file_path.h
index 4e23f71a..2160fda 100644
--- a/base/files/file_path.h
+++ b/base/files/file_path.h
@@ -193,7 +193,7 @@
   FilePath(FilePath&& that) noexcept;
   // Replaces the contents with those of |that|, which is left in valid but
   // unspecified state.
-  FilePath& operator=(FilePath&& that);
+  FilePath& operator=(FilePath&& that) noexcept;
 
   bool operator==(const FilePath& that) const;
 
++++++ chromium-84-base-has_bultin.patch ++++++
>From f2076c6a4c9c14538d71a3ef9c9e4fd40ee6ee00 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <sth...@googlemail.com>
Date: Sun, 31 May 2020 11:46:05 +0000
Subject: [PATCH] GCC: fix __has_builtin defines for non-clang compilers

Defining __has_builtin to 0 for non-clang compilers in base headers can
lead to wrong detection of features. For example in base/location.h
checking for __has_builtin macros succeeds for non-clang compilers,
because base/check_op.h defines __has_builtin to 0 and is included
before base/location.h. Instead of defining __has_builtin to 0 for
non-clang compilers, define an independent preprocessor symbol that
reflects support for requested feature. Undefine the symbol to avoid
collision.

While we're at it fix base/memory/aligned_memory.h too.

Bug: 819294
Change-Id: Iac40dc44e7356b600e7d06aa4ccd1294bb09ebce
---

diff --git a/base/check_op.h b/base/check_op.h
index 04b0c6f..28f4263a 100644
--- a/base/check_op.h
+++ b/base/check_op.h
@@ -48,8 +48,10 @@
                                  void (*stream_func)(std::ostream&,
                                                      const void*));
 
-#ifndef __has_builtin
-#define __has_builtin(x) 0  // Compatibility with non-clang compilers.
+#ifdef __has_builtin
+#define SUPPORTS_BUILTIN_ADDRESSOF (__has_builtin(__builtin_addressof))
+#else
+#define SUPPORTS_BUILTIN_ADDRESSOF 0
 #endif
 
 template <typename T>
@@ -65,7 +67,7 @@
   // operator& might be overloaded, so do the std::addressof dance.
   // __builtin_addressof is preferred since it also handles Obj-C ARC pointers.
   // Some casting is still needed, because T might be volatile.
-#if __has_builtin(__builtin_addressof)
+#if SUPPORTS_BUILTIN_ADDRESSOF
   const void* vp = const_cast<const void*>(
       reinterpret_cast<const volatile void*>(__builtin_addressof(v)));
 #else
@@ -75,6 +77,8 @@
   return StreamValToStr(vp, f);
 }
 
+#undef SUPPORTS_BUILTIN_ADDRESSOF
+
 // Overload for types that have no operator<< but do have .ToString() defined.
 template <typename T>
 inline typename std::enable_if<
diff --git a/base/memory/aligned_memory.h b/base/memory/aligned_memory.h
index d1cba0c..a0d9f13 100644
--- a/base/memory/aligned_memory.h
+++ b/base/memory/aligned_memory.h
@@ -57,13 +57,15 @@
   }
 };
 
-#ifndef __has_builtin
-#define __has_builtin(x) 0  // Compatibility with non-clang compilers.
+#ifdef __has_builtin
+#define SUPPORTS_BUILTIN_IS_ALIGNED (__has_builtin(__builtin_is_aligned))
+#else
+#define SUPPORTS_BUILTIN_IS_ALIGNED 0
 #endif
 
 inline bool IsAligned(uintptr_t val, size_t alignment) {
   // If the compiler supports builtin alignment checks prefer them.
-#if __has_builtin(__builtin_is_aligned)
+#if SUPPORTS_BUILTIN_IS_ALIGNED
   return __builtin_is_aligned(val, alignment);
 #else
   DCHECK(!((alignment - 1) & alignment))
@@ -72,6 +74,8 @@
 #endif
 }
 
+#undef SUPPORTS_BUILTIN_IS_ALIGNED
+
 inline bool IsAligned(void* val, size_t alignment) {
   return IsAligned(reinterpret_cast<uintptr_t>(val), alignment);
 }
++++++ chromium-84-blink-disable-clang-format.patch ++++++
>From 08ac7188f414218ac9d764e29e7aa64a6bfc2f96 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <sth...@googlemail.com>
Date: Sun, 31 May 2020 10:02:03 +0000
Subject: [PATCH] disable clang-format for generated code in blink

For GCC builds clang-format might be not available. Additionally,
current scripts look for clang-format within chromium sources and
don't consider system clang-format.
---
 .../bindings/scripts/bind_gen/codegen_utils.py         | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git 
a/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_utils.py 
b/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_utils.py
index 7021f1a..33bf5bf 100644
--- a/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_utils.py
+++ b/third_party/blink/renderer/bindings/scripts/bind_gen/codegen_utils.py
@@ -150,12 +150,4 @@ def write_code_node_to_file(code_node, filepath):
 
     rendered_text = render_code_node(code_node)
 
-    format_result = style_format.auto_format(rendered_text, filename=filepath)
-    if not format_result.did_succeed:
-        raise RuntimeError("Style-formatting failed: filename = {filename}\n"
-                           "---- stderr ----\n"
-                           "{stderr}:".format(
-                               filename=format_result.filename,
-                               stderr=format_result.error_message))
-
-    web_idl.file_io.write_to_file_if_changed(filepath, format_result.contents)
+    web_idl.file_io.write_to_file_if_changed(filepath, rendered_text)
-- 
2.26.2

++++++ chromium-84-fix-decltype.patch ++++++
>From df413313083a9dabdc573545aaf70343aa0830ca Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <sth...@googlemail.com>
Date: Wed, 27 May 2020 17:03:03 +0000
Subject: [PATCH] GCC: fix decltype to get a valid function pointer

The decltype(<func>) passed as template parameter to
CBBFunctionToVector does not return a function pointer
and GCC complains like this:

../../device/fido/virtual_fido_device.cc:104:68: error:
 'int(struct cbb_st*, const struct evp_pkey_st*)' is not a valid type
 for a template non-type parameter
  104 |                         EVP_marshal_private_key>(pkey_.get());
      |                                                           ^

Fix this by passing decltype(&<func>).

Bug: 819294
Change-Id: I8114c3d75c9865779d58c0b6a6c48e6affd3175b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2217414
Reviewed-by: Adam Langley <a...@chromium.org>
Commit-Queue: Adam Langley <a...@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772283}
---

diff --git a/device/fido/virtual_fido_device.cc 
b/device/fido/virtual_fido_device.cc
index 0256c6a..72423d3 100644
--- a/device/fido/virtual_fido_device.cc
+++ b/device/fido/virtual_fido_device.cc
@@ -51,7 +51,7 @@
 
 // CBBFunctionToVector converts a BoringSSL function that writes to a CBB to 
one
 // that returns a std::vector. Invoke for a function, f, with:
-//   CBBFunctionToVector<decltype(f), f>(args, to, f);
+//   CBBFunctionToVector<decltype(&f), f>(args, to, f);
 template <typename F, F function, typename... Args>
 std::vector<uint8_t> CBBFunctionToVector(Args&&... args) {
   uint8_t* der = nullptr;
@@ -102,7 +102,7 @@
   }
 
   std::vector<uint8_t> GetPKCS8PrivateKey() const override {
-    return CBBFunctionToVector<decltype(EVP_marshal_private_key),
+    return CBBFunctionToVector<decltype(&EVP_marshal_private_key),
                                EVP_marshal_private_key>(pkey_.get());
   }
 
@@ -122,7 +122,7 @@
 
   std::vector<uint8_t> GetX962PublicKey() const override {
     const EC_KEY* ec_key = EVP_PKEY_get0_EC_KEY(pkey_.get());
-    return CBBFunctionToVector<decltype(EC_POINT_point2cbb),
+    return CBBFunctionToVector<decltype(&EC_POINT_point2cbb),
                                EC_POINT_point2cbb>(
         EC_KEY_get0_group(ec_key), EC_KEY_get0_public_key(ec_key),
         POINT_CONVERSION_UNCOMPRESSED, /*ctx=*/nullptr);
@@ -172,7 +172,7 @@
         cbor::Writer::Write(cbor::Value(std::move(map))));
 
     std::vector<uint8_t> der_bytes(
-        CBBFunctionToVector<decltype(EVP_marshal_public_key),
+        CBBFunctionToVector<decltype(&EVP_marshal_public_key),
                             EVP_marshal_public_key>(pkey_.get()));
 
     return std::make_unique<PublicKey>(
++++++ chromium-84-gcc-DOMRect-constexpr.patch ++++++
>From 62f633b8ca2b2376ca3273e6df910feb4bd93578 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <sth...@googlemail.com>
Date: Wed, 27 May 2020 19:23:12 +0000
Subject: [PATCH] GCC: DOMRect constexpr equal operator depends on non constexpr 
operators

Make operators 'inline' only.

Bug: 819294
Change-Id: If07442258b4ebce26c013c4dff830c1d61dff9e3
---

diff --git a/third_party/blink/renderer/core/geometry/dom_rect.h 
b/third_party/blink/renderer/core/geometry/dom_rect.h
index fede005..058c60a 100644
--- a/third_party/blink/renderer/core/geometry/dom_rect.h
+++ b/third_party/blink/renderer/core/geometry/dom_rect.h
@@ -34,11 +34,11 @@
   void setHeight(double height) { height_ = height; }
 };
 
-constexpr bool operator==(const DOMRect& lhs, const DOMRect& rhs) {
+inline bool operator==(const DOMRect& lhs, const DOMRect& rhs) {
   return lhs.x() == rhs.x() && lhs.y() == rhs.y() &&
          lhs.width() == rhs.width() && lhs.height() == rhs.height();
 }
-constexpr bool operator!=(const DOMRect& lhs, const DOMRect& rhs) {
+inline bool operator!=(const DOMRect& lhs, const DOMRect& rhs) {
   return !(lhs == rhs);
 }
 }  // namespace blink
++++++ chromium-84-gcc-include.patch ++++++
>From 60e856c553f4532c2035b087dbdbdde42dbb5f09 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <sth...@googlemail.com>
Date: Sat, 9 May 2020 11:33:04 +0000
Subject: [PATCH] IWYU: memcpy is defined in cstring

---
 cc/base/list_container_helper.cc | 1 +
 1 file changed, 1 insertion(+)

Index: chromium-84.0.4147.30/cc/base/list_container_helper.cc
===================================================================
--- chromium-84.0.4147.30.orig/cc/base/list_container_helper.cc
+++ chromium-84.0.4147.30/cc/base/list_container_helper.cc
@@ -7,6 +7,7 @@
 #include <stddef.h>
 
 #include <algorithm>
+#include <cstring>
 #include <vector>
 
 #include "base/check_op.h"
Index: chromium-84.0.4147.30/third_party/blink/common/input/web_touch_event.cc
===================================================================
--- chromium-84.0.4147.30.orig/third_party/blink/common/input/web_touch_event.cc
+++ chromium-84.0.4147.30/third_party/blink/common/input/web_touch_event.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <bitset>
+
 #include "third_party/blink/public/common/input/web_touch_event.h"
 
 #include <bitset>
Index: 
chromium-84.0.4147.30/third_party/crashpad/crashpad/snapshot/minidump/minidump_context_converter.cc
===================================================================
--- 
chromium-84.0.4147.30.orig/third_party/crashpad/crashpad/snapshot/minidump/minidump_context_converter.cc
+++ 
chromium-84.0.4147.30/third_party/crashpad/crashpad/snapshot/minidump/minidump_context_converter.cc
@@ -14,6 +14,8 @@
 
 #include "snapshot/minidump/minidump_context_converter.h"
 
+#include <cstring>
+
 #include "base/stl_util.h"
 #include "minidump/minidump_context.h"
 
Index: 
chromium-84.0.4147.30/third_party/crashpad/crashpad/util/linux/ptrace_client.cc
===================================================================
--- 
chromium-84.0.4147.30.orig/third_party/crashpad/crashpad/util/linux/ptrace_client.cc
+++ 
chromium-84.0.4147.30/third_party/crashpad/crashpad/util/linux/ptrace_client.cc
@@ -17,6 +17,7 @@
 #include <errno.h>
 #include <stdio.h>
 
+#include <cstring>
 #include <string>
 
 #include "base/logging.h"
Index: 
chromium-84.0.4147.30/third_party/crashpad/crashpad/util/net/http_multipart_builder.cc
===================================================================
--- 
chromium-84.0.4147.30.orig/third_party/crashpad/crashpad/util/net/http_multipart_builder.cc
+++ 
chromium-84.0.4147.30/third_party/crashpad/crashpad/util/net/http_multipart_builder.cc
@@ -16,6 +16,7 @@
 
 #include <sys/types.h>
 
+#include <cstring>
 #include <utility>
 #include <vector>
 
Index: 
chromium-84.0.4147.30/third_party/crashpad/crashpad/util/net/http_transport_socket.cc
===================================================================
--- 
chromium-84.0.4147.30.orig/third_party/crashpad/crashpad/util/net/http_transport_socket.cc
+++ 
chromium-84.0.4147.30/third_party/crashpad/crashpad/util/net/http_transport_socket.cc
@@ -19,6 +19,8 @@
 #include <poll.h>
 #include <sys/socket.h>
 
+#include <cstring>
+
 #include "base/logging.h"
 #include "base/macros.h"
 #include "base/numerics/safe_conversions.h"
Index: 
chromium-84.0.4147.30/third_party/crashpad/crashpad/util/process/process_memory.cc
===================================================================
--- 
chromium-84.0.4147.30.orig/third_party/crashpad/crashpad/util/process/process_memory.cc
+++ 
chromium-84.0.4147.30/third_party/crashpad/crashpad/util/process/process_memory.cc
@@ -15,6 +15,7 @@
 #include "util/process/process_memory.h"
 
 #include <algorithm>
+#include <cstring>
 
 #include "base/logging.h"
 #include "util/numeric/safe_assignment.h"
Index: 
chromium-84.0.4147.30/third_party/crashpad/crashpad/util/stream/log_output_stream.cc
===================================================================
--- 
chromium-84.0.4147.30.orig/third_party/crashpad/crashpad/util/stream/log_output_stream.cc
+++ 
chromium-84.0.4147.30/third_party/crashpad/crashpad/util/stream/log_output_stream.cc
@@ -15,6 +15,7 @@
 #include "util/stream/log_output_stream.h"
 
 #include <algorithm>
+#include <cstring>
 
 #include "base/logging.h"
 
++++++ chromium-84-gcc-noexcept.patch ++++++
diff --git a/third_party/blink/public/platform/cross_variant_mojo_util.h 
b/third_party/blink/public/platform/cross_variant_mojo_util.h
index dee0b95..0c83580 100644
--- a/third_party/blink/public/platform/cross_variant_mojo_util.h
+++ b/third_party/blink/public/platform/cross_variant_mojo_util.h
@@ -124,7 +124,7 @@ class CrossVariantMojoAssociatedReceiver {
   ~CrossVariantMojoAssociatedReceiver() = default;
 
   CrossVariantMojoAssociatedReceiver(
-      CrossVariantMojoAssociatedReceiver&&) noexcept = default;
+      CrossVariantMojoAssociatedReceiver&&) = default;
   CrossVariantMojoAssociatedReceiver& operator=(
       CrossVariantMojoAssociatedReceiver&&) noexcept = default;
 
@@ -155,7 +155,7 @@ class CrossVariantMojoAssociatedRemote {
   ~CrossVariantMojoAssociatedRemote() = default;
 
   CrossVariantMojoAssociatedRemote(
-      CrossVariantMojoAssociatedRemote&&) noexcept = default;
+      CrossVariantMojoAssociatedRemote&&) = default;
   CrossVariantMojoAssociatedRemote& operator=(
       CrossVariantMojoAssociatedRemote&&) noexcept = default;
 
diff --git a/base/containers/flat_map.h b/base/containers/flat_map.h
index ed82c5d..1af6b40 100644
--- a/base/containers/flat_map.h
+++ b/base/containers/flat_map.h
@@ -202,7 +202,7 @@ class flat_map : public ::base::internal::flat_tree<
   ~flat_map() = default;
 
   flat_map& operator=(const flat_map&) = default;
-  flat_map& operator=(flat_map&&) = default;
+  flat_map& operator=(flat_map&&) noexcept = default;
   // Takes the first if there are duplicates in the initializer list.
   flat_map& operator=(std::initializer_list<value_type> ilist);
 
diff --git a/base/containers/flat_tree.h b/base/containers/flat_tree.h
index 9412ff6..8ecc1fa 100644
--- a/base/containers/flat_tree.h
+++ b/base/containers/flat_tree.h
@@ -125,7 +125,7 @@ class flat_tree {
   // Assume that move assignment invalidates iterators and references.
 
   flat_tree& operator=(const flat_tree&);
-  flat_tree& operator=(flat_tree&&);
+  flat_tree& operator=(flat_tree&&) noexcept;
   // Takes the first if there are duplicates in the initializer list.
   flat_tree& operator=(std::initializer_list<value_type> ilist);
 
@@ -519,7 +519,7 @@ auto flat_tree<Key, Value, GetKeyFromValue, 
KeyCompare>::operator=(
 
 template <class Key, class Value, class GetKeyFromValue, class KeyCompare>
 auto flat_tree<Key, Value, GetKeyFromValue, KeyCompare>::operator=(flat_tree 
&&)
-    -> flat_tree& = default;
+    noexcept -> flat_tree& = default;
 
 template <class Key, class Value, class GetKeyFromValue, class KeyCompare>
 auto flat_tree<Key, Value, GetKeyFromValue, KeyCompare>::operator=(
++++++ chromium-84-gcc-template.patch ++++++
>From 2cd1ba11c364fc0f2f06c5fa3c15ff75ee860966 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <sth...@googlemail.com>
Date: Sat, 2 May 2020 16:42:38 +0000
Subject: [PATCH] GCC: fix template specialization in WTF::VectorBuffer

GCC complains that explicit specialization in non-namespace scope
is happening for InitInlinedBuffer. However, specialization is
not really necessary here with templates and can be moved
into InitInlinedBuffer method without changing generated code.
---
 third_party/blink/renderer/platform/wtf/vector.h | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/third_party/blink/renderer/platform/wtf/vector.h 
b/third_party/blink/renderer/platform/wtf/vector.h
index 81a4e7b..30ffa89 100644
--- a/third_party/blink/renderer/platform/wtf/vector.h
+++ b/third_party/blink/renderer/platform/wtf/vector.h
@@ -950,11 +950,10 @@ class VectorBuffer : protected VectorBufferBase<T, 
Allocator> {
     return unsafe_reinterpret_cast_ptr<const T*>(inline_buffer_);
   }
 
-  template <bool = Allocator::kIsGarbageCollected>
-  void InitInlinedBuffer() {}
-  template <>
-  void InitInlinedBuffer<true>() {
-    memset(&inline_buffer_, 0, kInlineBufferSize);
+  void InitInlinedBuffer() {
+    if ( Allocator::kIsGarbageCollected ) {
+      memset(&inline_buffer_, 0, kInlineBufferSize);
+    }
   }
 
   alignas(T) char inline_buffer_[kInlineBufferSize];
-- 
2.26.2
>From 421aca221966c7d736c4bc5f268a730199f02fb9 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <sth...@googlemail.com>
Date: Sat, 9 May 2020 14:59:07 +0000
Subject: [PATCH] GCC: fix template specialization in TraceInCollectionTrait

GCC complains that explicit specialization in non-namespace scope
is happening for TraceImpl. Move TraceImpl implementations into
different nested classes and select implementation using
std::conditional.
---
 .../heap_hash_table_backing.h                 | 80 ++++++++++---------
 1 file changed, 41 insertions(+), 39 deletions(-)

diff --git 
a/third_party/blink/renderer/platform/heap/collection_support/heap_hash_table_backing.h
 
b/third_party/blink/renderer/platform/heap/collection_support/heap_hash_table_backing.h
index a6c73f5..068ab8e 100644
--- 
a/third_party/blink/renderer/platform/heap/collection_support/heap_hash_table_backing.h
+++ 
b/third_party/blink/renderer/platform/heap/collection_support/heap_hash_table_backing.h
@@ -241,50 +241,52 @@ struct TraceInCollectionTrait<kNoWeakHandling,
 
   static void Trace(blink::Visitor* visitor,
                     const KeyValuePair<Key, Value>& self) {
-    TraceImpl(visitor, self);
+    TraceImpl::TraceImpl(visitor, self);
   }
 
  private:
-  template <bool = EphemeronHelper::is_ephemeron>
-  static void TraceImpl(blink::Visitor* visitor,
-                        const KeyValuePair<Key, Value>& self);
-
-  // Strongification of ephemerons, i.e., Weak/Strong and Strong/Weak.
-  template <>
-  static void TraceImpl<true>(blink::Visitor* visitor,
-                              const KeyValuePair<Key, Value>& self) {
+  struct TraceImplEphemerons {
     // Strongification of ephemerons, i.e., Weak/Strong and Strong/Weak.
-    // The helper ensures that helper.key always refers to the weak part and
-    // helper.value always refers to the dependent part.
-    // We distinguish ephemeron from Weak/Weak and Strong/Strong to allow users
-    // to override visitation behavior. An example is creating a heap snapshot,
-    // where it is useful to annotate values as being kept alive from keys
-    // rather than the table.
-    EphemeronHelper helper(&self.key, &self.value);
-    // Strongify the weak part.
-    blink::TraceCollectionIfEnabled<
-        kNoWeakHandling, typename EphemeronHelper::KeyType,
-        typename EphemeronHelper::KeyTraits>::Trace(visitor, helper.key);
-    // Strongify the dependent part.
-    visitor->TraceEphemeron(
-        *helper.key, helper.value,
-        blink::TraceCollectionIfEnabled<
-            kNoWeakHandling, typename EphemeronHelper::ValueType,
-            typename EphemeronHelper::ValueTraits>::Trace);
-  }
+    static void TraceImpl(blink::Visitor* visitor,
+                          const KeyValuePair<Key, Value>& self) {
+      // Strongification of ephemerons, i.e., Weak/Strong and Strong/Weak.
+      // The helper ensures that helper.key always refers to the weak part and
+      // helper.value always refers to the dependent part.
+      // We distinguish ephemeron from Weak/Weak and Strong/Strong to allow 
users
+      // to override visitation behavior. An example is creating a heap 
snapshot,
+      // where it is useful to annotate values as being kept alive from keys
+      // rather than the table.
+      EphemeronHelper helper(&self.key, &self.value);
+      // Strongify the weak part.
+      blink::TraceCollectionIfEnabled<
+          kNoWeakHandling, typename EphemeronHelper::KeyType,
+          typename EphemeronHelper::KeyTraits>::Trace(visitor, helper.key);
+      // Strongify the dependent part.
+      visitor->TraceEphemeron(
+          *helper.key, helper.value,
+          blink::TraceCollectionIfEnabled<
+              kNoWeakHandling, typename EphemeronHelper::ValueType,
+              typename EphemeronHelper::ValueTraits>::Trace);
+    }
+  };
 
-  template <>
-  static void TraceImpl<false>(blink::Visitor* visitor,
-                               const KeyValuePair<Key, Value>& self) {
-    // Strongification of non-ephemeron KVP, i.e., Strong/Strong or Weak/Weak.
-    // Order does not matter here.
-    blink::TraceCollectionIfEnabled<
-        kNoWeakHandling, Key, typename Traits::KeyTraits>::Trace(visitor,
-                                                                 &self.key);
-    blink::TraceCollectionIfEnabled<
-        kNoWeakHandling, Value,
-        typename Traits::ValueTraits>::Trace(visitor, &self.value);
-  }
+  struct TraceImplDefault {
+    static void TraceImpl(blink::Visitor* visitor,
+                          const KeyValuePair<Key, Value>& self) {
+      // Strongification of non-ephemeron KVP, i.e., Strong/Strong or 
Weak/Weak.
+      // Order does not matter here.
+      blink::TraceCollectionIfEnabled<
+          kNoWeakHandling, Key, typename Traits::KeyTraits>::Trace(visitor,
+                                                                   &self.key);
+      blink::TraceCollectionIfEnabled<
+          kNoWeakHandling, Value,
+          typename Traits::ValueTraits>::Trace(visitor, &self.value);
+    }
+  };
+
+  using TraceImpl = typename std::conditional<EphemeronHelper::is_ephemeron,
+                                              TraceImplEphemerons,
+                                              TraceImplDefault>::type;
 };
 
 template <typename Key, typename Value, typename Traits>
-- 
2.26.2
++++++ chromium-84-gcc-unique_ptr.patch ++++++
>From 9b749dc5c7fdb0f4b1bd0df5901beb6af1b81ff1 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <sth...@googlemail.com>
Date: Sat, 9 May 2020 16:46:07 +0000
Subject: [PATCH] GCC: fix DCHECK_EQ in NGInlineNode::SegmentScriptRuns

data->segments is a std::unique_ptr, but underlying CheckOpValueStr
has no overloaded function for std::unique_ptr.
However, overloaded function with const void* exists and can be
used with std::unique_ptr::get().
---
 .../blink/renderer/core/layout/ng/inline/ng_inline_node.cc      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc 
b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc
index 55ca9e3..ee691df 100644
--- a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc
+++ b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc
@@ -891,7 +891,7 @@ void NGInlineNode::SegmentText(NGInlineNodeData* data) {
 
 // Segment NGInlineItem by script, Emoji, and orientation using RunSegmenter.
 void NGInlineNode::SegmentScriptRuns(NGInlineNodeData* data) {
-  DCHECK_EQ(data->segments, nullptr);
+  DCHECK_EQ(data->segments.get(), nullptr);
 
   String& text_content = data->text_content;
   if (text_content.IsEmpty()) {
-- 
2.26.2

++++++ chromium-84-gcc-use-brace-initializer.patch ++++++
>From fff3279bcf904673d312893b09bfc53811028490 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <sth...@googlemail.com>
Date: Thu, 28 May 2020 03:17:09 +0000
Subject: [PATCH] GCC: use brace-initializer for QuotaClientType base::flat_set

Constructing base::flat_set of QuotaClientType with parenthesis
constructor is ambiguous in GCC. Use brace-initializer to avoid
that problem.

Bug: 819294
Change-Id: Id33256a25d2af98d7be6ee570e2535a8b7bdf031
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2217554
Reviewed-by: Kinuko Yasuda <kin...@chromium.org>
Commit-Queue: Kinuko Yasuda <kin...@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772542}
---

diff --git a/storage/browser/quota/quota_client_type.cc 
b/storage/browser/quota/quota_client_type.cc
index b9e9f62..a2daaa2 100644
--- a/storage/browser/quota/quota_client_type.cc
+++ b/storage/browser/quota/quota_client_type.cc
@@ -9,7 +9,7 @@
 namespace storage {
 
 const QuotaClientTypes& AllQuotaClientTypes() {
-  static base::NoDestructor<QuotaClientTypes> all({
+  static base::NoDestructor<QuotaClientTypes> all{{
       QuotaClientType::kFileSystem,
       QuotaClientType::kDatabase,
       QuotaClientType::kAppcache,
@@ -17,7 +17,7 @@
       QuotaClientType::kServiceWorkerCache,
       QuotaClientType::kServiceWorker,
       QuotaClientType::kBackgroundFetch,
-  });
+  }};
   return *all;
 }
 
++++++ chromium-84-mediaalloc.patch ++++++
https://bugs.chromium.org/p/chromium/issues/detail?id=1095962

--- /media/base/media.cc
+++ /media/base/media.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <limits>
+
 #include "media/base/media.h"
 
 #include "base/allocator/buildflags.h"
@@ -41,7 +43,7 @@
 
 #if BUILDFLAG(USE_ALLOCATOR_SHIM)
     // Remove allocation limit from ffmpeg, so calls go down to shim layer.
-    av_max_alloc(0);
+    av_max_alloc(std::numeric_limits<size_t>::max());
 #endif  // BUILDFLAG(USE_ALLOCATOR_SHIM)
 
 #endif  // BUILDFLAG(ENABLE_FFMPEG)
++++++ chromium-84-nss-include.patch ++++++
>From 3a3effdd81e97bfc4f2698cd1f41b008355b0469 Mon Sep 17 00:00:00 2001
From: Raphael Kubo da Costa <raphael.kubo.da.co...@intel.com>
Date: Tue, 26 May 2020 16:34:45 +0000
Subject: [PATCH] scoped_nss_types.h: Include <certt.h> instead of
 <nss/certt.h>

Follow-up to commit 701cae5de ("Introduce a function to format a DER-encoded
SPKI for UI").

That is the format used by other files that include <certt.h>, and the
pkg-config configuration already passes -I/path/to/nss to the compiler.

This can potentially fix the non-sysroot build, as the NSS headers might be
installed in e.g. /usr/include/nss3 rather than /usr/include/nss.

Change-Id: I0461a7a7f8c93459f2281ea71c96434a74687ee8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2214390
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.co...@intel.com>
Commit-Queue: David Benjamin <david...@chromium.org>
Reviewed-by: David Benjamin <david...@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771840}
---
 crypto/scoped_nss_types.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/scoped_nss_types.h b/crypto/scoped_nss_types.h
index 2a3a6e1b25179..0a663ea7c3b37 100644
--- a/crypto/scoped_nss_types.h
+++ b/crypto/scoped_nss_types.h
@@ -5,9 +5,9 @@
 #ifndef CRYPTO_SCOPED_NSS_TYPES_H_
 #define CRYPTO_SCOPED_NSS_TYPES_H_
 
+#include <certt.h>
 #include <keyhi.h>
 #include <nss.h>
-#include <nss/certt.h>
 #include <pk11pub.h>
 #include <plarena.h>
 
++++++ chromium-84-ozone-include.patch ++++++
>From 70ea8ba2c50be2a4bc476261e7640d824b938c99 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <sth...@googlemail.com>
Date: Sat, 13 Jun 2020 18:16:27 +0000
Subject: [PATCH] IWYU: add missing include for memset

---
 ui/events/ozone/evdev/event_device_info.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ui/events/ozone/evdev/event_device_info.cc 
b/ui/events/ozone/evdev/event_device_info.cc
index efbc258..0c5f0a3 100644
--- a/ui/events/ozone/evdev/event_device_info.cc
+++ b/ui/events/ozone/evdev/event_device_info.cc
@@ -5,6 +5,7 @@
 #include "ui/events/ozone/evdev/event_device_info.h"
 
 #include <linux/input.h>
+#include <string.h>
 
 #include "base/files/file_path.h"
 #include "base/logging.h"
-- 
2.26.2

++++++ chromium-84-revert-manage-ManifestManagerHost-per-document.patch ++++++
commit fce18322d66ea6e67275e13242dae2a8c06d3ae2
Author: Yuzu Saijo <yu...@chromium.org>
Date:   Thu May 14 05:02:09 2020 +0000

    [content] Manage ManifestManagerHost per-document
    
    This CL converts ManifestManagerHost class away from being owned by
    WebContents and makes it a part of RenderDocumentHostUserData.
    
    We used to create an instance per-WebContents, but now it is created for
    document, and only for main-frame.
    
    Bug: 1077170
    Change-Id: I2a185a6cd6f290d3b904d359b55638bf09eaa79f
    Reviewed-on: 
https://chromium-review.googlesource.com/c/chromium/src/+/2147485
    Commit-Queue: Yuzu Saijo <yu...@chromium.org>
    Reviewed-by: Kinuko Yasuda <kin...@chromium.org>
    Reviewed-by: Kentaro Hara <hara...@chromium.org>
    Reviewed-by: Sreeja Kamishetty <sreejakshe...@chromium.org>
    Reviewed-by: Alexander Timin <alti...@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#768647}

diff --git b/content/browser/devtools/protocol/page_handler.cc 
a/content/browser/devtools/protocol/page_handler.cc
index b1821434b975..929b63ab875e 100644
--- b/content/browser/devtools/protocol/page_handler.cc
+++ a/content/browser/devtools/protocol/page_handler.cc
@@ -961,14 +961,14 @@ Response PageHandler::SetDownloadBehavior(const 
std::string& behavior,
 
 void PageHandler::GetAppManifest(
     std::unique_ptr<GetAppManifestCallback> callback) {
-  if (!host_) {
+  WebContentsImpl* web_contents = GetWebContents();
+  if (!web_contents || !web_contents->GetManifestManagerHost()) {
     callback->sendFailure(Response::ServerError("Cannot retrieve manifest"));
     return;
   }
-  ManifestManagerHost::GetOrCreateForCurrentDocument(host_->GetMainFrame())
-      ->RequestManifestDebugInfo(base::BindOnce(&PageHandler::GotManifest,
-                                                weak_factory_.GetWeakPtr(),
-                                                std::move(callback)));
+  web_contents->GetManifestManagerHost()->RequestManifestDebugInfo(
+      base::BindOnce(&PageHandler::GotManifest, weak_factory_.GetWeakPtr(),
+                     std::move(callback)));
 }
 
 WebContentsImpl* PageHandler::GetWebContents() {
diff --git 
b/content/browser/frame_host/render_document_host_user_data_browsertest.cc 
a/content/browser/frame_host/render_document_host_user_data_browsertest.cc
index 09dff7842517..290e5509b448 100644
--- b/content/browser/frame_host/render_document_host_user_data_browsertest.cc
+++ a/content/browser/frame_host/render_document_host_user_data_browsertest.cc
@@ -88,7 +88,7 @@ class RenderDocumentHostUserDataTest : public 
ContentBrowserTest {
 
 // Test basic functionality of RenderDocumentHostUserData.
 IN_PROC_BROWSER_TEST_F(RenderDocumentHostUserDataTest,
-                       GetCreateAndDeleteForCurrentDocument) {
+                       GetAndCreateForCurrentDocument) {
   ASSERT_TRUE(embedded_test_server()->Start());
   GURL url_a(embedded_test_server()->GetURL("a.com", "/title1.html"));
 
@@ -104,14 +104,8 @@ IN_PROC_BROWSER_TEST_F(RenderDocumentHostUserDataTest,
   // 3) Create Data and check that GetForCurrentDocument shouldn't return null
   // now.
   Data::CreateForCurrentDocument(rfh_a);
-  base::WeakPtr<Data> created_data =
-      Data::GetForCurrentDocument(rfh_a)->GetWeakPtr();
-  EXPECT_TRUE(created_data);
-
-  // 4) Delete Data and check that GetForCurrentDocument should return null.
-  Data::DeleteForCurrentDocument(rfh_a);
-  EXPECT_FALSE(created_data);
-  EXPECT_FALSE(Data::GetForCurrentDocument(rfh_a));
+  data = Data::GetForCurrentDocument(rfh_a);
+  EXPECT_TRUE(data);
 }
 
 // Tests that RenderDocumentHostUserData objects are different for each
diff --git b/content/browser/frame_host/render_frame_host_impl.cc 
a/content/browser/frame_host/render_frame_host_impl.cc
index 30bc648d74ef..d10d99df7f1f 100644
--- b/content/browser/frame_host/render_frame_host_impl.cc
+++ a/content/browser/frame_host/render_frame_host_impl.cc
@@ -75,7 +75,6 @@
 #include "content/browser/loader/navigation_url_loader_impl.h"
 #include "content/browser/loader/prefetch_url_loader_service.h"
 #include "content/browser/log_console_message.h"
-#include "content/browser/manifest/manifest_manager_host.h"
 #include "content/browser/media/capture/audio_mirroring_manager.h"
 #include "content/browser/media/media_interface_proxy.h"
 #include "content/browser/media/webaudio/audio_context_manager_impl.h"
@@ -6146,15 +6145,6 @@ void RenderFrameHostImpl::SetUpMojoIfNeeded() {
               std::make_unique<ActiveURLMessageFilter>(impl));
         },
         base::Unretained(this)));
-
-    associated_registry_->AddInterface(base::BindRepeating(
-        [](RenderFrameHostImpl* impl,
-           mojo::PendingAssociatedReceiver<
-               blink::mojom::ManifestUrlChangeObserver> receiver) {
-          ManifestManagerHost::GetOrCreateForCurrentDocument(impl)
-              ->BindObserver(std::move(receiver));
-        },
-        base::Unretained(this)));
   }
 
   associated_registry_->AddInterface(base::BindRepeating(
diff --git b/content/browser/frame_host/render_frame_host_impl.h 
a/content/browser/frame_host/render_frame_host_impl.h
index bfd421386795..2bba134e0dc0 100644
--- b/content/browser/frame_host/render_frame_host_impl.h
+++ a/content/browser/frame_host/render_frame_host_impl.h
@@ -1595,10 +1595,6 @@ class CONTENT_EXPORT RenderFrameHostImpl
     document_associated_data_.SetUserData(key, std::move(data));
   }
 
-  void RemoveRenderDocumentHostUserData(const void* key) {
-    document_associated_data_.RemoveUserData(key);
-  }
-
   // Returns the child RenderFrameHostImpl if |child_frame_routing_id| is an
   // immediate child of this FrameTreeNode. |child_frame_routing_id| is
   // considered untrusted, so the renderer process is killed if it refers to a
diff --git b/content/browser/manifest/manifest_manager_host.cc 
a/content/browser/manifest/manifest_manager_host.cc
index 68ea016c62eb..b063e0d1e98e 100644
--- b/content/browser/manifest/manifest_manager_host.cc
+++ a/content/browser/manifest/manifest_manager_host.cc
@@ -9,34 +9,25 @@
 #include "base/bind.h"
 #include "content/browser/web_contents/web_contents_impl.h"
 #include "content/public/browser/render_frame_host.h"
+#include "content/public/browser/web_contents.h"
 #include "services/service_manager/public/cpp/interface_provider.h"
 #include 
"third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
 #include "third_party/blink/public/common/manifest/manifest.h"
 
 namespace content {
 
-ManifestManagerHost::ManifestManagerHost(RenderFrameHost* render_frame_host)
-    : manifest_manager_frame_(render_frame_host) {
-  // Check that |manifest_manager_frame_| is a main frame.
-  DCHECK(!manifest_manager_frame_->GetParent());
-}
+ManifestManagerHost::ManifestManagerHost(WebContents* web_contents)
+    : WebContentsObserver(web_contents),
+      manifest_url_change_observer_receivers_(web_contents, this) {}
 
 ManifestManagerHost::~ManifestManagerHost() {
   OnConnectionError();
 }
 
-void ManifestManagerHost::BindObserver(
-    mojo::PendingAssociatedReceiver<blink::mojom::ManifestUrlChangeObserver>
-        receiver) {
-  manifest_url_change_observer_receiver_.Bind(std::move(receiver));
-}
-
-ManifestManagerHost* ManifestManagerHost::GetOrCreateForCurrentDocument(
-    RenderFrameHostImpl* rfh) {
-  DCHECK(rfh->is_main_frame());
-  if (!GetForCurrentDocument(rfh))
-    CreateForCurrentDocument(rfh);
-  return GetForCurrentDocument(rfh);
+void ManifestManagerHost::RenderFrameDeleted(
+    RenderFrameHost* render_frame_host) {
+  if (render_frame_host == manifest_manager_frame_)
+    OnConnectionError();
 }
 
 void ManifestManagerHost::GetManifest(GetManifestCallback callback) {
@@ -54,7 +45,11 @@ void ManifestManagerHost::RequestManifestDebugInfo(
 }
 
 blink::mojom::ManifestManager& ManifestManagerHost::GetManifestManager() {
+  if (manifest_manager_frame_ != web_contents()->GetMainFrame())
+    OnConnectionError();
+
   if (!manifest_manager_) {
+    manifest_manager_frame_ = web_contents()->GetMainFrame();
     manifest_manager_frame_->GetRemoteInterfaces()->GetInterface(
         manifest_manager_.BindNewPipeAndPassReceiver());
     manifest_manager_.set_disconnect_handler(base::BindOnce(
@@ -64,6 +59,8 @@ blink::mojom::ManifestManager& 
ManifestManagerHost::GetManifestManager() {
 }
 
 void ManifestManagerHost::OnConnectionError() {
+  manifest_manager_frame_ = nullptr;
+  manifest_manager_.reset();
   std::vector<GetManifestCallback> callbacks;
   for (CallbackMap::iterator it(&callbacks_); !it.IsAtEnd(); it.Advance()) {
     callbacks.push_back(std::move(*it.GetCurrentValue()));
@@ -71,10 +68,6 @@ void ManifestManagerHost::OnConnectionError() {
   callbacks_.Clear();
   for (auto& callback : callbacks)
     std::move(callback).Run(GURL(), blink::Manifest());
-
-  if (GetForCurrentDocument(manifest_manager_frame_)) {
-    DeleteForCurrentDocument(manifest_manager_frame_);
-  }
 }
 
 void ManifestManagerHost::OnRequestManifestResponse(
@@ -88,16 +81,12 @@ void ManifestManagerHost::OnRequestManifestResponse(
 
 void ManifestManagerHost::ManifestUrlChanged(
     const base::Optional<GURL>& manifest_url) {
-  if (!manifest_manager_frame_->IsCurrent())
+  if (manifest_url_change_observer_receivers_.GetCurrentTargetFrame() !=
+      web_contents()->GetMainFrame()) {
     return;
-
-  // TODO(yuzus): |NotifyManifestUrlChanged| should start taking a
-  // |RenderFrameHost| parameter.
-  WebContents* web_contents =
-      WebContents::FromRenderFrameHost(manifest_manager_frame_);
-  static_cast<WebContentsImpl*>(web_contents)
+  }
+  static_cast<WebContentsImpl*>(web_contents())
       ->NotifyManifestUrlChanged(manifest_url);
 }
 
-RENDER_DOCUMENT_HOST_USER_DATA_KEY_IMPL(ManifestManagerHost)
 }  // namespace content
diff --git b/content/browser/manifest/manifest_manager_host.h 
a/content/browser/manifest/manifest_manager_host.h
index 57f51dc9fad7..3dc0bbf6e1ad 100644
--- b/content/browser/manifest/manifest_manager_host.h
+++ a/content/browser/manifest/manifest_manager_host.h
@@ -8,8 +8,8 @@
 #include "base/callback_forward.h"
 #include "base/containers/id_map.h"
 #include "base/macros.h"
-#include "content/public/browser/render_document_host_user_data.h"
-#include "mojo/public/cpp/bindings/associated_receiver.h"
+#include "content/public/browser/web_contents_observer.h"
+#include "content/public/browser/web_contents_receiver_set.h"
 #include "mojo/public/cpp/bindings/remote.h"
 #include "third_party/blink/public/mojom/manifest/manifest_manager.mojom.h"
 #include "third_party/blink/public/mojom/manifest/manifest_observer.mojom.h"
@@ -21,16 +21,16 @@ struct Manifest;
 namespace content {
 
 class RenderFrameHost;
-class RenderFrameHostImpl;
+class WebContents;
 
 // ManifestManagerHost is a helper class that allows callers to get the 
Manifest
 // associated with the main frame of the observed WebContents. It handles the
 // IPC messaging with the child process.
 // TODO(mlamouri): keep a cached version and a dirty bit here.
-class ManifestManagerHost
-    : public RenderDocumentHostUserData<ManifestManagerHost>,
-      public blink::mojom::ManifestUrlChangeObserver {
+class ManifestManagerHost : public WebContentsObserver,
+                            public blink::mojom::ManifestUrlChangeObserver {
  public:
+  explicit ManifestManagerHost(WebContents* web_contents);
   ~ManifestManagerHost() override;
 
   using GetManifestCallback =
@@ -44,18 +44,10 @@ class ManifestManagerHost
   void RequestManifestDebugInfo(
       blink::mojom::ManifestManager::RequestManifestDebugInfoCallback 
callback);
 
-  void BindObserver(
-      mojo::PendingAssociatedReceiver<blink::mojom::ManifestUrlChangeObserver>
-          receiver);
-
-  static ManifestManagerHost* GetOrCreateForCurrentDocument(
-      RenderFrameHostImpl* rfh);
+  // WebContentsObserver
+  void RenderFrameDeleted(RenderFrameHost* render_frame_host) override;
 
  private:
-  explicit ManifestManagerHost(RenderFrameHost* render_frame_host);
-
-  friend class RenderDocumentHostUserData<ManifestManagerHost>;
-
   using CallbackMap = base::IDMap<std::unique_ptr<GetManifestCallback>>;
 
   blink::mojom::ManifestManager& GetManifestManager();
@@ -68,14 +60,13 @@ class ManifestManagerHost
   // blink::mojom::ManifestUrlChangeObserver:
   void ManifestUrlChanged(const base::Optional<GURL>& manifest_url) override;
 
-  RenderFrameHost* manifest_manager_frame_;
+  RenderFrameHost* manifest_manager_frame_ = nullptr;
   mojo::Remote<blink::mojom::ManifestManager> manifest_manager_;
   CallbackMap callbacks_;
 
-  mojo::AssociatedReceiver<blink::mojom::ManifestUrlChangeObserver>
-      manifest_url_change_observer_receiver_{this};
+  WebContentsFrameReceiverSet<blink::mojom::ManifestUrlChangeObserver>
+      manifest_url_change_observer_receivers_;
 
-  RENDER_DOCUMENT_HOST_USER_DATA_KEY_DECL();
   DISALLOW_COPY_AND_ASSIGN(ManifestManagerHost);
 };
 
diff --git b/content/browser/web_contents/web_contents_impl.cc 
a/content/browser/web_contents/web_contents_impl.cc
index 024415bb096e..115f480ce8c1 100644
--- b/content/browser/web_contents/web_contents_impl.cc
+++ a/content/browser/web_contents/web_contents_impl.cc
@@ -2122,6 +2122,8 @@ void WebContentsImpl::Init(const 
WebContents::CreateParams& params) {
 
   screen_orientation_provider_.reset(new ScreenOrientationProvider(this));
 
+  manifest_manager_host_.reset(new ManifestManagerHost(this));
+
 #if defined(OS_ANDROID)
   DateTimeChooserAndroid::CreateForWebContents(this);
 #endif
@@ -4202,10 +4204,7 @@ bool WebContentsImpl::WasEverAudible() {
 }
 
 void WebContentsImpl::GetManifest(GetManifestCallback callback) {
-  // TODO(yuzus, 1061899): Move this function to RenderFrameHostImpl.
-  ManifestManagerHost* manifest_manager_host =
-      ManifestManagerHost::GetOrCreateForCurrentDocument(GetMainFrame());
-  manifest_manager_host->GetManifest(std::move(callback));
+  manifest_manager_host_->GetManifest(std::move(callback));
 }
 
 void WebContentsImpl::ExitFullscreen(bool will_cause_resize) {
diff --git b/content/browser/web_contents/web_contents_impl.h 
a/content/browser/web_contents/web_contents_impl.h
index 59510b1f8744..e86be96fc23b 100644
--- b/content/browser/web_contents/web_contents_impl.h
+++ a/content/browser/web_contents/web_contents_impl.h
@@ -102,6 +102,7 @@ class DisplayCutoutHostImpl;
 class FindRequestManager;
 class JavaScriptDialogManager;
 class JavaScriptDialogNavigationDeferrer;
+class ManifestManagerHost;
 class MediaWebContentsObserver;
 class NFCHost;
 class PluginContentOriginAllowlist;
@@ -311,6 +312,10 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
 
   void NotifyManifestUrlChanged(const base::Optional<GURL>& manifest_url);
 
+  ManifestManagerHost* GetManifestManagerHost() const {
+    return manifest_manager_host_.get();
+  }
+
 #if defined(OS_ANDROID)
   void SetMainFrameImportance(ChildProcessImportance importance);
 #endif
@@ -1897,6 +1902,8 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
 
   std::unique_ptr<ScreenOrientationProvider> screen_orientation_provider_;
 
+  std::unique_ptr<ManifestManagerHost> manifest_manager_host_;
+
   // The accessibility mode for all frames. This is queried when each frame
   // is created, and broadcast to all frames when it changes.
   ui::AXMode accessibility_mode_;
diff --git b/content/public/browser/render_document_host_user_data.cc 
a/content/public/browser/render_document_host_user_data.cc
index 3b58bf8a3c5e..b1b385455e61 100644
--- b/content/public/browser/render_document_host_user_data.cc
+++ a/content/public/browser/render_document_host_user_data.cc
@@ -23,8 +23,4 @@ void SetRenderDocumentHostUserData(
       key, std::move(data));
 }
 
-void RemoveRenderDocumentHostUserData(RenderFrameHost* rfh, const void* key) {
-  
static_cast<RenderFrameHostImpl*>(rfh)->RemoveRenderDocumentHostUserData(key);
-}
-
 }  // namespace content
diff --git b/content/public/browser/render_document_host_user_data.h 
a/content/public/browser/render_document_host_user_data.h
index a138fd60aa2a..f55f24f60992 100644
--- b/content/public/browser/render_document_host_user_data.h
+++ a/content/public/browser/render_document_host_user_data.h
@@ -22,9 +22,6 @@ CONTENT_EXPORT void SetRenderDocumentHostUserData(
     const void* key,
     std::unique_ptr<base::SupportsUserData::Data> data);
 
-CONTENT_EXPORT void RemoveRenderDocumentHostUserData(RenderFrameHost* rfh,
-                                                     const void* key);
-
 // This class approximates the lifetime of a single blink::Document in the
 // browser process. At the moment RenderFrameHost can correspond to multiple
 // blink::Documents (when RenderFrameHost is reused for same-process
@@ -85,12 +82,6 @@ class RenderDocumentHostUserData : public 
base::SupportsUserData::Data {
     return static_cast<T*>(GetRenderDocumentHostUserData(rfh, UserDataKey()));
   }
 
-  static void DeleteForCurrentDocument(RenderFrameHost* rfh) {
-    DCHECK(rfh);
-    DCHECK(GetForCurrentDocument(rfh));
-    RemoveRenderDocumentHostUserData(rfh, UserDataKey());
-  }
-
   static const void* UserDataKey() { return &T::kUserDataKey; }
 };
 
++++++ chromium-84-std-vector-const.patch ++++++
>From df982a547c5e88777a6134e5d18a1482d933f1cf Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <sth...@googlemail.com>
Date: Wed, 27 May 2020 10:38:26 +0000
Subject: [PATCH] libstdc++: std::vector must have non-const value_type

Bug: 957519
Change-Id: I535b3bcf318f98cecbf4be1520ffe4126abcacd8
---

diff --git a/extensions/common/features/feature_flags.cc 
b/extensions/common/features/feature_flags.cc
index 5b63764..7efa308 100644
--- a/extensions/common/features/feature_flags.cc
+++ b/extensions/common/features/feature_flags.cc
@@ -19,7 +19,7 @@
 constexpr base::Feature kFeatureFlags[] = {
     {"DeclarativeNetRequest", base::FEATURE_ENABLED_BY_DEFAULT}};
 
-const std::vector<const base::Feature>* g_feature_flags_test_override = 
nullptr;
+const std::vector<base::Feature>* g_feature_flags_test_override = nullptr;
 
 template <typename T>
 const base::Feature* GetFeature(T begin,
@@ -52,8 +52,8 @@
 }
 
 ScopedFeatureFlagsOverride CreateScopedFeatureFlagsOverrideForTesting(
-    const std::vector<const base::Feature>* features) {
-  return base::AutoReset<const std::vector<const base::Feature>*>(
+    const std::vector<base::Feature>* features) {
+  return base::AutoReset<const std::vector<base::Feature>*>(
       &g_feature_flags_test_override, features);
 }
 
diff --git a/extensions/common/features/feature_flags.h 
b/extensions/common/features/feature_flags.h
index d1a5dd3..b57740b 100644
--- a/extensions/common/features/feature_flags.h
+++ b/extensions/common/features/feature_flags.h
@@ -25,9 +25,9 @@
 // in scope. Clients must ensure that |features| remains alive (non-dangling)
 // while the returned value is in scope.
 using ScopedFeatureFlagsOverride =
-    base::AutoReset<const std::vector<const base::Feature>*>;
+    base::AutoReset<const std::vector<base::Feature>*>;
 ScopedFeatureFlagsOverride CreateScopedFeatureFlagsOverrideForTesting(
-    const std::vector<const base::Feature>* features);
+    const std::vector<base::Feature>* features);
 
 }  // namespace extensions
 
++++++ chromium-blink-gcc-diagnostic-pragma.patch ++++++
diff --git a/third_party/blink/renderer/platform/heap/finalizer_traits.h 
b/third_party/blink/renderer/platform/heap/finalizer_traits.h
index b72703232..17a3abc1f 100644
--- a/third_party/blink/renderer/platform/heap/finalizer_traits.h
+++ b/third_party/blink/renderer/platform/heap/finalizer_traits.h
@@ -43,10 +43,7 @@ struct FinalizerTraitImpl<T, true> {
 // an object's base class has a virtual destructor. In case there is no virtual
 // destructor present, the object is always finalized through its leaf type. In
 // other words: there is no finalization through a base pointer.
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdelete-non-abstract-non-virtual-dtor"
       static_cast<T*>(obj)->~T();
-#pragma GCC diagnostic pop
     }
   };
   using FinalizeImpl =
++++++ chromium-browser.desktop ++++++
[Desktop Entry]
Version=1.0
Name=Chromium
Comment=Browse the World Wide Web
GenericName=Web Browser
Exec=chromium %u
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=chromium-browser
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;
StartupWMClass=Chromium

++++++ chromium-browser.sh ++++++
#!/bin/sh

# Chromium launcher

# Authors:
#  Fabien Tassin <f...@sofaraway.org>
# License: GPLv2 or later

APPNAME=chromium
LIBDIR=/usr/lib/chromium
GDB=/usr/bin/gdb

usage () {
  echo "$APPNAME [-h|--help] [-g|--debug] [options] [URL]"
  echo
  echo "        -g or --debug           Start within $GDB"
  echo "        -h or --help            This help screen"
}

# FFmpeg needs to know where its libs are located
if [ "Z$LD_LIBRARY_PATH" != Z ] ; then
  LD_LIBRARY_PATH=$LIBDIR:$LD_LIBRARY_PATH
else
  LD_LIBRARY_PATH=$LIBDIR
fi
export LD_LIBRARY_PATH

# in case chromium runs in a Wayland session ensure GTK falls back to X11
# if we are in a X-session, there is no difference
export GDK_BACKEND=x11

# xdg-settings should in PATH
PATH=$PATH:$LIBDIR
export PATH

want_debug=0
while [ $# -gt 0 ]; do
  case "$1" in
    -h | --help | -help )
      usage
      exit 0 ;;
    -g | --debug )
      want_debug=1
      shift ;;
    -- ) # Stop option prcessing
      shift
      break ;;
    * )
      break ;;
  esac
done

# Setup the default profile if this is none
# Set the default theme as GTK+ with system window decoration
if [ ! -d ~/.config/chromium/Default ]; then
    mkdir -p ~/.config/chromium/Default
    cp /etc/chromium/master_preferences ~/.config/chromium/Default/Preferences
fi

# Allow users to override command-line options
# Based on Gentoo's chromium package (and by extension, Debian's)
if [ -f /etc/default/chromium ]; then
        . /etc/default/chromium
fi

# Detect if PepperFlash has been installed (based on the package in packman)
# If so, automatically enable it
if [ -f /usr/lib/chromium/PepperFlash/libpepflashplayer.so ]; then
      PEPPER_FLASH_VERSION=$(grep '"version":' 
/usr/lib/chromium/PepperFlash/manifest.json| grep -Po '(?<=version": 
")(?:\d|\.)*')
      
PEPPERFLASH="--ppapi-flash-path=/usr/lib/chromium/PepperFlash/libpepflashplayer.so
 --ppapi-flash-version=$PEPPER_FLASH_VERSION"
fi

# Prefer user defined CHROMIUM_USER_FLAGS (from env) over system
# default CHROMIUM_FLAGS (from /etc/chromium/default)
CHROMIUM_FLAGS=${CHROMIUM_USER_FLAGS:-$CHROMIUM_FLAGS}

if [ $want_debug -eq 1 ] ; then
  if [ ! -x $GDB ] ; then
    echo "Sorry, can't find usable $GDB. Please install it."
    exit 1
  fi
  tmpfile=`mktemp /tmp/chromiumargs.XXXXXX` || { echo "Cannot create temporary 
file" >&2; exit 1; }
  trap " [ -f \"$tmpfile\" ] && /bin/rm -f -- \"$tmpfile\"" 0 1 2 3 13 15
  echo "set args ${1+"$@"}" > $tmpfile
  echo "# Env:"
  echo "#     LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
  echo "$GDB $LIBDIR/$APPNAME -x $tmpfile"
  $GDB "$LIBDIR/$APPNAME" -x $tmpfile
  exit $?
else
  exec $LIBDIR/$APPNAME ${PEPPERFLASH} "--password-store=detect" 
"--enable-threaded-compositing" "--ui-disable-partial-swap" ${CHROMIUM_FLAGS} 
"$@"
fi

++++++ chromium-browser.xml ++++++
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE default-apps SYSTEM "gnome-da-list.dtd">
<default-apps>
  <web-browsers>
    <web-browser>
      <name>Chromium</name>
      <executable>chromium</executable>
      <command>chromium %s</command>
      <icon-name>chromium-browser</icon-name>
      <run-in-terminal>false</run-in-terminal>
      <netscape-remote>true</netscape-remote>
      <tab-command>false</tab-command>
      <win-command>false</win-command>
    </web-browser>
  </web-browsers>
</default-apps>
++++++ chromium-buildname.patch ++++++
Index: chromium-73.0.3683.27/components/version_ui_strings.grdp
===================================================================
--- chromium-73.0.3683.27.orig/components/version_ui_strings.grdp
+++ chromium-73.0.3683.27/components/version_ui_strings.grdp
@@ -7,7 +7,7 @@
     Official Build
   </message>
   <message name="IDS_VERSION_UI_UNOFFICIAL" desc="unofficial build on the 
about:version page">
-    Developer Build
+    openSUSE Build
   </message>
   <message name="IDS_VERSION_UI_32BIT" desc="32-bit on the chrome://version 
page">
     (32-bit)
++++++ chromium-clang_lto_visibility_public.patch ++++++
>From 4e380a0e486c080f36adad5b035787d64cfedb3e Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <sth...@googlemail.com>
Date: Sat, 27 Jun 2020 13:59:20 +0000
Subject: [PATCH] GCC: fix mixing __attribute__ with C++ attributes

GCC does not support mixing __attribute__ with [[...]] attributes.
On the other hand [[clang::lto_visibility_public]] isn't supported
by GCC and only emits a warning. Therefore define Clang specific
attribute and leave it empty for GCC.
---
 base/compiler_specific.h                           | 6 ++++++
 third_party/blink/renderer/core/frame/frame_view.h | 3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/base/compiler_specific.h b/base/compiler_specific.h
index c8a7649..8fd2252 100644
--- a/base/compiler_specific.h
+++ b/base/compiler_specific.h
@@ -292,4 +292,10 @@ inline constexpr bool AnalyzerAssumeTrue(bool arg) {
 
 #endif  // defined(__clang_analyzer__)
 
+#if defined(__clang__)
+#define LTO_VISIBILITY_PUBLIC [[clang::lto_visibility_public]]
+#else
+#define LTO_VISIBILITY_PUBLIC
+#endif
+
 #endif  // BASE_COMPILER_SPECIFIC_H_
diff --git a/third_party/blink/renderer/core/frame/frame_view.h 
b/third_party/blink/renderer/core/frame/frame_view.h
index aa5e42a..ec93d89 100644
--- a/third_party/blink/renderer/core/frame/frame_view.h
+++ b/third_party/blink/renderer/core/frame/frame_view.h
@@ -5,6 +5,7 @@
 #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_FRAME_FRAME_VIEW_H_
 #define THIRD_PARTY_BLINK_RENDERER_CORE_FRAME_FRAME_VIEW_H_
 
+#include "base/compiler_specific.h"
 #include "third_party/blink/public/mojom/frame/lifecycle.mojom-blink.h"
 #include "third_party/blink/public/platform/viewport_intersection_state.h"
 #include "third_party/blink/renderer/core/frame/embedded_content_view.h"
@@ -20,7 +21,7 @@ struct IntrinsicSizingInfo;
 // clang::lto_visibility_public is necessary to prevent the compiler from
 // performing a vtable optimization that crashes the renderer. See
 // crbug.com/1062006.
-class CORE_EXPORT [[clang::lto_visibility_public]] FrameView
+class CORE_EXPORT LTO_VISIBILITY_PUBLIC FrameView
     : public EmbeddedContentView {
  public:
   FrameView(const IntRect& frame_rect) : EmbeddedContentView(frame_rect) {}
-- 
2.26.2

++++++ chromium-dma-buf.patch ++++++
Index: chromium-79.0.3941.4/ui/gfx/linux/client_native_pixmap_dmabuf.cc
===================================================================
--- chromium-79.0.3941.4.orig/ui/gfx/linux/client_native_pixmap_dmabuf.cc
+++ chromium-79.0.3941.4/ui/gfx/linux/client_native_pixmap_dmabuf.cc
@@ -25,9 +25,6 @@
 #include "ui/gfx/buffer_format_util.h"
 #include "ui/gfx/switches.h"
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
-#include <linux/dma-buf.h>
-#else
 #include <linux/types.h>
 
 struct dma_buf_sync {
@@ -42,7 +39,6 @@ struct dma_buf_sync {
 
 #define DMA_BUF_BASE 'b'
 #define DMA_BUF_IOCTL_SYNC _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync)
-#endif
 
 namespace gfx {
 
++++++ chromium-drm.patch ++++++
Index: chromium-76.0.3800.0/ui/gfx/native_pixmap_handle.cc
===================================================================
--- chromium-76.0.3800.0.orig/ui/gfx/native_pixmap_handle.cc
+++ chromium-76.0.3800.0/ui/gfx/native_pixmap_handle.cc
@@ -21,6 +21,9 @@
 namespace gfx {
 
 #if defined(OS_LINUX)
+#ifndef DRM_FORMAT_MOD_INVALID
+#define DRM_FORMAT_MOD_INVALID ((1ULL<<56) - 1)
+#endif
 static_assert(NativePixmapHandle::kNoModifier == DRM_FORMAT_MOD_INVALID,
               "gfx::NativePixmapHandle::kNoModifier should be an alias for"
               "DRM_FORMAT_MOD_INVALID");
++++++ chromium-fix-char_traits.patch ++++++
--- a/base/strings/char_traits.h
+++ b/base/strings/char_traits.h
@@ -67,9 +67,9 @@
   return __builtin_memcmp(s1, s2, n);
 #else
   for (; n; --n, ++s1, ++s2) {
-    if (*s1 < *s2)
+    if ((unsigned char)*s1 < (unsigned char)*s2)
       return -1;
-    if (*s1 > *s2)
+    if ((unsigned char)*s1 > (unsigned char)*s2)
       return 1;
   }
   return 0;
++++++ chromium-libusb_interrupt_event_handler.patch ++++++
diff -up 
chromium-48.0.2564.116/services/device/usb/usb_context.cc.modern-libusbx 
chromium-48.0.2564.116/device/usb/usb_context.cc
--- chromium-48.0.2564.116/services/device/usb/usb_context.cc.modern-libusbx    
2016-02-24 10:21:10.534996028 -0500
+++ chromium-48.0.2564.116/services/device/usb/usb_context.cc   2016-02-24 
10:22:28.270499864 -0500
@@ -57,7 +57,11 @@ void UsbContext::UsbEventHandler::Run()
 
 void UsbContext::UsbEventHandler::Stop() {
   base::subtle::Release_Store(&running_, 0);
+#ifdef LIBUSB_API_VERSION >= 0x01000105
+  libusb_interrupt_event_handler(context_);
+#else
   libusb_interrupt_handle_event(context_);
+#endif
 }
 
 UsbContext::UsbContext(PlatformUsbContext context) : context_(context) {
++++++ chromium-master-prefs-path.patch ++++++
Index: chromium-68.0.3423.2/chrome/browser/first_run/first_run_internal_linux.cc
===================================================================
--- 
chromium-68.0.3423.2.orig/chrome/browser/first_run/first_run_internal_linux.cc
+++ chromium-68.0.3423.2/chrome/browser/first_run/first_run_internal_linux.cc
@@ -20,8 +20,7 @@ bool IsOrganicFirstRun() {
 base::FilePath MasterPrefsPath() {
   // The standard location of the master prefs is next to the chrome binary.
   base::FilePath master_prefs;
-  if (!base::PathService::Get(base::DIR_EXE, &master_prefs))
-    return base::FilePath();
+  master_prefs = base::FilePath("/etc/chromium");
   return master_prefs.AppendASCII(installer::kDefaultMasterPrefs);
 }
 
++++++ chromium-norar.patch ++++++
Index: chromium-84.0.4136.5/chrome/common/safe_browsing/BUILD.gn
===================================================================
--- chromium-84.0.4136.5.orig/chrome/common/safe_browsing/BUILD.gn
+++ chromium-84.0.4136.5/chrome/common/safe_browsing/BUILD.gn
@@ -54,39 +54,6 @@ if (safe_browsing_mode == 1) {
     public_deps = [ "//components/safe_browsing/core:csd_proto" ]
   }
 
-  source_set("rar_analyzer") {
-    sources = [
-      "rar_analyzer.cc",
-      "rar_analyzer.h",
-    ]
-
-    deps = [
-      ":archive_analyzer_results",
-      ":download_type_util",
-      "//base",
-      "//base:i18n",
-      "//components/safe_browsing/core:features",
-      "//components/safe_browsing/core:file_type_policies",
-      "//third_party/unrar:unrar",
-    ]
-
-    defines = [
-      "_FILE_OFFSET_BITS=64",
-      "LARGEFILE_SOURCE",
-      "RAR_SMP",
-      "SILENT",
-
-      # The following is set to disable certain macro definitions in the unrar
-      # source code.
-      "CHROMIUM_UNRAR",
-
-      # Disables exceptions in unrar, replaces them with process termination.
-      "UNRAR_NO_EXCEPTIONS",
-    ]
-
-    public_deps = [ "//components/safe_browsing/core:csd_proto" ]
-  }
-
   source_set("disk_image_type_sniffer_mac") {
     sources = [
       "disk_image_type_sniffer_mac.cc",
@@ -153,7 +120,6 @@ source_set("safe_browsing") {
       ":archive_analyzer_results",
       ":binary_feature_extractor",
       ":download_type_util",
-      ":rar_analyzer",
       "//components/safe_browsing/core:features",
     ]
 
Index: chromium-84.0.4136.5/chrome/common/safe_browsing/DEPS
===================================================================
--- chromium-84.0.4136.5.orig/chrome/common/safe_browsing/DEPS
+++ chromium-84.0.4136.5/chrome/common/safe_browsing/DEPS
@@ -1,6 +1,5 @@
 include_rules = [
   "+components/safe_browsing",
   "+third_party/protobuf",
-  "+third_party/unrar",
   "+third_party/zlib",
 ]
Index: chromium-84.0.4136.5/chrome/services/file_util/safe_archive_analyzer.cc
===================================================================
--- chromium-84.0.4136.5.orig/chrome/services/file_util/safe_archive_analyzer.cc
+++ chromium-84.0.4136.5/chrome/services/file_util/safe_archive_analyzer.cc
@@ -46,10 +46,14 @@ void SafeArchiveAnalyzer::AnalyzeDmgFile
 void SafeArchiveAnalyzer::AnalyzeRarFile(base::File rar_file,
                                          base::File temporary_file,
                                          AnalyzeRarFileCallback callback) {
+#if 0
   DCHECK(rar_file.IsValid());
 
   safe_browsing::ArchiveAnalyzerResults results;
   safe_browsing::rar_analyzer::AnalyzeRarFile(
       std::move(rar_file), std::move(temporary_file), &results);
   std::move(callback).Run(results);
+#else
+  NOTREACHED();
+#endif
 }
++++++ chromium-prop-codecs.patch ++++++
Index: chromium-83.0.4103.61/media/BUILD.gn
===================================================================
--- chromium-83.0.4103.61.orig/media/BUILD.gn
+++ chromium-83.0.4103.61/media/BUILD.gn
@@ -45,12 +45,6 @@ buildflag_header("media_buildflags") {
   ]
 }
 
-if (proprietary_codecs && media_use_ffmpeg) {
-  assert(
-      ffmpeg_branding != "Chromium",
-      "proprietary codecs and ffmpeg_branding set to Chromium are 
incompatible")
-}
-
 # Common configuration for targets in the media directory; these must not be
 # exported since things like USE_NEON and USE_CRAS have different meanings
 # elsewhere in the code base.
Index: chromium-83.0.4103.61/third_party/webrtc/webrtc.gni
===================================================================
--- chromium-83.0.4103.61.orig/third_party/webrtc/webrtc.gni
+++ chromium-83.0.4103.61/third_party/webrtc/webrtc.gni
@@ -152,8 +152,7 @@ declare_args() {
   #
   # Enabling H264 when building with MSVC is currently not supported, see
   # bugs.webrtc.org/9213#c13 for more info.
-  rtc_use_h264 =
-      proprietary_codecs && !is_android && !is_ios && !(is_win && !is_clang)
+  rtc_use_h264 = false
 
   # By default, use normal platform audio support or dummy audio, but don't
   # use file-based audio playout and record.
++++++ chromium-quiche-invalid-offsetof.patch ++++++
>From 4cea86e76af28b28aa72cb7c69ff7cf242b2bd5d Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <sth...@googlemail.com>
Date: Sat, 27 Jun 2020 12:18:05 +0000
Subject: [PATCH] GCC: supress invalid-offsetof warning

GCC emits a warning if offsetof is used for non-POD
types. However, GCC supports this and prints only
the warning, because it might be nonportable code.
Disable the warning for GCC with a pragma.
---
 net/third_party/quiche/src/quic/core/frames/quic_frame.h   | 7 +++++++
 .../quiche/src/quic/core/frames/quic_inlined_frame.h       | 7 +++++++
 2 files changed, 14 insertions(+)

diff --git a/net/third_party/quiche/src/quic/core/frames/quic_frame.h 
b/net/third_party/quiche/src/quic/core/frames/quic_frame.h
index 756b69f..aceba76 100644
--- a/net/third_party/quiche/src/quic/core/frames/quic_frame.h
+++ b/net/third_party/quiche/src/quic/core/frames/quic_frame.h
@@ -110,8 +110,15 @@ struct QUIC_EXPORT_PRIVATE QuicFrame {
 
 static_assert(sizeof(QuicFrame) <= 24,
               "Frames larger than 24 bytes should be referenced by pointer.");
+#if defined(__GNUC__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Winvalid-offsetof"
+#endif
 static_assert(offsetof(QuicStreamFrame, type) == offsetof(QuicFrame, type),
               "Offset of |type| must match in QuicFrame and QuicStreamFrame");
+#if defined(__GNUC__)
+#pragma GCC diagnostic pop
+#endif
 
 // A inline size of 1 is chosen to optimize the typical use case of
 // 1-stream-frame in QuicTransmissionInfo.retransmittable_frames.
diff --git a/net/third_party/quiche/src/quic/core/frames/quic_inlined_frame.h 
b/net/third_party/quiche/src/quic/core/frames/quic_inlined_frame.h
index 08c4869..804e4bb 100644
--- a/net/third_party/quiche/src/quic/core/frames/quic_inlined_frame.h
+++ b/net/third_party/quiche/src/quic/core/frames/quic_inlined_frame.h
@@ -17,8 +17,15 @@ namespace quic {
 template <typename DerivedT>
 struct QUIC_EXPORT_PRIVATE QuicInlinedFrame {
   QuicInlinedFrame(QuicFrameType type) : type(type) {
+#if defined(__GNUC__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Winvalid-offsetof"
+#endif
     static_assert(offsetof(DerivedT, type) == 0,
                   "type must be the first field.");
+#if defined(__GNUC__)
+#pragma GCC diagnostic pop
+#endif
     static_assert(sizeof(DerivedT) <= 24,
                   "Frames larger than 24 bytes should not be inlined.");
   }
-- 
2.26.2

++++++ chromium-system-libusb.patch ++++++
Index: chromium-70.0.3538.54/build/linux/unbundle/libusb.gn
===================================================================
--- /dev/null
+++ chromium-70.0.3538.54/build/linux/unbundle/libusb.gn
@@ -0,0 +1,24 @@
+# Copyright 2016 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.
+
+import("//build/config/linux/pkg_config.gni")
+import("//build/shim_headers.gni")
+
+pkg_config("system_libusb") {
+  packages = [ "libusb-1.0" ]
+}
+
+shim_headers("libusb_shim") {
+  root_path = "src/libusb"
+  headers = [
+    "libusb.h",
+  ]
+}
+
+source_set("libusb") {
+  deps = [
+    ":libusb_shim",
+  ]
+  public_configs = [ ":system_libusb" ]
+}
Index: chromium-70.0.3538.54/build/linux/unbundle/replace_gn_files.py
===================================================================
--- chromium-70.0.3538.54.orig/build/linux/unbundle/replace_gn_files.py
+++ chromium-70.0.3538.54/build/linux/unbundle/replace_gn_files.py
@@ -27,6 +27,7 @@ REPLACEMENTS = {
   'libevent': 'base/third_party/libevent/BUILD.gn',
   'libjpeg': 'third_party/libjpeg.gni',
   'libpng': 'third_party/libpng/BUILD.gn',
+  'libusb': 'third_party/libusb/BUILD.gn',
   'libvpx': 'third_party/libvpx/BUILD.gn',
   'libwebp': 'third_party/libwebp/BUILD.gn',
   'libxml': 'third_party/libxml/BUILD.gn',
++++++ chromium-vaapi-fix.patch ++++++
description: fix vaapi with vdpau
author: Maxim Baz
origin: chromium-vaapi patches from Arch linux

Index: chromium-84.0.4147.68/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
===================================================================
--- chromium-84.0.4147.68.orig/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
+++ chromium-84.0.4147.68/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
@@ -677,6 +677,7 @@ void VaapiVideoDecodeAccelerator::Assign
   // |vpp_vaapi_wrapper_| for VaapiPicture to DownloadFromSurface() the VA's
   // internal decoded frame.
   if (buffer_allocation_mode_ != BufferAllocationMode::kNone &&
+      buffer_allocation_mode_ != BufferAllocationMode::kWrapVdpau &&
       !vpp_vaapi_wrapper_) {
     vpp_vaapi_wrapper_ = VaapiWrapper::Create(
         VaapiWrapper::kVideoProcess, VAProfileNone,
@@ -708,7 +709,8 @@ void VaapiVideoDecodeAccelerator::Assign
             : gfx::Size();
 
     std::unique_ptr<VaapiPicture> picture = vaapi_picture_factory_->Create(
-        (buffer_allocation_mode_ == BufferAllocationMode::kNone)
+        ((buffer_allocation_mode_ == BufferAllocationMode::kNone) ||
+         (buffer_allocation_mode_ == BufferAllocationMode::kWrapVdpau))
             ? vaapi_wrapper_
             : vpp_vaapi_wrapper_,
         make_context_current_cb_, bind_image_cb_, buffer, size_to_bind);
@@ -1164,6 +1166,14 @@ VaapiVideoDecodeAccelerator::GetSupporte
 
 VaapiVideoDecodeAccelerator::BufferAllocationMode
 VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() {
+  // NVIDIA blobs use VDPAU
+  if (base::StartsWith(VaapiWrapper::GetVendorString(),
+              "Splitted-Desktop Systems VDPAU",
+              base::CompareCase::SENSITIVE)) {
+    LOG(INFO) << "VA-API driver on VDPAU backend";
+    return BufferAllocationMode::kWrapVdpau;
+  }
+
   // TODO(crbug.com/912295): Enable a better BufferAllocationMode for IMPORT
   // |output_mode_| as well.
   if (output_mode_ == VideoDecodeAccelerator::Config::OutputMode::IMPORT)
@@ -1174,7 +1184,7 @@ VaapiVideoDecodeAccelerator::DecideBuffe
   // associated format reconciliation copy, avoiding all internal buffer
   // allocations.
   // TODO(crbug.com/911754): Enable for VP9 Profile 2.
-  if (IsGeminiLakeOrLater() &&
+  if (false && IsGeminiLakeOrLater() &&
       (profile_ == VP9PROFILE_PROFILE0 || profile_ == VP8PROFILE_ANY ||
        (profile_ >= H264PROFILE_MIN && profile_ <= H264PROFILE_MAX))) {
     // Add one to the reference frames for the one being currently egressed, 
and
Index: chromium-84.0.4147.68/media/gpu/vaapi/vaapi_video_decode_accelerator.h
===================================================================
--- chromium-84.0.4147.68.orig/media/gpu/vaapi/vaapi_video_decode_accelerator.h
+++ chromium-84.0.4147.68/media/gpu/vaapi/vaapi_video_decode_accelerator.h
@@ -210,6 +210,7 @@ class MEDIA_GPU_EXPORT VaapiVideoDecodeA
     // Using |client_|s provided PictureBuffers and as many internally
     // allocated.
     kNormal,
+    kWrapVdpau,
   };
 
   // Decides the concrete buffer allocation mode, depending on the hardware
Index: chromium-84.0.4147.68/media/gpu/vaapi/vaapi_wrapper.cc
===================================================================
--- chromium-84.0.4147.68.orig/media/gpu/vaapi/vaapi_wrapper.cc
+++ chromium-84.0.4147.68/media/gpu/vaapi/vaapi_wrapper.cc
@@ -1227,6 +1227,11 @@ VAImplementation VaapiWrapper::GetImplem
 }
 
 // static
+const std::string& VaapiWrapper::GetVendorString() {
+  return VADisplayState::Get()->va_vendor_string();
+}
+
+// static
 scoped_refptr<VaapiWrapper> VaapiWrapper::Create(
     CodecMode mode,
     VAProfile va_profile,
Index: chromium-84.0.4147.68/media/gpu/vaapi/vaapi_wrapper.h
===================================================================
--- chromium-84.0.4147.68.orig/media/gpu/vaapi/vaapi_wrapper.h
+++ chromium-84.0.4147.68/media/gpu/vaapi/vaapi_wrapper.h
@@ -121,6 +121,9 @@ class MEDIA_GPU_EXPORT VaapiWrapper
   // Returns the type of the underlying VA-API implementation.
   static VAImplementation GetImplementationType();
 
+  // Returns the VAAPI vendor string (obtained using vaQueryVendorString()).
+  static const std::string& GetVendorString();
+
   // Return an instance of VaapiWrapper initialized for |va_profile| and
   // |mode|. |report_error_to_uma_cb| will be called independently from
   // reporting errors to clients via method return values.
++++++ chromium-vaapi.patch ++++++
Index: chromium-83.0.4100.3/chrome/browser/about_flags.cc
===================================================================
--- chromium-83.0.4100.3.orig/chrome/browser/about_flags.cc
+++ chromium-83.0.4100.3/chrome/browser/about_flags.cc
@@ -2128,7 +2128,7 @@ const FeatureEntry kFeatureEntries[] = {
         "disable-accelerated-video-decode",
         flag_descriptions::kAcceleratedVideoDecodeName,
         flag_descriptions::kAcceleratedVideoDecodeDescription,
-        kOsMac | kOsWin | kOsCrOS | kOsAndroid,
+        kOsMac | kOsWin | kOsCrOS | kOsAndroid | kOsLinux,
         SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
     },
     {
@@ -2560,10 +2560,10 @@ const FeatureEntry kFeatureEntries[] = {
      flag_descriptions::kWebXrForceRuntimeDescription, kOsDesktop,
      MULTI_VALUE_TYPE(kWebXrForceRuntimeChoices)},
 #endif  // ENABLE_VR
-#if defined(OS_CHROMEOS)
+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
     {"disable-accelerated-mjpeg-decode",
      flag_descriptions::kAcceleratedMjpegDecodeName,
-     flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS,
+     flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS | kOsLinux,
      SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode)},
 #endif  // OS_CHROMEOS
     {"system-keyboard-lock", flag_descriptions::kSystemKeyboardLockName,
Index: chromium-83.0.4100.3/chrome/browser/flag_descriptions.cc
===================================================================
--- chromium-83.0.4100.3.orig/chrome/browser/flag_descriptions.cc
+++ chromium-83.0.4100.3/chrome/browser/flag_descriptions.cc
@@ -2967,15 +2967,20 @@ const char kMetalDescription[] =
 
 #endif
 
-// Chrome OS 
-------------------------------------------------------------------
+// Chrome OS & 
Linux------------------------------------------------------------
 
-#if defined(OS_CHROMEOS)
+#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
 
 const char kAcceleratedMjpegDecodeName[] =
     "Hardware-accelerated mjpeg decode for captured frame";
 const char kAcceleratedMjpegDecodeDescription[] =
     "Enable hardware-accelerated mjpeg decode for captured frame where "
     "available.";
+#endif
+
+// Chrome OS 
-------------------------------------------------------------------
+
+#if defined(OS_CHROMEOS)
 
 const char kAggregatedMlAppRankingName[] = "Rank suggested apps with ML.";
 const char kAggregatedMlAppRankingDescription[] =
Index: chromium-83.0.4100.3/chrome/browser/flag_descriptions.h
===================================================================
--- chromium-83.0.4100.3.orig/chrome/browser/flag_descriptions.h
+++ chromium-83.0.4100.3/chrome/browser/flag_descriptions.h
@@ -1705,11 +1705,15 @@ extern const char kMetalDescription[];
 
 // Chrome OS ------------------------------------------------------------------
 
-#if defined(OS_CHROMEOS)
+#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
 
 extern const char kAcceleratedMjpegDecodeName[];
 extern const char kAcceleratedMjpegDecodeDescription[];
 
+#endif
+
+#if defined(OS_CHROMEOS)
+
 extern const char kAggregatedMlAppRankingName[];
 extern const char kAggregatedMlAppRankingDescription[];
 
Index: chromium-83.0.4100.3/gpu/config/software_rendering_list.json
===================================================================
--- chromium-83.0.4100.3.orig/gpu/config/software_rendering_list.json
+++ chromium-83.0.4100.3/gpu/config/software_rendering_list.json
@@ -337,7 +337,7 @@
     },
     {
       "id": 48,
-      "description": "Accelerated video decode is unavailable on Linux",
+      "description": "Accelerated VA-API video decode is not supported on 
NVIDIA platforms",
       "cr_bugs": [137247, 1032907],
       "os": {
         "type": "linux"
@@ -347,6 +347,7 @@
           "machine_model_name": ["Chromecast"]
         }
       ],
+      "vendor_id": "0x10de",
       "features": [
         "accelerated_video_decode"
       ]
Index: chromium-83.0.4100.3/media/gpu/test/BUILD.gn
===================================================================
--- chromium-83.0.4100.3.orig/media/gpu/test/BUILD.gn
+++ chromium-83.0.4100.3/media/gpu/test/BUILD.gn
@@ -179,7 +179,7 @@ if (use_vaapi || use_v4l2_codec) {
   }
 }
 
-if (is_chromeos) {
+if (is_chromeos || use_vaapi) {
   static_library("local_gpu_memory_buffer_manager") {
     testonly = true
     sources = [
Index: chromium-83.0.4100.3/media/mojo/services/gpu_mojo_media_client.cc
===================================================================
--- chromium-83.0.4100.3.orig/media/mojo/services/gpu_mojo_media_client.cc
+++ chromium-83.0.4100.3/media/mojo/services/gpu_mojo_media_client.cc
@@ -167,7 +167,7 @@ GpuMojoMediaClient::GetSupportedVideoDec
         *d3d11_supported_configs_;
   }
 
-#elif BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
+#elif defined(OS_CHROMEOS) && BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
   if (IsNewAcceleratedVideoDecoderUsed(gpu_preferences_)) {
     if (!cros_supported_configs_) {
       cros_supported_configs_ =
++++++ chromium.default ++++++
# Default settings for chromium. This file is sourced by /usr/bin/chromium

# Options to pass to chromium
# Ie. debugging: --enable-logging=stderr --v=2 --debug --single-process
CHROMIUM_FLAGS=""
++++++ exclude_ymp.patch ++++++
--- a/third_party/blink/common/mime_util/mime_util.cc   2013-08-25 
10:12:05.428599992 +0200
+++ b/third_party/blink/common/mime_util/mime_util.cc   2013-08-25 
10:12:05.428599992 +0200
@@ -79,6 +79,7 @@
     "text/x-csv",
     "text/x-vcf",
     "text/rtf",
+    "text/x-suse-ymp",
     "text/comma-separated-values",
     "text/csv",
     "text/tab-separated-values",
++++++ fix_building_widevinecdm_with_chromium.patch ++++++
Index: chromium-79.0.3941.4/third_party/widevine/cdm/widevine_cdm_version.h
===================================================================
--- chromium-79.0.3941.4.orig/third_party/widevine/cdm/widevine_cdm_version.h
+++ chromium-79.0.3941.4/third_party/widevine/cdm/widevine_cdm_version.h
@@ -11,5 +11,6 @@
 // If the Widevine CDM is available define the following:
 //  - WIDEVINE_CDM_VERSION_STRING (with the version of the CDM that's available
 //    as a string, e.g., "1.0.123.456").
+#define WIDEVINE_CDM_VERSION_STRING "unknown"
 
 #endif  // WIDEVINE_CDM_VERSION_H_
++++++ gcc-enable-lto.patch ++++++
Index: chromium-75.0.3770.142/build/config/BUILDCONFIG.gn
===================================================================
--- chromium-75.0.3770.142.orig/build/config/BUILDCONFIG.gn
+++ chromium-75.0.3770.142/build/config/BUILDCONFIG.gn
@@ -130,6 +130,8 @@ declare_args() {
   # separate flags.
   is_official_build = false
 
+  gcc_lto = false
+
   # Whether we're a traditional desktop unix.
   is_desktop_linux = current_os == "linux"
 
@@ -440,6 +442,12 @@ default_compiler_configs = [
   "//build/config/sanitizers:default_sanitizer_flags",
 ]
 
+if (gcc_lto) {
+  default_compiler_configs += [
+    "//build/config/compiler:gcc_lto",
+  ]
+}
+
 if (is_win) {
   default_compiler_configs += [
     "//build/config/win:default_crt",
Index: chromium-75.0.3770.142/build/config/compiler/BUILD.gn
===================================================================
--- chromium-75.0.3770.142.orig/build/config/compiler/BUILD.gn
+++ chromium-75.0.3770.142/build/config/compiler/BUILD.gn
@@ -1921,6 +1921,10 @@ if (is_win) {
   }
 }
 
+config("gcc_lto") {
+  cflags = [ "-flto" ]
+}
+
 config("default_stack_frames") {
   if (is_posix || is_fuchsia) {
     if (enable_frame_pointers) {
Index: chromium-75.0.3770.142/sandbox/linux/BUILD.gn
===================================================================
--- chromium-75.0.3770.142.orig/sandbox/linux/BUILD.gn
+++ chromium-75.0.3770.142/sandbox/linux/BUILD.gn
@@ -256,6 +256,9 @@ component("seccomp_bpf") {
     "//base",
     "//base/third_party/dynamic_annotations",
   ]
+  if (gcc_lto) {
+    configs -= [ "//build/config/compiler:gcc_lto" ]
+  }
 
   if (is_nacl_nonsfi) {
     cflags = [ "-fgnu-inline-asm" ]
++++++ gpu-timeout.patch ++++++
description: 10 seconds may not be enough, so don't kill the gpu process until 
20.
author: Chad MILLER <chad.mil...@canonical.com>
bug-debian: http://bugs.debian.org/781940

Index: chromium-81.0.4040.5/gpu/ipc/service/gpu_watchdog_thread.cc
===================================================================
--- chromium-81.0.4040.5.orig/gpu/ipc/service/gpu_watchdog_thread.cc
+++ chromium-81.0.4040.5/gpu/ipc/service/gpu_watchdog_thread.cc
@@ -39,7 +39,7 @@ const int kGpuTimeout = 30000;
 // hangs at context creation during startup. See https://crbug.com/918490.
 const int kGpuTimeout = 15000;
 #else
-const int kGpuTimeout = 10000;
+const int kGpuTimeout = 20000;
 #endif
 
 // The same set of timeouts from Watchdog V2 so we can compare the results
++++++ master_preferences ++++++
{
  "distribution": {
     "skip_first_run_ui": true,
     "alternate_shortcut_text": false,
     "oem_bubble": true,
     "chrome_shortcut_icon_index": 0,
     "create_all_shortcuts": true,
     "show_welcome_page": true,
     "make_chrome_default": false,
     "make_chrome_default_for_user": false,
     "system_level": false,
     "verbose_logging": false
  },
  "download": {
     "extensions_to_open": "ymp"
  },
  "browser": {
     "show_home_button": true,
     "check_default_browser": false,
     "custom_chrome_frame": true
  },
  "bookmark_bar": {
     "show_on_all_tabs": true
  },
  "first_run_tabs": [
     "https://www.opensuse.org/searchPage/";,
     "https://www.google.com/chrome/browser/welcome.html";
  ],
  "homepage": "https://www.opensuse.org/searchPage/";,
  "homepage_is_newtabpage": false
}
++++++ no-location-leap151.patch ++++++
Index: chromium-83.0.4103.116/base/location.h
===================================================================
--- chromium-83.0.4103.116.orig/base/location.h
+++ chromium-83.0.4103.116/base/location.h
@@ -18,12 +18,7 @@
 
 namespace base {
 
-#if defined(__has_builtin)
-// Clang allows detection of these builtins.
-#define SUPPORTS_LOCATION_BUILTINS                                       \
-  (__has_builtin(__builtin_FUNCTION) && __has_builtin(__builtin_FILE) && \
-   __has_builtin(__builtin_LINE))
-#elif defined(COMPILER_GCC) && __GNUC__ >= 7
+#if defined(COMPILER_GCC) && __GNUC__ >= 10
 // GCC has supported these for a long time, but they point at the function
 // declaration in the case of default arguments, rather than at the call site.
 #define SUPPORTS_LOCATION_BUILTINS 1
Index: chromium-83.0.4103.116/base/location.cc
===================================================================
--- chromium-83.0.4103.116.orig/base/location.cc
+++ chromium-83.0.4103.116/base/location.cc
@@ -92,7 +92,7 @@ NOINLINE Location Location::Current(cons
 #else
 // static
 NOINLINE Location Location::Current() {
-  return Location(nullptr, RETURN_ADDRESS());
+  return Location("[unknown file]", RETURN_ADDRESS());
 }
 #endif
 
Index: chromium-83.0.4103.116/media/base/media_serializers.h
===================================================================
--- chromium-83.0.4103.116.orig/media/base/media_serializers.h
+++ chromium-83.0.4103.116/media/base/media_serializers.h
@@ -377,8 +377,8 @@ template <>
 struct MediaSerializer<base::Location> {
   static base::Value Serialize(const base::Location& value) {
     base::Value result(base::Value::Type::DICTIONARY);
-    FIELD_SERIALIZE("file", value.file_name());
-    FIELD_SERIALIZE("line", value.line_number());
+    FIELD_SERIALIZE("file", value.file_name() ? value.file_name() : "unknown");
+    FIELD_SERIALIZE("line", value.line_number() ? value.line_number() : 0);
     return result;
   }
 };
++++++ old-libva.patch ++++++
Index: chromium-81.0.4040.5/media/gpu/vaapi/vaapi_wrapper.cc
===================================================================
--- chromium-81.0.4040.5.orig/media/gpu/vaapi/vaapi_wrapper.cc
+++ chromium-81.0.4040.5/media/gpu/vaapi/vaapi_wrapper.cc
@@ -65,6 +65,10 @@
 #include "ui/ozone/public/surface_factory_ozone.h"
 #endif
 
+#ifndef VA_FOURCC_I420
+#define VA_FOURCC_I420 0x30323449
+#endif
+
 using media_gpu_vaapi::kModuleVa;
 using media_gpu_vaapi::kModuleVa_drm;
 #if defined(USE_X11)
@@ -369,10 +373,6 @@ bool VADisplayState::Initialize() {
 }
 
 bool VADisplayState::InitializeOnce() {
-  static_assert(
-      VA_MAJOR_VERSION >= 2 || (VA_MAJOR_VERSION == 1 && VA_MINOR_VERSION >= 
1),
-      "Requires VA-API >= 1.1.0");
-
   switch (gl::GetGLImplementation()) {
     case gl::kGLImplementationEGLGLES2:
       va_display_ = vaGetDisplayDRM(drm_fd_.get());
@@ -1508,7 +1508,7 @@ VaapiWrapper::ExportVASurfaceAsNativePix
     LOG(ERROR) << "Cannot export an invalid surface";
     return nullptr;
   }
-
+#if VA_MAJOR_VERSION >= 2 || (VA_MAJOR_VERSION == 1 && VA_MINOR_VERSION >= 2)
   VADRMPRIMESurfaceDescriptor descriptor;
   {
     base::AutoLock auto_lock(*va_lock_);
@@ -1601,6 +1601,10 @@ VaapiWrapper::ExportVASurfaceAsNativePix
   exported_pixmap->pixmap = base::MakeRefCounted<gfx::NativePixmapDmaBuf>(
       scoped_va_surface.size(), buffer_format, std::move(handle));
   return exported_pixmap;
+#else
+  LOG(ERROR) << "Exporting a surface with FOURCC has been disabled on old 
libva";
+  return nullptr;
+#endif
 }
 
 bool VaapiWrapper::SyncSurface(VASurfaceID va_surface_id) {
Index: chromium-81.0.4040.5/media/gpu/vaapi/vaapi_jpeg_decoder.cc
===================================================================
--- chromium-81.0.4040.5.orig/media/gpu/vaapi/vaapi_jpeg_decoder.cc
+++ chromium-81.0.4040.5/media/gpu/vaapi/vaapi_jpeg_decoder.cc
@@ -20,6 +20,10 @@
 #include "media/parsers/jpeg_parser.h"
 #include "ui/gfx/geometry/size.h"
 
+#ifndef VA_FOURCC_I420
+#define VA_FOURCC_I420 0x30323449
+#endif
+
 namespace media {
 
 namespace {
Index: chromium-81.0.4040.5/media/gpu/vaapi/vaapi_mjpeg_decode_accelerator.cc
===================================================================
--- chromium-81.0.4040.5.orig/media/gpu/vaapi/vaapi_mjpeg_decode_accelerator.cc
+++ chromium-81.0.4040.5/media/gpu/vaapi/vaapi_mjpeg_decode_accelerator.cc
@@ -44,6 +44,10 @@
 #include "ui/gfx/geometry/size.h"
 #include "ui/gfx/gpu_memory_buffer.h"
 
+#ifndef VA_FOURCC_I420
+#define VA_FOURCC_I420 0x30323449
+#endif
+
 namespace media {
 
 namespace {
Index: chromium-81.0.4040.5/media/gpu/chromeos/fourcc.cc
===================================================================
--- chromium-81.0.4040.5.orig/media/gpu/chromeos/fourcc.cc
+++ chromium-81.0.4040.5/media/gpu/chromeos/fourcc.cc
@@ -16,6 +16,13 @@
 #include <va/va.h>
 #endif  // BUILDFLAG(USE_VAAPI)
 
+#ifndef VA_FOURCC_I420
+#define VA_FOURCC_I420 0x30323449
+#endif
+#ifndef VA_FOURCC_NV21
+#define VA_FOURCC_NV21 0x3132564E
+#endif
+
 namespace media {
 
 Fourcc::Fourcc(Fourcc::Value fourcc) : value_(fourcc) {}
++++++ system-libdrm.patch ++++++
Index: 
chromium-84.0.4147.85/ui/ozone/platform/drm/gpu/hardware_display_controller.cc
===================================================================
--- 
chromium-84.0.4147.85.orig/ui/ozone/platform/drm/gpu/hardware_display_controller.cc
+++ 
chromium-84.0.4147.85/ui/ozone/platform/drm/gpu/hardware_display_controller.cc
@@ -5,6 +5,7 @@
 #include "ui/ozone/platform/drm/gpu/hardware_display_controller.h"
 
 #include <drm.h>
+#include <drm_fourcc.h>
 #include <string.h>
 #include <xf86drm.h>
 #include <memory>
@@ -14,7 +15,6 @@
 #include "base/logging.h"
 #include "base/stl_util.h"
 #include "base/trace_event/trace_event.h"
-#include "third_party/libdrm/src/include/drm/drm_fourcc.h"
 #include "third_party/skia/include/core/SkCanvas.h"
 #include "ui/gfx/geometry/point.h"
 #include "ui/gfx/geometry/size.h"

Reply via email to