From a38f2c9c8bb2bb9b23f88ce1832a22830f68590f Mon Sep 17 00:00:00 2001 From: Ting-Wei Lan Date: Sun, 26 Jul 2020 19:27:40 +0800 Subject: chromium: Chromium 83.0.4103.116 -> 84.0.4147.89 --- chromium/chromium/chromium-ffmpeg-clean.sh | 3 + chromium/chromium/chromium-gcc10-r756880.patch | 74 ---- chromium/chromium/chromium-gcc10-r760075.patch | 30 -- chromium/chromium/chromium-gcc10-r760272.patch | 32 -- chromium/chromium/chromium-gcc10-r760588.patch | 65 ---- chromium/chromium/chromium-gcc10-r762806.patch | 48 --- chromium/chromium/chromium-gcc10-r762881.patch | 63 ---- chromium/chromium/chromium-gcc10-r764426.patch | 98 ----- chromium/chromium/chromium-gcc10-r764972.patch | 39 -- chromium/chromium/chromium-gcc10-r769713.patch | 41 +++ chromium/chromium/chromium-gcc10-r771840.patch | 43 +++ chromium/chromium/chromium-gcc10-r772215.patch | 119 +++++++ chromium/chromium/chromium-gcc10-r772267.patch | 35 ++ chromium/chromium/chromium-gcc10-r772283.patch | 70 ++++ chromium/chromium/chromium-gcc10-r772542.patch | 44 +++ chromium/chromium/chromium-gcc10-r773698.patch | 39 ++ chromium/chromium/chromium-gcc10-r773855.patch | 73 ++++ chromium/chromium/chromium-gcc10-r774141.patch | 43 +++ chromium/chromium/chromium-gcc10-r775439.patch | 125 +++++++ chromium/chromium/chromium-gcc10-r778406.patch | 33 ++ .../chromium/chromium-gen-xproto-python3.patch | 28 ++ ...t-manage-ManifestManagerHost-per-document.patch | 396 +++++++++++++++++++++ .../chromium/chromium-stub-unrar-wrapper.patch | 8 +- chromium/chromium/chromium-webrtc-gcc10.patch | 12 - chromium/chromium/chromium.spec | 60 +++- 25 files changed, 1140 insertions(+), 481 deletions(-) delete mode 100644 chromium/chromium/chromium-gcc10-r756880.patch delete mode 100644 chromium/chromium/chromium-gcc10-r760075.patch delete mode 100644 chromium/chromium/chromium-gcc10-r760272.patch delete mode 100644 chromium/chromium/chromium-gcc10-r760588.patch delete mode 100644 chromium/chromium/chromium-gcc10-r762806.patch delete mode 100644 chromium/chromium/chromium-gcc10-r762881.patch delete mode 100644 chromium/chromium/chromium-gcc10-r764426.patch delete mode 100644 chromium/chromium/chromium-gcc10-r764972.patch create mode 100644 chromium/chromium/chromium-gcc10-r769713.patch create mode 100644 chromium/chromium/chromium-gcc10-r771840.patch create mode 100644 chromium/chromium/chromium-gcc10-r772215.patch create mode 100644 chromium/chromium/chromium-gcc10-r772267.patch create mode 100644 chromium/chromium/chromium-gcc10-r772283.patch create mode 100644 chromium/chromium/chromium-gcc10-r772542.patch create mode 100644 chromium/chromium/chromium-gcc10-r773698.patch create mode 100644 chromium/chromium/chromium-gcc10-r773855.patch create mode 100644 chromium/chromium/chromium-gcc10-r774141.patch create mode 100644 chromium/chromium/chromium-gcc10-r775439.patch create mode 100644 chromium/chromium/chromium-gcc10-r778406.patch create mode 100644 chromium/chromium/chromium-gen-xproto-python3.patch create mode 100644 chromium/chromium/chromium-revert-manage-ManifestManagerHost-per-document.patch diff --git a/chromium/chromium/chromium-ffmpeg-clean.sh b/chromium/chromium/chromium-ffmpeg-clean.sh index 3f85ee4..5c1d3bf 100755 --- a/chromium/chromium/chromium-ffmpeg-clean.sh +++ b/chromium/chromium/chromium-ffmpeg-clean.sh @@ -88,6 +88,7 @@ header_files=" libavcodec/x86/inline_asm.h \ libavcodec/bytestream.h \ libavcodec/cbrt_data.h \ libavcodec/cbrt_tablegen.h \ + libavcodec/codec_id.h \ libavcodec/dct.h \ libavcodec/dct32.h \ libavcodec/error_resilience.h \ @@ -104,6 +105,7 @@ header_files=" libavcodec/x86/inline_asm.h \ libavcodec/hpeldsp.h \ libavcodec/hwaccel.h \ libavcodec/hwaccels.h \ + libavcodec/hwconfig.h \ libavcodec/idctdsp.h \ libavcodec/internal.h \ libavcodec/kbdwin.h \ @@ -132,6 +134,7 @@ header_files=" libavcodec/x86/inline_asm.h \ libavcodec/opus_celt.h \ libavcodec/opus_pvq.h \ libavcodec/opus_rc.h \ + libavcodec/packet.h \ libavcodec/pcm_tablegen.h \ libavcodec/pixblockdsp.h \ libavcodec/pixels.h \ diff --git a/chromium/chromium/chromium-gcc10-r756880.patch b/chromium/chromium/chromium-gcc10-r756880.patch deleted file mode 100644 index 1a3bcf6..0000000 --- a/chromium/chromium/chromium-gcc10-r756880.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 8d115ddda495d0d2e1e1447392db6e9e6a8a1b32 Mon Sep 17 00:00:00 2001 -From: Stephan Hartmann -Date: Tue, 7 Apr 2020 00:23:57 +0000 -Subject: [PATCH] GCC: fix template specialization in WTF::VectorMover - -GCC complains that explicit specialization in non-namespace scope -is happening for MoveOverlappingImpl. However, secialization is -not really necessary here with templates and can be moved -into MoveOverlappingImpl method without changing generated code. - -Bug: 819294 -Change-Id: I90b893b9701748302f7b900fbcc2c341685fe0d3 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2126290 -Reviewed-by: Kent Tamura -Commit-Queue: Kent Tamura -Cr-Commit-Position: refs/heads/master@{#756880} ---- - .../blink/renderer/platform/wtf/vector.h | 39 ++++++++----------- - 1 file changed, 16 insertions(+), 23 deletions(-) - -diff --git a/third_party/blink/renderer/platform/wtf/vector.h b/third_party/blink/renderer/platform/wtf/vector.h -index 632d30883c91..82aaf96cad03 100644 ---- a/third_party/blink/renderer/platform/wtf/vector.h -+++ b/third_party/blink/renderer/platform/wtf/vector.h -@@ -205,30 +205,23 @@ struct VectorMover { - } - } - -- template -- static void MoveOverlappingImpl(const T* src, const T* src_end, T* dst); -- template <> -- static void MoveOverlappingImpl(const T* src, -- const T* src_end, -- T* dst) { -- memmove(dst, src, -- reinterpret_cast(src_end) - -- reinterpret_cast(src)); -- } -- template <> -- static void MoveOverlappingImpl(const T* src, -- const T* src_end, -- T* dst) { -- if (src == dst) -- return; -- if (dst < src) { -- for (; src < src_end; ++src, ++dst) -- AtomicWriteMemcpy(dst, src); -+ static void MoveOverlappingImpl(const T* src, const T* src_end, T* dst) { -+ if (Allocator::kIsGarbageCollected) { -+ if (src == dst) -+ return; -+ if (dst < src) { -+ for (; src < src_end; ++src, ++dst) -+ AtomicWriteMemcpy(dst, src); -+ } else { -+ --src_end; -+ T* dst_end = dst + (src_end - src); -+ for (; src_end >= src; --src_end, --dst_end) -+ AtomicWriteMemcpy(dst_end, src_end); -+ } - } else { -- --src_end; -- T* dst_end = dst + (src_end - src); -- for (; src_end >= src; --src_end, --dst_end) -- AtomicWriteMemcpy(dst_end, src_end); -+ memmove(dst, src, -+ reinterpret_cast(src_end) - -+ reinterpret_cast(src)); - } - } - --- -2.26.2 - diff --git a/chromium/chromium/chromium-gcc10-r760075.patch b/chromium/chromium/chromium-gcc10-r760075.patch deleted file mode 100644 index d306b96..0000000 --- a/chromium/chromium/chromium-gcc10-r760075.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 74f76a6be385ef056b0be2362c32c728141cca16 Mon Sep 17 00:00:00 2001 -From: Stephan Hartmann -Date: Fri, 17 Apr 2020 16:04:12 +0000 -Subject: [PATCH] IWYU: std::numeric_limits is defined in limits -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Change-Id: Ifbc379adc5bb7242c21e7da0bcfc28f49e4dd06f -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2153111 -Reviewed-by: François Doray -Commit-Queue: François Doray -Cr-Commit-Position: refs/heads/master@{#760075} ---- - .../graph/policies/background_tab_loading_policy_helpers.cc | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.cc b/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.cc -index 4881c010bb99..593501d16a7a 100644 ---- a/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.cc -+++ b/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.cc -@@ -5,4 +5,5 @@ - - #include "chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.h" -+#include - #include "base/logging.h" - --- -2.26.2 - diff --git a/chromium/chromium/chromium-gcc10-r760272.patch b/chromium/chromium/chromium-gcc10-r760272.patch deleted file mode 100644 index 830d333..0000000 --- a/chromium/chromium/chromium-gcc10-r760272.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 2b9d6daa0ab5ce45ec5555466d5a5a583a020ea8 Mon Sep 17 00:00:00 2001 -From: Daniel Playfair Cal -Date: Sat, 18 Apr 2020 00:27:38 +0000 -Subject: [PATCH] Add missing algorithm header in crx_install_error.cc - -This is needed for the use of std::find. - -Change-Id: I2dc43b3887c467986c5346be5a9e27a987e1e5b3 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2152333 -Reviewed-by: Ken Rockot -Commit-Queue: Ken Rockot -Cr-Commit-Position: refs/heads/master@{#760272} ---- - extensions/browser/install/crx_install_error.cc | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/extensions/browser/install/crx_install_error.cc b/extensions/browser/install/crx_install_error.cc -index a9765bb0a5a4..bd0d3e35a167 100644 ---- a/extensions/browser/install/crx_install_error.cc -+++ b/extensions/browser/install/crx_install_error.cc -@@ -4,6 +4,8 @@ - - #include "extensions/browser/install/crx_install_error.h" - -+#include -+ - #include "base/logging.h" - #include "extensions/browser/install/sandboxed_unpacker_failure_reason.h" - --- -2.26.2 - diff --git a/chromium/chromium/chromium-gcc10-r760588.patch b/chromium/chromium/chromium-gcc10-r760588.patch deleted file mode 100644 index 522b0b8..0000000 --- a/chromium/chromium/chromium-gcc10-r760588.patch +++ /dev/null @@ -1,65 +0,0 @@ -From aeef68888d4c00b69facead2b934095a8cd17329 Mon Sep 17 00:00:00 2001 -From: Stephan Hartmann -Date: Mon, 20 Apr 2020 18:21:43 +0000 -Subject: [PATCH] libstdc++: fix incomplete-type in AXTree for - NodeSetSizePosInSetInfo - -has only forward declaration of NodeSetSizePosInSetInfo. Therefore, -move declaration from ax_tree.cc. - -std: :unordered_map requires U to be fully declared. ax_tree.h -Bug: 957519 -Change-Id: Ic1f4bf3ebfea229ece84251e46d4461b31873868 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2132403 -Reviewed-by: David Tseng -Commit-Queue: David Tseng -Cr-Commit-Position: refs/heads/master@{#760588} ---- - ui/accessibility/ax_tree.cc | 10 ++-------- - ui/accessibility/ax_tree.h | 9 ++++++++- - 2 files changed, 10 insertions(+), 9 deletions(-) - -diff --git a/ui/accessibility/ax_tree.cc b/ui/accessibility/ax_tree.cc -index 7b8d9b1b1610..e9154028d664 100644 ---- a/ui/accessibility/ax_tree.cc -+++ b/ui/accessibility/ax_tree.cc -@@ -567,14 +567,8 @@ struct AXTreeUpdateState { - const AXTree& tree; - }; - --struct AXTree::NodeSetSizePosInSetInfo { -- NodeSetSizePosInSetInfo() = default; -- ~NodeSetSizePosInSetInfo() = default; -- -- int32_t pos_in_set = 0; -- int32_t set_size = 0; -- base::Optional lowest_hierarchical_level; --}; -+AXTree::NodeSetSizePosInSetInfo::NodeSetSizePosInSetInfo() = default; -+AXTree::NodeSetSizePosInSetInfo::~NodeSetSizePosInSetInfo() = default; - - struct AXTree::OrderedSetContent { - explicit OrderedSetContent(const AXNode* ordered_set = nullptr) -diff --git a/ui/accessibility/ax_tree.h b/ui/accessibility/ax_tree.h -index a51ca8de4c84..8c1c57517ac0 100644 ---- a/ui/accessibility/ax_tree.h -+++ b/ui/accessibility/ax_tree.h -@@ -328,7 +328,14 @@ class AX_EXPORT AXTree : public AXNode::OwnerTree { - bool enable_extra_mac_nodes_ = false; - - // Contains pos_in_set and set_size data for an AXNode. -- struct NodeSetSizePosInSetInfo; -+ struct NodeSetSizePosInSetInfo { -+ NodeSetSizePosInSetInfo(); -+ ~NodeSetSizePosInSetInfo(); -+ -+ int32_t pos_in_set = 0; -+ int32_t set_size = 0; -+ base::Optional lowest_hierarchical_level; -+ }; - - // Represents the content of an ordered set which includes the ordered set - // items and the ordered set container if it exists. --- -2.26.2 - diff --git a/chromium/chromium/chromium-gcc10-r762806.patch b/chromium/chromium/chromium-gcc10-r762806.patch deleted file mode 100644 index 2fd4ead..0000000 --- a/chromium/chromium/chromium-gcc10-r762806.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 4af12b86673edcf82989a87a11496543a9478fb5 Mon Sep 17 00:00:00 2001 -From: Stephan Hartmann -Date: Mon, 27 Apr 2020 12:05:48 +0000 -Subject: [PATCH] libstdc++: make NGPhysicalContainerFragment::ConstIterator - usable with std::all_of - -Use of std::all_of requires STL compliant iterator. However, -NGPhysicalContainerFragment::ConstIterator does not define -iterator_tag and therefore is no STL iterator. To make it -compliant derive NGPhysicalContainerFragment::ConstIterator from -std::iterator. - -Bug: 957519 -Change-Id: Id042f987ca093ece6cd1cd10f601eb1909700d08 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2153148 -Reviewed-by: Aleks Totic -Commit-Queue: Morten Stenshorne -Cr-Commit-Position: refs/heads/master@{#762806} ---- - .../renderer/core/layout/ng/ng_physical_container_fragment.h | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.h b/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.h -index b3c7624f4940..1256e77c1463 100644 ---- a/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.h -+++ b/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.h -@@ -5,6 +5,8 @@ - #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_NG_PHYSICAL_CONTAINER_FRAGMENT_H_ - #define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_NG_PHYSICAL_CONTAINER_FRAGMENT_H_ - -+#include -+ - #include "base/containers/span.h" - #include "third_party/blink/renderer/core/core_export.h" - #include "third_party/blink/renderer/core/layout/geometry/physical_rect.h" -@@ -31,7 +33,8 @@ class CORE_EXPORT NGPhysicalContainerFragment : public NGPhysicalFragment { - PostLayoutChildLinkList(wtf_size_t count, const NGLink* buffer) - : count_(count), buffer_(buffer) {} - -- class ConstIterator { -+ class ConstIterator -+ : public std::iterator { - STACK_ALLOCATED(); - - public: --- -2.26.2 - diff --git a/chromium/chromium/chromium-gcc10-r762881.patch b/chromium/chromium/chromium-gcc10-r762881.patch deleted file mode 100644 index 1441552..0000000 --- a/chromium/chromium/chromium-gcc10-r762881.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 40d994e4aa2e4d5077c1810e4623549618a19c05 Mon Sep 17 00:00:00 2001 -From: Piotr Tworek -Date: Mon, 27 Apr 2020 16:31:46 +0000 -Subject: [PATCH] Include "memory" header to get the definition of - std::unique_ptr. - -Right now the code im the affected fails to build when using libstdc++ -instead of bundled libcxx. Apparently libcxx pulls the necessary header -indirectly. - -Change-Id: Ie5e86f228434ab16d622ae7a912d9ce607258931 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2164645 -Reviewed-by: Jochen Eisinger -Commit-Queue: Jochen Eisinger -Cr-Commit-Position: refs/heads/master@{#762881} ---- - base/test/icu_test_util.h | 1 + - cc/metrics/lcd_text_metrics_reporter.h | 1 + - content/public/test/back_forward_cache_util.h | 2 ++ - .../blink/renderer/core/html/trust_token_attribute_parsing.h | 2 ++ - 4 files changed, 6 insertions(+) - -diff --git a/base/test/icu_test_util.h b/base/test/icu_test_util.h -index f764bdfeb2da..91f44ffbd363 100644 ---- a/base/test/icu_test_util.h -+++ b/base/test/icu_test_util.h -@@ -5,6 +5,7 @@ - #ifndef BASE_TEST_ICU_TEST_UTIL_H_ - #define BASE_TEST_ICU_TEST_UTIL_H_ - -+#include - #include - - #include "base/macros.h" -diff --git a/content/public/test/back_forward_cache_util.h b/content/public/test/back_forward_cache_util.h -index 2569ccb9dbaf..54ec0e265d9a 100644 ---- a/content/public/test/back_forward_cache_util.h -+++ b/content/public/test/back_forward_cache_util.h -@@ -5,6 +5,8 @@ - #ifndef CONTENT_PUBLIC_TEST_BACK_FORWARD_CACHE_UTIL_H_ - #define CONTENT_PUBLIC_TEST_BACK_FORWARD_CACHE_UTIL_H_ - -+#include -+ - #include "base/strings/string_piece.h" - - namespace content { -diff --git a/third_party/blink/renderer/core/html/trust_token_attribute_parsing.h b/third_party/blink/renderer/core/html/trust_token_attribute_parsing.h -index f5a7ab03892b..ef19cfaf680f 100644 ---- a/third_party/blink/renderer/core/html/trust_token_attribute_parsing.h -+++ b/third_party/blink/renderer/core/html/trust_token_attribute_parsing.h -@@ -5,6 +5,8 @@ - #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_HTML_TRUST_TOKEN_ATTRIBUTE_PARSING_H_ - #define THIRD_PARTY_BLINK_RENDERER_CORE_HTML_TRUST_TOKEN_ATTRIBUTE_PARSING_H_ - -+#include -+ - #include "base/optional.h" - #include "services/network/public/mojom/trust_tokens.mojom-blink-forward.h" - #include "third_party/blink/renderer/core/core_export.h" --- -2.26.2 - diff --git a/chromium/chromium/chromium-gcc10-r764426.patch b/chromium/chromium/chromium-gcc10-r764426.patch deleted file mode 100644 index d9fcdcb..0000000 --- a/chromium/chromium/chromium-gcc10-r764426.patch +++ /dev/null @@ -1,98 +0,0 @@ -From d3cabbc7321d349a9bffda482df5afc0d4df1ac2 Mon Sep 17 00:00:00 2001 -From: Piotr Tworek -Date: Thu, 30 Apr 2020 21:33:47 +0000 -Subject: [PATCH] Make some of blink custom iterators STL compatible. - -Blink has recently started using functions like std::any_of with some of -the custom iterators it provides. On Linux this works in the default -setup using libcxx, but fails with even the most recent versions of -libstdc++. In all cases the error message (text in bug report) complains -about lack of matching std::__iterator_category definition. - -From what I understand the error message is basically saying those -iterators are not STL compatible due to missing traits as described -in https://en.cppreference.com/w/cpp/iterator/iterator_traits. Such -traits are provided by custom iterators defined in //base, or //cc. - -This patch adds the necessary traits to iterators that are currently -affected by this problem. - -Bug: 1076869 -Change-Id: I9950a7100c32499ba96647317fa70b87dc22eaf9 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2174199 -Reviewed-by: Kentaro Hara -Commit-Queue: Piotr Tworek -Cr-Commit-Position: refs/heads/master@{#764426} ---- - .../core/layout/ng/ng_physical_container_fragment.h | 6 ++++++ - .../blink/renderer/platform/wtf/hash_iterators.h | 12 ++++++++++++ - third_party/blink/renderer/platform/wtf/hash_table.h | 6 ++++++ - 3 files changed, 24 insertions(+) - -diff --git a/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.h b/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.h -index 1256e77c1463..8b93107f2fcf 100644 ---- a/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.h -+++ b/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.h -@@ -38,6 +38,12 @@ class CORE_EXPORT NGPhysicalContainerFragment : public NGPhysicalFragment { - STACK_ALLOCATED(); - - public: -+ using iterator_category = std::bidirectional_iterator_tag; -+ using value_type = NGLink; -+ using difference_type = ptrdiff_t; -+ using pointer = value_type*; -+ using reference = value_type&; -+ - ConstIterator(const NGLink* current) : current_(current) {} - - const NGLink& operator*() const { return *PostLayoutOrCurrent(); } -diff --git a/third_party/blink/renderer/platform/wtf/hash_iterators.h b/third_party/blink/renderer/platform/wtf/hash_iterators.h -index f8e66e6be850..6003d02c5090 100644 ---- a/third_party/blink/renderer/platform/wtf/hash_iterators.h -+++ b/third_party/blink/renderer/platform/wtf/hash_iterators.h -@@ -53,6 +53,12 @@ struct HashTableConstIteratorAdapter - ValuesIterator; - -+ using iterator_category = std::bidirectional_iterator_tag; -+ using value_type = HashTableType; -+ using difference_type = ptrdiff_t; -+ using pointer = value_type*; -+ using reference = value_type&; -+ - HashTableConstIteratorAdapter() = default; - HashTableConstIteratorAdapter( - const typename HashTableType::const_iterator& impl) -@@ -94,6 +100,12 @@ struct HashTableIteratorAdapter - ValuesIterator; - -+ using iterator_category = std::bidirectional_iterator_tag; -+ using value_type = HashTableType; -+ using difference_type = ptrdiff_t; -+ using pointer = value_type*; -+ using reference = value_type&; -+ - HashTableIteratorAdapter() = default; - HashTableIteratorAdapter(const typename HashTableType::iterator& impl) - : impl_(impl) {} -diff --git a/third_party/blink/renderer/platform/wtf/hash_table.h b/third_party/blink/renderer/platform/wtf/hash_table.h -index f596fb5d41e5..5a4468d6bd10 100644 ---- a/third_party/blink/renderer/platform/wtf/hash_table.h -+++ b/third_party/blink/renderer/platform/wtf/hash_table.h -@@ -2204,6 +2204,12 @@ struct HashTableConstIteratorAdapter { - STACK_ALLOCATED(); - - public: -+ using iterator_category = std::bidirectional_iterator_tag; -+ using value_type = HashTableType; -+ using difference_type = ptrdiff_t; -+ using pointer = value_type*; -+ using reference = value_type&; -+ - HashTableConstIteratorAdapter() = default; - HashTableConstIteratorAdapter( - const typename HashTableType::const_iterator& impl) --- -2.26.2 - diff --git a/chromium/chromium/chromium-gcc10-r764972.patch b/chromium/chromium/chromium-gcc10-r764972.patch deleted file mode 100644 index 953e07b..0000000 --- a/chromium/chromium/chromium-gcc10-r764972.patch +++ /dev/null @@ -1,39 +0,0 @@ -From f4cfbbfb51934ed6104a5bbd51a7b72cf5cfd5c1 Mon Sep 17 00:00:00 2001 -From: Stephan Hartmann -Date: Mon, 4 May 2020 00:43:30 +0000 -Subject: [PATCH] GCC: add missing apps namespace to BrowserAppLauncher - -GCC does not get namespace of BrowserAppLauncher right and -fails like this: - -chrome/browser/apps/app_service/app_service_proxy.h:82:23: error: -declaration of 'apps::BrowserAppLauncher& -apps::AppServiceProxy::BrowserAppLauncher()' changes meaning of -'BrowserAppLauncher' [-fpermissive] - -Bug: 819294 -Change-Id: I1ee948723c68768e41e4d1e1861b3ed8f8fc6b2d -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2174484 -Reviewed-by: Nancy Wang -Commit-Queue: Nancy Wang -Cr-Commit-Position: refs/heads/master@{#764972} ---- - chrome/browser/apps/app_service/app_service_proxy.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/chrome/browser/apps/app_service/app_service_proxy.h b/chrome/browser/apps/app_service/app_service_proxy.h -index 97e5edf4347b..e284f93e398d 100644 ---- a/chrome/browser/apps/app_service/app_service_proxy.h -+++ b/chrome/browser/apps/app_service/app_service_proxy.h -@@ -83,7 +83,7 @@ class AppServiceProxy : public KeyedService, - apps::InstanceRegistry& InstanceRegistry(); - #endif - -- BrowserAppLauncher& BrowserAppLauncher(); -+ apps::BrowserAppLauncher& BrowserAppLauncher(); - - apps::PreferredAppsList& PreferredApps(); - --- -2.26.2 - diff --git a/chromium/chromium/chromium-gcc10-r769713.patch b/chromium/chromium/chromium-gcc10-r769713.patch new file mode 100644 index 0000000..c2feb72 --- /dev/null +++ b/chromium/chromium/chromium-gcc10-r769713.patch @@ -0,0 +1,41 @@ +From f3dfe39f9fd3091cf1a7146b936d9de77a459435 Mon Sep 17 00:00:00 2001 +From: Piotr Tworek +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 +Commit-Queue: Piotr Tworek +Cr-Commit-Position: refs/heads/master@{#769713} +--- + .../blink/renderer/modules/accessibility/ax_object.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/third_party/blink/renderer/modules/accessibility/ax_object.h b/third_party/blink/renderer/modules/accessibility/ax_object.h +index 841715b3cecf..fbb87bfb8e1e 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 AXObject : public GarbageCollected { + class MODULES_EXPORT AncestorsIterator final + : public GarbageCollected { + 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) +-- +2.26.2 + diff --git a/chromium/chromium/chromium-gcc10-r771840.patch b/chromium/chromium/chromium-gcc10-r771840.patch new file mode 100644 index 0000000..f8be1ef --- /dev/null +++ b/chromium/chromium/chromium-gcc10-r771840.patch @@ -0,0 +1,43 @@ +From 3a3effdd81e97bfc4f2698cd1f41b008355b0469 Mon Sep 17 00:00:00 2001 +From: Raphael Kubo da Costa +Date: Tue, 26 May 2020 16:34:45 +0000 +Subject: [PATCH] scoped_nss_types.h: Include instead of + + +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 , 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 +Commit-Queue: David Benjamin +Reviewed-by: David Benjamin +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 2a3a6e1b2517..0a663ea7c3b3 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 + #include + #include +-#include + #include + #include + +-- +2.26.2 + diff --git a/chromium/chromium/chromium-gcc10-r772215.patch b/chromium/chromium/chromium-gcc10-r772215.patch new file mode 100644 index 0000000..b1aad03 --- /dev/null +++ b/chromium/chromium/chromium-gcc10-r772215.patch @@ -0,0 +1,119 @@ +From bc9a96ef9eeab89276d67929f4a8a7d88f5dbc02 Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Wed, 27 May 2020 13:37:25 +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. + +Bug: 819294 +Change-Id: I8feea5f2aa6e1f87daad61f496d6b53b1bbc49ac +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2217887 +Reviewed-by: Michael Lippautz +Commit-Queue: Michael Lippautz +Cr-Commit-Position: refs/heads/master@{#772215} +--- + .../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 31e7888b07f6..2c0583f660cc 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& self) { +- TraceImpl(visitor, self); ++ TraceImpl::Trace(visitor, self); + } + + private: +- template +- static void TraceImpl(blink::Visitor* visitor, +- const KeyValuePair& self); +- +- // Strongification of ephemerons, i.e., Weak/Strong and Strong/Weak. +- template <> +- static void TraceImpl(blink::Visitor* visitor, +- const KeyValuePair& 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 Trace(blink::Visitor* visitor, ++ const KeyValuePair& 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(blink::Visitor* visitor, +- const KeyValuePair& 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 Trace(blink::Visitor* visitor, ++ const KeyValuePair& 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::type; + }; + + template +-- +2.26.2 + diff --git a/chromium/chromium/chromium-gcc10-r772267.patch b/chromium/chromium/chromium-gcc10-r772267.patch new file mode 100644 index 0000000..0e55d31 --- /dev/null +++ b/chromium/chromium/chromium-gcc10-r772267.patch @@ -0,0 +1,35 @@ +From 408bded3befc625e16ef18f2ff5467e040b203e7 Mon Sep 17 00:00:00 2001 +From: Raphael Kubo da Costa +Date: Wed, 27 May 2020 16:34:56 +0000 +Subject: [PATCH] ListContainerHelper: Include for memcpy() + +IWYU. This fixes the libstdc++ build after commit 41989bd89 ("Remove/replace +unnecessary logging.h includes in .cc files (cc)"). + +Bug: 957519 +Change-Id: I1e782e8310ca548947b2d541af6a2159d928d1f3 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2218090 +Reviewed-by: vmpstr +Commit-Queue: vmpstr +Commit-Queue: Raphael Kubo da Costa +Auto-Submit: Raphael Kubo da Costa +Cr-Commit-Position: refs/heads/master@{#772267} +--- + cc/base/list_container_helper.cc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/cc/base/list_container_helper.cc b/cc/base/list_container_helper.cc +index afd386e3a883..7b594b4a4580 100644 +--- a/cc/base/list_container_helper.cc ++++ b/cc/base/list_container_helper.cc +@@ -7,6 +7,7 @@ + #include + + #include ++#include + #include + + #include "base/check_op.h" +-- +2.26.2 + diff --git a/chromium/chromium/chromium-gcc10-r772283.patch b/chromium/chromium/chromium-gcc10-r772283.patch new file mode 100644 index 0000000..abfbc1b --- /dev/null +++ b/chromium/chromium/chromium-gcc10-r772283.patch @@ -0,0 +1,70 @@ +From df413313083a9dabdc573545aaf70343aa0830ca Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Wed, 27 May 2020 17:03:03 +0000 +Subject: [PATCH] GCC: fix decltype to get a valid function pointer + +The decltype() 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(&). + +Bug: 819294 +Change-Id: I8114c3d75c9865779d58c0b6a6c48e6affd3175b +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2217414 +Reviewed-by: Adam Langley +Commit-Queue: Adam Langley +Cr-Commit-Position: refs/heads/master@{#772283} +--- + device/fido/virtual_fido_device.cc | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/device/fido/virtual_fido_device.cc b/device/fido/virtual_fido_device.cc +index 0256c6ad4698..72423d322ad1 100644 +--- a/device/fido/virtual_fido_device.cc ++++ b/device/fido/virtual_fido_device.cc +@@ -51,7 +51,7 @@ constexpr uint8_t kAttestationKey[]{ + + // CBBFunctionToVector converts a BoringSSL function that writes to a CBB to one + // that returns a std::vector. Invoke for a function, f, with: +-// CBBFunctionToVector(args, to, f); ++// CBBFunctionToVector(args, to, f); + template + std::vector CBBFunctionToVector(Args&&... args) { + uint8_t* der = nullptr; +@@ -102,7 +102,7 @@ class EVPBackedPrivateKey : public VirtualFidoDevice::PrivateKey { + } + + std::vector GetPKCS8PrivateKey() const override { +- return CBBFunctionToVector(pkey_.get()); + } + +@@ -122,7 +122,7 @@ class P256PrivateKey : public EVPBackedPrivateKey { + + std::vector GetX962PublicKey() const override { + const EC_KEY* ec_key = EVP_PKEY_get0_EC_KEY(pkey_.get()); +- return CBBFunctionToVector( + EC_KEY_get0_group(ec_key), EC_KEY_get0_public_key(ec_key), + POINT_CONVERSION_UNCOMPRESSED, /*ctx=*/nullptr); +@@ -172,7 +172,7 @@ class RSAPrivateKey : public EVPBackedPrivateKey { + cbor::Writer::Write(cbor::Value(std::move(map)))); + + std::vector der_bytes( +- CBBFunctionToVector(pkey_.get())); + + return std::make_unique( +-- +2.26.2 + diff --git a/chromium/chromium/chromium-gcc10-r772542.patch b/chromium/chromium/chromium-gcc10-r772542.patch new file mode 100644 index 0000000..1362c62 --- /dev/null +++ b/chromium/chromium/chromium-gcc10-r772542.patch @@ -0,0 +1,44 @@ +From fff3279bcf904673d312893b09bfc53811028490 Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +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 +Commit-Queue: Kinuko Yasuda +Cr-Commit-Position: refs/heads/master@{#772542} +--- + storage/browser/quota/quota_client_type.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/storage/browser/quota/quota_client_type.cc b/storage/browser/quota/quota_client_type.cc +index b9e9f62a6afd..a2daaa23b5eb 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 all({ ++ static base::NoDestructor all{{ + QuotaClientType::kFileSystem, + QuotaClientType::kDatabase, + QuotaClientType::kAppcache, +@@ -17,7 +17,7 @@ const QuotaClientTypes& AllQuotaClientTypes() { + QuotaClientType::kServiceWorkerCache, + QuotaClientType::kServiceWorker, + QuotaClientType::kBackgroundFetch, +- }); ++ }}; + return *all; + } + +-- +2.26.2 + diff --git a/chromium/chromium/chromium-gcc10-r773698.patch b/chromium/chromium/chromium-gcc10-r773698.patch new file mode 100644 index 0000000..3087820 --- /dev/null +++ b/chromium/chromium/chromium-gcc10-r773698.patch @@ -0,0 +1,39 @@ +From f23cbade5ecc451b9a01bd11dd9de7456424722c Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Mon, 1 Jun 2020 17:02:08 +0000 +Subject: [PATCH] GCC: DOMRect constexpr equal operator depends on non + constexpr operators + +Make operators 'inline' only. + +Bug: 819294 +Change-Id: If07442258b4ebce26c013c4dff830c1d61dff9e3 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2217415 +Commit-Queue: Fernando Serboncini +Reviewed-by: Fernando Serboncini +Cr-Commit-Position: refs/heads/master@{#773698} +--- + third_party/blink/renderer/core/geometry/dom_rect.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/third_party/blink/renderer/core/geometry/dom_rect.h b/third_party/blink/renderer/core/geometry/dom_rect.h +index fede00578e6b..058c60a904ef 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 @@ class CORE_EXPORT DOMRect final : public DOMRectReadOnly { + 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 +-- +2.26.2 + diff --git a/chromium/chromium/chromium-gcc10-r773855.patch b/chromium/chromium/chromium-gcc10-r773855.patch new file mode 100644 index 0000000..bab426a --- /dev/null +++ b/chromium/chromium/chromium-gcc10-r773855.patch @@ -0,0 +1,73 @@ +From 2ec52ff90ae0345a1ba50665e8c98bf99c9cfd45 Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Mon, 1 Jun 2020 21:56:38 +0000 +Subject: [PATCH] libstdc++: std::vector must have non-const value_type + +Bug: 957519 +Change-Id: I535b3bcf318f98cecbf4be1520ffe4126abcacd8 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2214556 +Commit-Queue: Karan Bhatia +Reviewed-by: Karan Bhatia +Cr-Commit-Position: refs/heads/master@{#773855} +--- + extensions/common/features/feature_flags.cc | 6 +++--- + extensions/common/features/feature_flags.h | 4 ++-- + extensions/common/features/simple_feature_unittest.cc | 2 +- + 3 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/extensions/common/features/feature_flags.cc b/extensions/common/features/feature_flags.cc +index 5b63764e4c19..7efa308dbecd 100644 +--- a/extensions/common/features/feature_flags.cc ++++ b/extensions/common/features/feature_flags.cc +@@ -19,7 +19,7 @@ namespace { + constexpr base::Feature kFeatureFlags[] = { + {"DeclarativeNetRequest", base::FEATURE_ENABLED_BY_DEFAULT}}; + +-const std::vector* g_feature_flags_test_override = nullptr; ++const std::vector* g_feature_flags_test_override = nullptr; + + template + const base::Feature* GetFeature(T begin, +@@ -52,8 +52,8 @@ bool IsFeatureFlagEnabled(const std::string& feature_flag) { + } + + ScopedFeatureFlagsOverride CreateScopedFeatureFlagsOverrideForTesting( +- const std::vector* features) { +- return base::AutoReset*>( ++ const std::vector* features) { ++ return base::AutoReset*>( + &g_feature_flags_test_override, features); + } + +diff --git a/extensions/common/features/feature_flags.h b/extensions/common/features/feature_flags.h +index d1a5dd3720b3..b57740b25cf6 100644 +--- a/extensions/common/features/feature_flags.h ++++ b/extensions/common/features/feature_flags.h +@@ -25,9 +25,9 @@ bool IsFeatureFlagEnabled(const std::string& feature_flag); + // in scope. Clients must ensure that |features| remains alive (non-dangling) + // while the returned value is in scope. + using ScopedFeatureFlagsOverride = +- base::AutoReset*>; ++ base::AutoReset*>; + ScopedFeatureFlagsOverride CreateScopedFeatureFlagsOverrideForTesting( +- const std::vector* features); ++ const std::vector* features); + + } // namespace extensions + +diff --git a/extensions/common/features/simple_feature_unittest.cc b/extensions/common/features/simple_feature_unittest.cc +index 8d9e0ad31534..659d4ef7c90a 100644 +--- a/extensions/common/features/simple_feature_unittest.cc ++++ b/extensions/common/features/simple_feature_unittest.cc +@@ -718,7 +718,7 @@ TEST_F(SimpleFeatureTest, CommandLineSwitch) { + } + + TEST_F(SimpleFeatureTest, FeatureFlags) { +- const std::vector features( ++ const std::vector features( + {{"stub_feature_1", base::FEATURE_ENABLED_BY_DEFAULT}, + {"stub_feature_2", base::FEATURE_DISABLED_BY_DEFAULT}}); + auto scoped_feature_override = +-- +2.26.2 + diff --git a/chromium/chromium/chromium-gcc10-r774141.patch b/chromium/chromium/chromium-gcc10-r774141.patch new file mode 100644 index 0000000..81c86c1 --- /dev/null +++ b/chromium/chromium/chromium-gcc10-r774141.patch @@ -0,0 +1,43 @@ +From 3b7fd76b6bc43b4a462e296168dc59541a713c11 Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Tue, 2 Jun 2020 15:12:11 +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. + +Bug: 819294 +Change-Id: Ia8060152bf4ba21c85dfc4d99cd7cc64983de077 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2179122 +Reviewed-by: Nico Weber +Commit-Queue: Nico Weber +Cr-Commit-Position: refs/heads/master@{#774141} +--- + 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 267eb905013b..d75f348550db 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 { + return unsafe_reinterpret_cast_ptr(inline_buffer_); + } + +- template +- void InitInlinedBuffer() {} +- template <> +- void InitInlinedBuffer() { +- memset(&inline_buffer_, 0, kInlineBufferSize); ++ void InitInlinedBuffer() { ++ if (Allocator::kIsGarbageCollected) { ++ memset(&inline_buffer_, 0, kInlineBufferSize); ++ } + } + + alignas(T) char inline_buffer_[kInlineBufferSize]; +-- +2.26.2 + diff --git a/chromium/chromium/chromium-gcc10-r775439.patch b/chromium/chromium/chromium-gcc10-r775439.patch new file mode 100644 index 0000000..d27d546 --- /dev/null +++ b/chromium/chromium/chromium-gcc10-r775439.patch @@ -0,0 +1,125 @@ +From cd5da994cb70eb13320183e767cae459900d7a31 Mon Sep 17 00:00:00 2001 +From: Joshua Peraza +Date: Fri, 5 Jun 2020 05:14:24 +0000 +Subject: [PATCH] Update Crashpad to 7a70b0f1513d2787437aafc6593c97cbd0f2d94e + +a8ff62676466 Add a bunch of missing string.h includes +4b5a5bac26be win: Make CreatePipe compatible with UWP apps +686852d9d87d linux: update test expectations +86c28287d23a linux: add section header string table to test module +294d233ca09e elf: adjust small DT_STRTAB addresses by load bias +7a70b0f1513d android: correct executable placement in debug rendezvous + +Change-Id: Ie34272e560e92779661d804c8664f52e72a86349 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2231880 +Commit-Queue: Mark Mentovai +Auto-Submit: Joshua Peraza +Reviewed-by: Mark Mentovai +Cr-Commit-Position: refs/heads/master@{#775439} +--- + third_party/crashpad/README.chromium | 2 +- + .../crashpad/client/crashpad_client_win.cc | 9 ++- + .../client/simple_address_range_bag.h | 1 + + .../crashpad/snapshot/elf/elf_image_reader.cc | 8 +++ + .../snapshot/linux/debug_rendezvous.cc | 16 +++++ + .../snapshot/linux/debug_rendezvous_test.cc | 23 +++++-- + .../snapshot/linux/process_reader_linux.cc | 4 +- + .../linux/process_reader_linux_test.cc | 65 ++++++++++++++----- + .../minidump/minidump_context_converter.cc | 2 + + .../crashpad/util/linux/ptrace_client.cc | 1 + + .../util/net/http_multipart_builder.cc | 1 + + .../util/net/http_transport_socket.cc | 1 + + .../crashpad/util/process/process_memory.cc | 2 + + .../crashpad/util/stream/log_output_stream.cc | 2 + + 14 files changed, 109 insertions(+), 28 deletions(-) + +diff --git a/third_party/crashpad/crashpad/client/simple_address_range_bag.h b/third_party/crashpad/crashpad/client/simple_address_range_bag.h +index c69fa5afd8b2..d288303c4d5b 100644 +--- a/third_party/crashpad/crashpad/client/simple_address_range_bag.h ++++ b/third_party/crashpad/crashpad/client/simple_address_range_bag.h +@@ -16,6 +16,7 @@ + #define CRASHPAD_CLIENT_SIMPLE_ADDRESS_RANGE_BAG_H_ + + #include ++#include + + #include + +diff --git a/third_party/crashpad/crashpad/snapshot/minidump/minidump_context_converter.cc b/third_party/crashpad/crashpad/snapshot/minidump/minidump_context_converter.cc +index 0c840deac227..24d2585b376e 100644 +--- a/third_party/crashpad/crashpad/snapshot/minidump/minidump_context_converter.cc ++++ b/third_party/crashpad/crashpad/snapshot/minidump/minidump_context_converter.cc +@@ -14,6 +14,8 @@ + + #include "snapshot/minidump/minidump_context_converter.h" + ++#include ++ + #include "base/stl_util.h" + #include "minidump/minidump_context.h" + +diff --git a/third_party/crashpad/crashpad/util/linux/ptrace_client.cc b/third_party/crashpad/crashpad/util/linux/ptrace_client.cc +index f097ad98593d..43214a18af20 100644 +--- a/third_party/crashpad/crashpad/util/linux/ptrace_client.cc ++++ b/third_party/crashpad/crashpad/util/linux/ptrace_client.cc +@@ -16,6 +16,7 @@ + + #include + #include ++#include + + #include + +diff --git a/third_party/crashpad/crashpad/util/net/http_multipart_builder.cc b/third_party/crashpad/crashpad/util/net/http_multipart_builder.cc +index 267960b274f9..dda46aa3ce9b 100644 +--- a/third_party/crashpad/crashpad/util/net/http_multipart_builder.cc ++++ b/third_party/crashpad/crashpad/util/net/http_multipart_builder.cc +@@ -14,6 +14,7 @@ + + #include "util/net/http_multipart_builder.h" + ++#include + #include + + #include +diff --git a/third_party/crashpad/crashpad/util/net/http_transport_socket.cc b/third_party/crashpad/crashpad/util/net/http_transport_socket.cc +index 4dd01b6e7a69..b9c6c9c5e064 100644 +--- a/third_party/crashpad/crashpad/util/net/http_transport_socket.cc ++++ b/third_party/crashpad/crashpad/util/net/http_transport_socket.cc +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + #include + + #include "base/logging.h" +diff --git a/third_party/crashpad/crashpad/util/process/process_memory.cc b/third_party/crashpad/crashpad/util/process/process_memory.cc +index ab87b940fa14..3125e6f3852c 100644 +--- a/third_party/crashpad/crashpad/util/process/process_memory.cc ++++ b/third_party/crashpad/crashpad/util/process/process_memory.cc +@@ -14,6 +14,8 @@ + + #include "util/process/process_memory.h" + ++#include ++ + #include + + #include "base/logging.h" +diff --git a/third_party/crashpad/crashpad/util/stream/log_output_stream.cc b/third_party/crashpad/crashpad/util/stream/log_output_stream.cc +index 03c0a5a02dbe..e35bb3b32fc1 100644 +--- a/third_party/crashpad/crashpad/util/stream/log_output_stream.cc ++++ b/third_party/crashpad/crashpad/util/stream/log_output_stream.cc +@@ -14,6 +14,8 @@ + + #include "util/stream/log_output_stream.h" + ++#include ++ + #include + + #include "base/logging.h" +-- +2.26.2 + diff --git a/chromium/chromium/chromium-gcc10-r778406.patch b/chromium/chromium/chromium-gcc10-r778406.patch new file mode 100644 index 0000000..7451871 --- /dev/null +++ b/chromium/chromium/chromium-gcc10-r778406.patch @@ -0,0 +1,33 @@ +From eddad6d81cf621c88fd5c395826241236f56e8ac Mon Sep 17 00:00:00 2001 +From: Kristian Kirs +Date: Mon, 15 Jun 2020 19:08:54 +0000 +Subject: [PATCH] GCC: Fix DHECK_EQ + +GCC complains about it + +Change-Id: I4c5ffcc66225c895efde77a77c83342d6794b5e1 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2246170 +Reviewed-by: Christian Biesinger +Reviewed-by: Koji Ishii +Commit-Queue: Koji Ishii +Cr-Commit-Position: refs/heads/master@{#778406} +--- + .../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 9baf436feb9c..e9cbb609513c 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 +@@ -818,7 +818,7 @@ void NGInlineNode::SegmentText(NGInlineNodeData* data) const { + + // 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 + diff --git a/chromium/chromium/chromium-gen-xproto-python3.patch b/chromium/chromium/chromium-gen-xproto-python3.patch new file mode 100644 index 0000000..8516d26 --- /dev/null +++ b/chromium/chromium/chromium-gen-xproto-python3.patch @@ -0,0 +1,28 @@ +diff --git a/ui/gfx/x/gen_xproto.py b/ui/gfx/x/gen_xproto.py +index 4a34901012d9..509f22c1f4e2 100644 +--- a/ui/gfx/x/gen_xproto.py ++++ b/ui/gfx/x/gen_xproto.py +@@ -168,6 +168,7 @@ from __future__ import print_function + + import argparse + import collections ++import functools + import os + import re + import sys +@@ -919,11 +920,13 @@ class GenXproto: + return 3 + return 2 + +- def cmp((_1, item1), (_2, item2)): ++ def cmp(arg1, arg2): ++ (_1, item1) = arg1 ++ (_2, item2) = arg2 + return type_order_priority(item1) - type_order_priority(item2) + + # sort() is guaranteed to be stable. +- self.module.all.sort(cmp=cmp) ++ self.module.all.sort(key=functools.cmp_to_key(cmp)) + + def gen_header(self): + self.file = self.args.headerfile diff --git a/chromium/chromium/chromium-revert-manage-ManifestManagerHost-per-document.patch b/chromium/chromium/chromium-revert-manage-ManifestManagerHost-per-document.patch new file mode 100644 index 0000000..b65f30a --- /dev/null +++ b/chromium/chromium/chromium-revert-manage-ManifestManagerHost-per-document.patch @@ -0,0 +1,396 @@ +From a7138cc22fab2a7be7271361ae2351ca7872f634 Mon Sep 17 00:00:00 2001 +From: Ting-Wei Lan +Date: Sun, 26 Jul 2020 14:54:31 +0800 +Subject: [PATCH] Revert "[content] Manage ManifestManagerHost per-document" + +This reverts commit fce18322d66ea6e67275e13242dae2a8c06d3ae2. + +This changes was copied from https://github.com/stha09/chromium-patches +in order to fix segfault caused by stack overflow. + +https://bugs.chromium.org/p/chromium/issues/detail?id=1085953 +--- + .../browser/devtools/protocol/page_handler.cc | 10 ++-- + ...der_document_host_user_data_browsertest.cc | 12 ++--- + .../frame_host/render_frame_host_impl.cc | 10 ---- + .../frame_host/render_frame_host_impl.h | 4 -- + .../browser/manifest/manifest_manager_host.cc | 47 +++++++------------ + .../browser/manifest/manifest_manager_host.h | 31 +++++------- + .../browser/web_contents/web_contents_impl.cc | 7 ++- + .../browser/web_contents/web_contents_impl.h | 7 +++ + .../browser/render_document_host_user_data.cc | 4 -- + .../browser/render_document_host_user_data.h | 9 ---- + 10 files changed, 47 insertions(+), 94 deletions(-) + +diff --git a/content/browser/devtools/protocol/page_handler.cc b/content/browser/devtools/protocol/page_handler.cc +index b1821434b975..929b63ab875e 100644 +--- a/content/browser/devtools/protocol/page_handler.cc ++++ b/content/browser/devtools/protocol/page_handler.cc +@@ -961,14 +961,14 @@ Response PageHandler::SetDownloadBehavior(const std::string& behavior, + + void PageHandler::GetAppManifest( + std::unique_ptr 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 a/content/browser/frame_host/render_document_host_user_data_browsertest.cc b/content/browser/frame_host/render_document_host_user_data_browsertest.cc +index 09dff7842517..290e5509b448 100644 +--- a/content/browser/frame_host/render_document_host_user_data_browsertest.cc ++++ b/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 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 a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc +index 115673d129dc..67735d7a859a 100644 +--- a/content/browser/frame_host/render_frame_host_impl.cc ++++ b/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" +@@ -6155,15 +6154,6 @@ void RenderFrameHostImpl::SetUpMojoIfNeeded() { + std::make_unique(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 a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h +index 513fca6f8619..98171ec5989a 100644 +--- a/content/browser/frame_host/render_frame_host_impl.h ++++ b/content/browser/frame_host/render_frame_host_impl.h +@@ -1596,10 +1596,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 a/content/browser/manifest/manifest_manager_host.cc b/content/browser/manifest/manifest_manager_host.cc +index 68ea016c62eb..b063e0d1e98e 100644 +--- a/content/browser/manifest/manifest_manager_host.cc ++++ b/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 +- 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 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& 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(web_contents) ++ } ++ static_cast(web_contents()) + ->NotifyManifestUrlChanged(manifest_url); + } + +-RENDER_DOCUMENT_HOST_USER_DATA_KEY_IMPL(ManifestManagerHost) + } // namespace content +diff --git a/content/browser/manifest/manifest_manager_host.h b/content/browser/manifest/manifest_manager_host.h +index 57f51dc9fad7..3dc0bbf6e1ad 100644 +--- a/content/browser/manifest/manifest_manager_host.h ++++ b/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, +- 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 +- receiver); +- +- static ManifestManagerHost* GetOrCreateForCurrentDocument( +- RenderFrameHostImpl* rfh); ++ // WebContentsObserver ++ void RenderFrameDeleted(RenderFrameHost* render_frame_host) override; + + private: +- explicit ManifestManagerHost(RenderFrameHost* render_frame_host); +- +- friend class RenderDocumentHostUserData; +- + using CallbackMap = base::IDMap>; + + blink::mojom::ManifestManager& GetManifestManager(); +@@ -68,14 +60,13 @@ class ManifestManagerHost + // blink::mojom::ManifestUrlChangeObserver: + void ManifestUrlChanged(const base::Optional& manifest_url) override; + +- RenderFrameHost* manifest_manager_frame_; ++ RenderFrameHost* manifest_manager_frame_ = nullptr; + mojo::Remote manifest_manager_; + CallbackMap callbacks_; + +- mojo::AssociatedReceiver +- manifest_url_change_observer_receiver_{this}; ++ WebContentsFrameReceiverSet ++ manifest_url_change_observer_receivers_; + +- RENDER_DOCUMENT_HOST_USER_DATA_KEY_DECL(); + DISALLOW_COPY_AND_ASSIGN(ManifestManagerHost); + }; + +diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc +index 7908a60e1743..8615b19088df 100644 +--- a/content/browser/web_contents/web_contents_impl.cc ++++ b/content/browser/web_contents/web_contents_impl.cc +@@ -2128,6 +2128,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 +@@ -4208,10 +4210,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 a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h +index 29125641f892..cf43c7b1ebb2 100644 +--- a/content/browser/web_contents/web_contents_impl.h ++++ b/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& manifest_url); + ++ ManifestManagerHost* GetManifestManagerHost() const { ++ return manifest_manager_host_.get(); ++ } ++ + #if defined(OS_ANDROID) + void SetMainFrameImportance(ChildProcessImportance importance); + #endif +@@ -1895,6 +1900,8 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, + + std::unique_ptr screen_orientation_provider_; + ++ std::unique_ptr 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 a/content/public/browser/render_document_host_user_data.cc b/content/public/browser/render_document_host_user_data.cc +index 3b58bf8a3c5e..b1b385455e61 100644 +--- a/content/public/browser/render_document_host_user_data.cc ++++ b/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(rfh)->RemoveRenderDocumentHostUserData(key); +-} +- + } // namespace content +diff --git a/content/public/browser/render_document_host_user_data.h b/content/public/browser/render_document_host_user_data.h +index a138fd60aa2a..f55f24f60992 100644 +--- a/content/public/browser/render_document_host_user_data.h ++++ b/content/public/browser/render_document_host_user_data.h +@@ -22,9 +22,6 @@ CONTENT_EXPORT void SetRenderDocumentHostUserData( + const void* key, + std::unique_ptr 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(GetRenderDocumentHostUserData(rfh, UserDataKey())); + } + +- static void DeleteForCurrentDocument(RenderFrameHost* rfh) { +- DCHECK(rfh); +- DCHECK(GetForCurrentDocument(rfh)); +- RemoveRenderDocumentHostUserData(rfh, UserDataKey()); +- } +- + static const void* UserDataKey() { return &T::kUserDataKey; } + }; + +-- +2.26.2 + diff --git a/chromium/chromium/chromium-stub-unrar-wrapper.patch b/chromium/chromium/chromium-stub-unrar-wrapper.patch index b33ac97..a6e49bd 100644 --- a/chromium/chromium/chromium-stub-unrar-wrapper.patch +++ b/chromium/chromium/chromium-stub-unrar-wrapper.patch @@ -1,5 +1,5 @@ diff --git a/third_party/unrar/BUILD.gn b/third_party/unrar/BUILD.gn -index 5716ad0e720f..6f60c130561f 100644 +index 96756a8a538a..5b300ef5667f 100644 --- a/third_party/unrar/BUILD.gn +++ b/third_party/unrar/BUILD.gn @@ -23,54 +23,7 @@ config("unrar_warnings") { @@ -58,7 +58,7 @@ index 5716ad0e720f..6f60c130561f 100644 if (is_win) { sources += [ "src/isnt.cpp" ] diff --git a/third_party/unrar/src/unrar_wrapper.cc b/third_party/unrar/src/unrar_wrapper.cc -index 63b31f008861..6879a2d84988 100644 +index cd05eaa0033b..6879a2d84988 100644 --- a/third_party/unrar/src/unrar_wrapper.cc +++ b/third_party/unrar/src/unrar_wrapper.cc @@ -9,7 +9,6 @@ @@ -69,7 +69,7 @@ index 63b31f008861..6879a2d84988 100644 namespace third_party_unrar { -@@ -18,62 +17,10 @@ RarReader::RarReader() {} +@@ -18,60 +17,10 @@ RarReader::RarReader() {} RarReader::~RarReader() {} bool RarReader::Open(base::File rar_file, base::File temp_file) { @@ -81,12 +81,10 @@ index 63b31f008861..6879a2d84988 100644 - archive_->SetTempFileHandle(temp_file_.GetPlatformFile()); - - bool open_success = archive_->Open(L"dummy.rar"); -- UMA_HISTOGRAM_BOOLEAN("SBClientDownload.RarOpenSuccess", open_success); - if (!open_success) - return false; - - bool is_valid_archive = archive_->IsArchive(/*EnableBroken=*/true); -- UMA_HISTOGRAM_BOOLEAN("SBClientDownload.RarValidArchive", is_valid_archive); - if (!is_valid_archive) - return false; - diff --git a/chromium/chromium/chromium-webrtc-gcc10.patch b/chromium/chromium/chromium-webrtc-gcc10.patch index 2aa90a2..53383e9 100644 --- a/chromium/chromium/chromium-webrtc-gcc10.patch +++ b/chromium/chromium/chromium-webrtc-gcc10.patch @@ -1,15 +1,3 @@ -diff --git a/third_party/webrtc/call/rtx_receive_stream.h b/third_party/webrtc/call/rtx_receive_stream.h -index 8ffa440..113a816 100644 ---- a/third_party/webrtc/call/rtx_receive_stream.h -+++ b/third_party/webrtc/call/rtx_receive_stream.h -@@ -12,6 +12,7 @@ - #define CALL_RTX_RECEIVE_STREAM_H_ - - #include -+#include - - #include "call/rtp_packet_sink_interface.h" - diff --git a/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h b/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h index 22528c9..69e624e 100644 --- a/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h diff --git a/chromium/chromium/chromium.spec b/chromium/chromium/chromium.spec index 745dbfa..57feddf 100644 --- a/chromium/chromium/chromium.spec +++ b/chromium/chromium/chromium.spec @@ -51,7 +51,7 @@ %bcond_with fedora_compilation_flags Name: chromium -Version: 83.0.4103.116 +Version: 84.0.4147.89 Release: 100%{?dist} Summary: A WebKit (Blink) powered web browser @@ -97,6 +97,9 @@ Patch1: chromium-certificate-transparency-google.patch # Don't require static libstdc++ Patch2: chromium-gn-no-static-libstdc++.patch +# Make ui/gfx/x/gen_xproto.py compatible with Python 3 +Patch3: chromium-gen-xproto-python3.patch + # Don't use unversioned python commands. This patch is based on # https://src.fedoraproject.org/rpms/chromium/c/7048e95ab61cd143 # https://src.fedoraproject.org/rpms/chromium/c/cb0be2c990fc724e @@ -117,17 +120,21 @@ Patch44: chromium-gcc10-ui.patch Patch45: chromium-webrtc-gcc10.patch Patch46: chromium-gcc10-content.patch Patch47: chromium-gcc9-ui.patch +Patch48: chromium-revert-manage-ManifestManagerHost-per-document.patch # Pull upstream patches -Patch51: chromium-quiche-gcc9.patch -Patch52: chromium-gcc10-r756880.patch -Patch53: chromium-gcc10-r760075.patch -Patch54: chromium-gcc10-r760272.patch -Patch55: chromium-gcc10-r760588.patch -Patch56: chromium-gcc10-r762806.patch -Patch57: chromium-gcc10-r762881.patch -Patch58: chromium-gcc10-r764426.patch -Patch59: chromium-gcc10-r764972.patch +Patch50: chromium-quiche-gcc9.patch +Patch51: chromium-gcc10-r769713.patch +Patch52: chromium-gcc10-r771840.patch +Patch53: chromium-gcc10-r772215.patch +Patch54: chromium-gcc10-r772267.patch +Patch55: chromium-gcc10-r772283.patch +Patch56: chromium-gcc10-r772542.patch +Patch57: chromium-gcc10-r773698.patch +Patch58: chromium-gcc10-r773855.patch +Patch59: chromium-gcc10-r774141.patch +Patch60: chromium-gcc10-r775439.patch +Patch61: chromium-gcc10-r778406.patch # I don't have time to test whether it work on other architectures ExclusiveArch: x86_64 @@ -139,6 +146,7 @@ BuildRequires: clang BuildRequires: gcc, gcc-c++ %endif BuildRequires: ninja-build, nodejs, java-headless, bison, gperf, hwdata +BuildRequires: xcb-proto BuildRequires: libgcc(x86-32), glibc(x86-32), libatomic BuildRequires: libcap-devel, cups-devel, alsa-lib-devel, expat-devel %if 0%{?fedora} >= 30 @@ -191,7 +199,6 @@ BuildRequires: pkgconfig(libxslt) BuildRequires: opus-devel BuildRequires: re2-devel BuildRequires: snappy-devel -BuildRequires: yasm BuildRequires: zlib-devel # *_use_* BuildRequires: pciutils-devel @@ -317,6 +324,8 @@ find -type f -exec \ third_party/depot_tools \ third_party/devscripts \ third_party/devtools-frontend \ + third_party/devtools-frontend/src/front_end/third_party/acorn \ + third_party/devtools-frontend/src/front_end/third_party/codemirror \ third_party/devtools-frontend/src/front_end/third_party/fabricjs \ third_party/devtools-frontend/src/front_end/third_party/lighthouse \ third_party/devtools-frontend/src/front_end/third_party/wasmparser \ @@ -351,6 +360,7 @@ find -type f -exec \ third_party/libaom \ third_party/libaom/source/libaom/third_party/vector \ third_party/libaom/source/libaom/third_party/x86inc \ + third_party/libavif \ third_party/libjingle \ third_party/libphonenumber \ third_party/libsecret \ @@ -369,6 +379,7 @@ find -type f -exec \ %endif third_party/libXNVCtrl \ third_party/libyuv \ + third_party/lottie \ third_party/lss \ third_party/lzma_sdk \ third_party/mako \ @@ -381,6 +392,7 @@ find -type f -exec \ third_party/one_euro_filter \ third_party/openh264 \ third_party/openscreen \ + third_party/openscreen/src/third_party/mozilla \ third_party/openscreen/src/third_party/tinycbor/src/src \ third_party/ots \ third_party/pdfium \ @@ -436,7 +448,7 @@ find -type f -exec \ third_party/web-animations-js \ third_party/webdriver \ third_party/webrtc \ - third_party/webrtc/common_audio/third_party/fft4g \ + third_party/webrtc/common_audio/third_party/ooura \ third_party/webrtc/common_audio/third_party/spl_sqrt_floor \ third_party/webrtc/modules/third_party/fft \ third_party/webrtc/modules/third_party/g711 \ @@ -447,7 +459,6 @@ find -type f -exec \ third_party/woff2 \ third_party/wuffs \ third_party/xdg-utils \ - third_party/yasm/run_yasm.py \ third_party/zlib/google \ tools/grit/third_party/six \ tools/gn/src/base/third_party/icu \ @@ -484,7 +495,6 @@ find -type f -exec \ re2 \ %endif snappy \ - yasm \ zlib sed -i 's|//third_party/usb_ids|/usr/share/hwdata|g' \ @@ -544,7 +554,6 @@ gn_args=( enable_nacl=false fatal_linker_warnings=false treat_warnings_as_errors=false - linux_use_bundled_binutils=false fieldtrial_testing_like_official_build=true 'system_libdir="%{_lib}"' 'custom_toolchain="//build/toolchain/linux/unbundle:default"' @@ -581,6 +590,24 @@ gn_args+=( ./out/Release/gn gen out/Release \ --script-executable=/usr/bin/python2 --args="${gn_args[*]}" +# The Python script ui/gfx/x/gen_xproto.py uses xcbgen library, which can be +# found in xcb-proto package on Fedora. Surprisingly, the Chromium developer +# decides to write this new script in Python 2 even if Python 2 is EOL in 2020. +# Fedora only provides xcb-proto package for Python 3, so we have to patch both +# the script and the ninja file to switch it to Python 3. +sed -i 's|python2 \(\.\./\.\./ui/gfx/x/gen_xproto\.py\)|python3 \1|' \ + out/Release/toolchain.ninja + +# It seems that Chromium cannot properly handle +# element of PixmapFromBuffers request in dri3.xml. It knows 'num_buffers' is +# the size of 'buffers', but it doesn't declare the variable 'buffers' itself. +# Therefore, the generated dri3.cc file doesn't compile because of undeclared +# variable. Since currently there is no code using the function, assume that +# callers never pass 'buffers' and patch 'num_buffers' to always be zero. +%{ninja_build} -C out/Release gen/ui/gfx/x/dri3.cc +sed -i 's|^\( num_buffers\) = buffers.size();|\1 = 0;|' \ + out/Release/gen/ui/gfx/x/dri3.cc + %if 0%{?ninja_build:1} %{ninja_build} -C out/Release chrome chrome_sandbox chromedriver %else @@ -686,6 +713,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sun Jul 26 2020 - Ting-Wei Lan - 84.0.4147.89-100 +- Update to 84.0.4147.89 + * Tue Jun 23 2020 - Ting-Wei Lan - 83.0.4103.116-100 - Update to 83.0.4103.116 -- cgit