Merge pull request #9451 from IdrisKalp/master

chromium-browser 91.0.4472.77
This commit is contained in:
Idris Kalp
2021-06-03 00:47:04 +03:00
committed by GitHub
14 changed files with 567 additions and 177 deletions
@@ -0,0 +1,44 @@
From 9909f146b28d56c9c0411329a056ed959b33f76a Mon Sep 17 00:00:00 2001
From: Zequan Wu <zequanwu@google.com>
Date: Wed, 10 Feb 2021 03:26:00 +0000
Subject: [PATCH] Reland "Add [[clang::nomerge]] attribute to ~CheckError()."
This is a reland of 8860253376c38c090d585bda4b20b801e3aa3ce3
Original change's description:
> Add [[clang::nomerge]] attribute to ~CheckError().
>
> To disable merging multiple ~CheckError() destructor for accurate crash logs.
>
> Bug: 1153188
> Change-Id: If6d153661667a63f13b645f6d284eb3d5ea3a300
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2611331
> Commit-Queue: Nico Weber <thakis@chromium.org>
> Auto-Submit: Zequan Wu <zequanwu@google.com>
> Reviewed-by: Nico Weber <thakis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#844989}
Bug: 1153188
Change-Id: I303c5ff9fb88f7a30663400622b327a910d0b108
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2686331
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Commit-Queue: Zequan Wu <zequanwu@google.com>
Cr-Commit-Position: refs/heads/master@{#852453}
---
base/check.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/base/check.h b/base/check.h
index c94ab68db90..17048e45539 100644
--- a/base/check.h
+++ b/base/check.h
@@ -85,7 +85,7 @@ class BASE_EXPORT CheckError {
// Stream for adding optional details to the error message.
std::ostream& stream();
- ~CheckError();
+ NOMERGE ~CheckError();
CheckError(const CheckError& other) = delete;
CheckError& operator=(const CheckError& other) = delete;
@@ -0,0 +1,35 @@
From e48f18eba0eae199ba7bc8a6a09ebf39799447c1 Mon Sep 17 00:00:00 2001
From: Ted Meyer <tmathmeyer@chromium.org>
Date: Wed, 2 Jun 2021 05:35:22 +0000
Subject: [PATCH] Extend enable-accelerated-video-decode flag for linux to m93
It appears that there is insistence that the flag be totally removed or
have its end-milestone increased, I can't just let it wait until the
feature is working again and then re-enable it. So i've moved it to 93.
R=dalecurtis
Fixed: 1207478
Change-Id: I26a5e790cd390825516b4a4b6af88e89b2d4f4eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2918478
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Ted Meyer <tmathmeyer@chromium.org>
Commit-Queue: Ted Meyer <tmathmeyer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#888312}
---
chrome/browser/flag-metadata.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
index 67e0330436..34542671f2 100644
--- a/chrome/browser/flag-metadata.json
+++ b/chrome/browser/flag-metadata.json
@@ -1193,7 +1193,7 @@
{
"name": "enable-accelerated-video-decode",
"owners": [ "media-dev@chromium.org" ],
- "expiry_milestone": 90
+ "expiry_milestone": 93
},
{
"name": "enable-accessibility-live-caption",
@@ -0,0 +1,45 @@
From c2d0133f47afb59b4ce64e42215d1d053f15250a Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Tue, 13 Apr 2021 23:21:42 +0000
Subject: [PATCH] fix crash in ThemeService
ThemeSyncableService and ThemeService are owned by each other. On
destruction of ThemeService, ThemeSyncableService gets destructed as
well, but calls RemoveObserver of partly destructed ThemeService object.
To avoid already destructed |observers_| list, move it before
|theme_syncable_service_| definition.
Bug: 1190561
Change-Id: I4dc2c990d589071d97b7fa737afef54463c84751
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2821311
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#872164}
---
chrome/browser/themes/theme_service.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/chrome/browser/themes/theme_service.h b/chrome/browser/themes/theme_service.h
index 592d40ae9de0f..337dfac9a040f 100644
--- a/chrome/browser/themes/theme_service.h
+++ b/chrome/browser/themes/theme_service.h
@@ -299,6 +299,10 @@ class ThemeService : public KeyedService,
// The number of infobars currently displayed.
int number_of_reinstallers_ = 0;
+ // Declared before |theme_syncable_service_|, because ThemeSyncableService
+ // removes itself from the |observers_| list on destruction.
+ base::ObserverList<ThemeServiceObserver> observers_;
+
std::unique_ptr<ThemeSyncableService> theme_syncable_service_;
#if BUILDFLAG(ENABLE_EXTENSIONS)
@@ -320,8 +324,6 @@ class ThemeService : public KeyedService,
ScopedObserver<ui::NativeTheme, ui::NativeThemeObserver>
native_theme_observer_{this};
- base::ObserverList<ThemeServiceObserver> observers_;
-
base::WeakPtrFactory<ThemeService> weak_ptr_factory_{this};
DISALLOW_COPY_AND_ASSIGN(ThemeService);
@@ -1,25 +0,0 @@
From c06ddc4935bf1394812c011ce5d93898ccc8a53a Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Tue, 09 Feb 2021 19:22:57 +0000
Subject: [PATCH] IWYU: add ctime for std::time
Bug: None
Change-Id: I8bdae43209984242b9f5e538d74ece4409b65e3c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2679610
Reviewed-by: Katie Dektar <katie@chromium.org>
Commit-Queue: Katie Dektar <katie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#852287}
---
diff --git a/ui/accessibility/ax_tree_serializer.h b/ui/accessibility/ax_tree_serializer.h
index ddbbdcd..1790e3b 100644
--- a/ui/accessibility/ax_tree_serializer.h
+++ b/ui/accessibility/ax_tree_serializer.h
@@ -8,6 +8,7 @@
#include <stddef.h>
#include <stdint.h>
+#include <ctime>
#include <ostream>
#include <unordered_map>
#include <unordered_set>
@@ -1,28 +0,0 @@
From 5a56bfe8d281250a1deee0d116a9fcde65b9c29a Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Fri, 15 Jan 2021 18:37:05 +0000
Subject: [PATCH] IWYU: add various missing includes
std::weak_ptr and std::shared_ptr require map
*int*_t types require cstdint
---
third_party/dawn/src/dawn_wire/client/Device.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/third_party/dawn/src/dawn_wire/client/Device.h b/third_party/dawn/src/dawn_wire/client/Device.h
index 3f16700..1082549 100644
--- a/third_party/dawn/src/dawn_wire/client/Device.h
+++ b/third_party/dawn/src/dawn_wire/client/Device.h
@@ -22,7 +22,9 @@
#include "dawn_wire/client/ApiObjects_autogen.h"
#include "dawn_wire/client/ObjectBase.h"
+#include <cstdint>
#include <map>
+#include <memory>
namespace dawn_wire { namespace client {
--
2.26.2
@@ -1,29 +0,0 @@
From 7cd4eab0bfca6192f14d6143410e1ae774eb1c29 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Thu, 31 Dec 2020 11:57:22 +0000
Subject: [PATCH] GCC: do not pass unique_ptr to DCHECK_NE, but the actual
pointer
DCHECK_NE comparison requires CheckOpValueStr to be defined for the
type, or providing an output stream operator. A unique_ptr does not
provide any. USE DCHECK instead.
---
net/third_party/quiche/src/quic/core/quic_path_validator.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/third_party/quiche/src/quic/core/quic_path_validator.cc b/net/third_party/quiche/src/quic/core/quic_path_validator.cc
index 0722216..fb2aeaf 100644
--- a/net/third_party/quiche/src/quic/core/quic_path_validator.cc
+++ b/net/third_party/quiche/src/quic/core/quic_path_validator.cc
@@ -68,7 +68,7 @@ void QuicPathValidator::OnPathResponse(const QuicPathFrameBuffer& probing_data,
void QuicPathValidator::StartPathValidation(
std::unique_ptr<QuicPathValidationContext> context,
std::unique_ptr<ResultDelegate> result_delegate) {
- DCHECK_NE(nullptr, context);
+ DCHECK(context);
QUIC_DLOG(INFO) << "Start validating path " << *context
<< " via writer: " << context->WriterToUse();
if (path_context_ != nullptr) {
--
2.26.2
@@ -1,26 +0,0 @@
From 1ee06c3678a85d158eb82d4af438d1e43a4c814e Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Sun, 6 Dec 2020 16:14:17 +0000
Subject: [PATCH] GCC: change make_visitor visibility to public
GCC complains that make_visitor is used in private context from
inner Iterator class.
---
net/third_party/quiche/src/quic/core/quic_interval_set.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/third_party/quiche/src/quic/core/quic_interval_set.h b/net/third_party/quiche/src/quic/core/quic_interval_set.h
index af64e29..7ee8978 100644
--- a/net/third_party/quiche/src/quic/core/quic_interval_set.h
+++ b/net/third_party/quiche/src/quic/core/quic_interval_set.h
@@ -1874,7 +1874,6 @@ class QUIC_NO_EXPORT QuicIntervalSet {
return absl::visit([&](auto& s) { return s.Contains(min, max); }, qiset_);
}
- private:
template <class A, class B, class C>
struct overloader : A, B, C {
overloader(A a, B b, C c) : A(a), B(b), C(c) {}
--
2.26.2
@@ -1,38 +0,0 @@
diff --git a/third_party/skia/include/effects/SkImageFilters.h b/third_party/skia/include/effects/SkImageFilters.h
index 04cce0a..d06b007 100644
--- a/third_party/skia/include/effects/SkImageFilters.h
+++ b/third_party/skia/include/effects/SkImageFilters.h
@@ -23,6 +23,9 @@ class SkColorFilter;
class SkPaint;
class SkRegion;
+constexpr SkRect kNoCropRect = {SK_ScalarNegativeInfinity, SK_ScalarNegativeInfinity,
+ SK_ScalarInfinity, SK_ScalarInfinity};
+
// A set of factory functions providing useful SkImageFilter effects. For image filters that take an
// input filter, providing nullptr means it will automatically use the dynamic source image. This
// source depends on how the filter is applied, but is either the contents of a saved layer when
@@ -33,8 +36,6 @@ public:
// to those types as a crop rect for the image filter factories. It's not intended to be used
// directly.
struct CropRect {
- static constexpr SkRect kNoCropRect = {SK_ScalarNegativeInfinity, SK_ScalarNegativeInfinity,
- SK_ScalarInfinity, SK_ScalarInfinity};
CropRect() : fCropRect(kNoCropRect) {}
// Intentionally not explicit so callers don't have to use this type but can use SkIRect or
// SkRect as desired.
diff --git a/third_party/skia/src/effects/imagefilters/SkImageFilters.cpp b/third_party/skia/src/effects/imagefilters/SkImageFilters.cpp
index 5290b00..fb97fc1 100644
--- a/third_party/skia/src/effects/imagefilters/SkImageFilters.cpp
+++ b/third_party/skia/src/effects/imagefilters/SkImageFilters.cpp
@@ -47,10 +47,6 @@ static SkImageFilter::CropRect to_legacy_crop_rect(const SkImageFilters::CropRec
: SkImageFilter::CropRect(SkRect::MakeEmpty(), 0x0);
}
-// Allow kNoCropRect to be referenced (for certain builds, e.g. macOS libFuzzer chromium target,
-// see crbug.com/1139725)
-constexpr SkRect SkImageFilters::CropRect::kNoCropRect;
-
void SkImageFilters::RegisterFlattenables() {
SkAlphaThresholdFilter::RegisterFlattenables();
SkArithmeticImageFilter::RegisterFlattenables();
@@ -0,0 +1,24 @@
From 714092f336bb14d2fcc27396ec323b3d843bb962 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Thu, 4 Mar 2021 15:05:46 +0000
Subject: [PATCH] IWYU: include limits for std::numeric_limits
---
third_party/ruy/src/ruy/block_map.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/third_party/ruy/src/ruy/block_map.cc b/third_party/ruy/src/ruy/block_map.cc
index 44e5039..a7a7559 100644
--- a/third_party/ruy/src/ruy/block_map.cc
+++ b/third_party/ruy/src/ruy/block_map.cc
@@ -17,6 +17,7 @@ limitations under the License.
#include <algorithm>
#include <cstdint>
+#include <limits>
#ifdef RUY_MAKEBLOCKMAP_DEBUG
#include <cstdio>
--
2.26.2
@@ -1,17 +1,17 @@
From f4d0b0eb899005b4b8b6388e1d8bb82cc0018fc8 Mon Sep 17 00:00:00 2001
From: Mike Gilbert <floppym@gentoo.org>
Date: Sun, 15 Nov 2020 08:37:23 +0000
Date: Wed, 7 Apr 2021 08:50:04 +0000
Subject: [PATCH] Disable various compiler configs
---
build/config/compiler/BUILD.gn | 52 +++++++++++-----------------------
1 file changed, 17 insertions(+), 35 deletions(-)
build/config/compiler/BUILD.gn | 59 ++++++++++------------------------
1 file changed, 17 insertions(+), 42 deletions(-)
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 9d66490..a2bc09e 100644
index 72ea590..539672d 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -254,8 +254,6 @@ config("compiler") {
@@ -273,8 +273,6 @@ config("compiler") {
configs += [
# See the definitions below.
@@ -20,25 +20,32 @@ index 9d66490..a2bc09e 100644
":compiler_codegen",
":compiler_deterministic",
]
@@ -478,17 +476,6 @@ config("compiler") {
@@ -518,24 +516,6 @@ config("compiler") {
ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
}
- if (is_clang && !is_nacl && !use_xcode_clang) {
- cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ]
-
- # TODO(hans): Remove this once Clang generates better optimized debug info
- # by default. https://crbug.com/765793
- cflags += [
- # TODO(hans): Remove this once Clang generates better optimized debug info
- # by default. https://crbug.com/765793
- "-mllvm",
- "-instcombine-lower-dbg-declare=0",
- ]
- if (!is_debug && use_thin_lto && is_a_target_toolchain) {
- if (is_win) {
- ldflags += [ "-mllvm:-instcombine-lower-dbg-declare=0" ]
- } else {
- ldflags += [ "-Wl,-mllvm,-instcombine-lower-dbg-declare=0" ]
- }
- }
- }
-
# C11/C++11 compiler flags setup.
# ---------------------------
if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) ||
@@ -1574,7 +1561,7 @@ config("chromium_code") {
@@ -1643,7 +1623,7 @@ config("chromium_code") {
defines = [ "_HAS_NODISCARD" ]
}
} else {
@@ -47,7 +54,7 @@ index 9d66490..a2bc09e 100644
if (treat_warnings_as_errors) {
cflags += [ "-Werror" ]
@@ -1583,10 +1570,6 @@ config("chromium_code") {
@@ -1652,10 +1632,6 @@ config("chromium_code") {
# well.
ldflags = [ "-Werror" ]
}
@@ -58,7 +65,7 @@ index 9d66490..a2bc09e 100644
# In Chromium code, we define __STDC_foo_MACROS in order to get the
# C99 macros on Mac and Linux.
@@ -1595,15 +1578,6 @@ config("chromium_code") {
@@ -1664,15 +1640,6 @@ config("chromium_code") {
"__STDC_FORMAT_MACROS",
]
@@ -74,7 +81,7 @@ index 9d66490..a2bc09e 100644
if (is_mac) {
cflags_objc = [ "-Wobjc-missing-property-synthesis" ]
cflags_objcc = [ "-Wobjc-missing-property-synthesis" ]
@@ -2006,7 +1980,8 @@ config("default_stack_frames") {
@@ -2068,7 +2035,8 @@ config("default_stack_frames") {
}
# Default "optimization on" config.
@@ -84,7 +91,7 @@ index 9d66490..a2bc09e 100644
if (is_win) {
if (chrome_pgo_phase != 2) {
# Favor size over speed, /O1 must be before the common flags.
@@ -2041,7 +2016,8 @@ config("optimize") {
@@ -2103,7 +2071,8 @@ config("optimize") {
}
# Turn off optimizations.
@@ -94,7 +101,7 @@ index 9d66490..a2bc09e 100644
if (is_win) {
cflags = [
"/Od", # Disable optimization.
@@ -2081,7 +2057,8 @@ config("no_optimize") {
@@ -2143,7 +2112,8 @@ config("no_optimize") {
# Turns up the optimization level. On Windows, this implies whole program
# optimization and link-time code generation which is very expensive and should
# be used sparingly.
@@ -104,7 +111,7 @@ index 9d66490..a2bc09e 100644
if (is_nacl && is_nacl_irt) {
# The NaCl IRT is a special case and always wants its own config.
# Various components do:
@@ -2113,7 +2090,8 @@ config("optimize_max") {
@@ -2175,7 +2145,8 @@ config("optimize_max") {
#
# TODO(crbug.com/621335) - rework how all of these configs are related
# so that we don't need this disclaimer.
@@ -114,7 +121,7 @@ index 9d66490..a2bc09e 100644
if (is_nacl && is_nacl_irt) {
# The NaCl IRT is a special case and always wants its own config.
# Various components do:
@@ -2138,7 +2116,8 @@ config("optimize_speed") {
@@ -2200,7 +2171,8 @@ config("optimize_speed") {
}
}
@@ -124,7 +131,7 @@ index 9d66490..a2bc09e 100644
cflags = [ "-O1" ] + common_optimize_on_cflags
ldflags = common_optimize_on_ldflags
visibility = [ ":default_optimization" ]
@@ -2267,7 +2246,8 @@ config("win_pdbaltpath") {
@@ -2319,7 +2291,8 @@ config("win_pdbaltpath") {
}
# Full symbols.
@@ -134,7 +141,7 @@ index 9d66490..a2bc09e 100644
if (is_win) {
if (is_clang) {
cflags = [ "/Z7" ] # Debug information in the .obj files.
@@ -2365,7 +2345,8 @@ config("symbols") {
@@ -2422,7 +2395,8 @@ config("symbols") {
# Minimal symbols.
# This config guarantees to hold symbol for stack trace which are shown to user
# when crash happens in unittests running on buildbot.
@@ -144,7 +151,7 @@ index 9d66490..a2bc09e 100644
if (is_win) {
# Functions, files, and line tables only.
cflags = []
@@ -2418,7 +2399,8 @@ config("minimal_symbols") {
@@ -2481,7 +2455,8 @@ config("minimal_symbols") {
# This configuration contains function names only. That is, the compiler is
# told to not generate debug information and the linker then just puts function
# names in the final debug information.
@@ -155,5 +162,4 @@ index 9d66490..a2bc09e 100644
ldflags = [ "/DEBUG" ]
--
2.26.2
2.26.3
@@ -0,0 +1,91 @@
diff --git a/third_party/libyuv/source/row_neon64.cc b/third_party/libyuv/source/row_neon64.cc
index 350c964..2aab413 100644
--- a/third_party/libyuv/source/row_neon64.cc
+++ b/third_party/libyuv/source/row_neon64.cc
@@ -1835,7 +1835,7 @@ void ARGBToAB64Row_NEON(const uint8_t* src_argb,
: "+r"(src_argb), // %0
"+r"(dst_ab64), // %1
"+r"(width) // %2
- : "m"(kShuffleARGBToABGR) // %3
+ : "Q"(kShuffleARGBToABGR) // %3
: "cc", "memory", "v0", "v1", "v2", "v3", "v4");
}
@@ -1859,7 +1859,7 @@ void AR64ToARGBRow_NEON(const uint16_t* src_ar64,
: "+r"(src_ar64), // %0
"+r"(dst_argb), // %1
"+r"(width) // %2
- : "m"(kShuffleAR64ToARGB) // %3
+ : "Q"(kShuffleAR64ToARGB) // %3
: "cc", "memory", "v0", "v1", "v2", "v3", "v4");
}
@@ -1883,7 +1883,7 @@ void AB64ToARGBRow_NEON(const uint16_t* src_ab64,
: "+r"(src_ab64), // %0
"+r"(dst_argb), // %1
"+r"(width) // %2
- : "m"(kShuffleAB64ToARGB) // %3
+ : "Q"(kShuffleAB64ToARGB) // %3
: "cc", "memory", "v0", "v1", "v2", "v3", "v4");
}
diff --git a/third_party/libyuv/source/scale_neon64.cc b/third_party/libyuv/source/scale_neon64.cc
index 8656fec..9f9636e 100644
--- a/third_party/libyuv/source/scale_neon64.cc
+++ b/third_party/libyuv/source/scale_neon64.cc
@@ -601,8 +601,8 @@ void ScaleRowUp2_Bilinear_NEON(const uint8_t* src_ptr,
"umlal v4.8h, v1.8b, v31.8b \n" // 3*near+far (2, odd)
"umlal v5.8h, v0.8b, v31.8b \n" // 3*near+far (2, even)
- "mov v0.8h, v4.8h \n"
- "mov v1.8h, v5.8h \n"
+ "mov v0.16b, v4.16b \n"
+ "mov v1.16b, v5.16b \n"
"mla v4.8h, v2.8h, v30.8h \n" // 9 3 3 1 (1, odd)
"mla v5.8h, v3.8h, v30.8h \n" // 9 3 3 1 (1, even)
"mla v2.8h, v0.8h, v30.8h \n" // 9 3 3 1 (2, odd)
@@ -642,7 +642,7 @@ void ScaleRowUp2_Linear_12_NEON(const uint16_t* src_ptr,
"ld1 {v1.8h}, [%1], #16 \n" // 12345678 (16b)
"prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead
- "mov v2.8h, v0.8h \n"
+ "mov v2.16b, v0.16b \n"
"mla v0.8h, v1.8h, v31.8h \n" // 3*near+far (odd)
"mla v1.8h, v2.8h, v31.8h \n" // 3*near+far (even)
@@ -679,7 +679,7 @@ void ScaleRowUp2_Bilinear_12_NEON(const uint16_t* src_ptr,
"ld1 {v3.8h}, [%2], #16 \n" // 12345678 (16b)
"prfm pldl1keep, [%0, 448] \n" // prefetch 7 lines ahead
- "mov v0.8h, v2.8h \n"
+ "mov v0.16b, v2.16b \n"
"mla v2.8h, v3.8h, v31.8h \n" // 3*near+far (odd)
"mla v3.8h, v0.8h, v31.8h \n" // 3*near+far (even)
@@ -687,12 +687,12 @@ void ScaleRowUp2_Bilinear_12_NEON(const uint16_t* src_ptr,
"ld1 {v5.8h}, [%3], #16 \n" // 12345678 (16b)
"prfm pldl1keep, [%1, 448] \n" // prefetch 7 lines ahead
- "mov v0.8h, v4.8h \n"
+ "mov v0.16b, v4.16b \n"
"mla v4.8h, v5.8h, v31.8h \n" // 3*near+far (odd)
"mla v5.8h, v0.8h, v31.8h \n" // 3*near+far (even)
- "mov v0.8h, v4.8h \n"
- "mov v1.8h, v5.8h \n"
+ "mov v0.16b, v4.16b \n"
+ "mov v1.16b, v5.16b \n"
"mla v4.8h, v2.8h, v31.8h \n" // 9 3 3 1 (1, odd)
"mla v5.8h, v3.8h, v31.8h \n" // 9 3 3 1 (1, even)
"mla v2.8h, v0.8h, v31.8h \n" // 9 3 3 1 (2, odd)
@@ -887,8 +887,8 @@ void ScaleUVRowUp2_Bilinear_NEON(const uint8_t* src_ptr,
"umlal v4.8h, v1.8b, v31.8b \n" // 3*near+far (2, odd)
"umlal v5.8h, v0.8b, v31.8b \n" // 3*near+far (2, even)
- "mov v0.8h, v4.8h \n"
- "mov v1.8h, v5.8h \n"
+ "mov v0.16b, v4.16b \n"
+ "mov v1.16b, v5.16b \n"
"mla v4.8h, v2.8h, v30.8h \n" // 9 3 3 1 (1, odd)
"mla v5.8h, v3.8h, v30.8h \n" // 9 3 3 1 (1, even)
"mla v2.8h, v0.8h, v30.8h \n" // 9 3 3 1 (2, odd)
@@ -0,0 +1,47 @@
From 429e6f78a88473208e96689afa2f6e91f07a4f8c Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Sat, 10 Apr 2021 17:02:49 +0000
Subject: [PATCH] GCC: fix vector types in pcscan
* _mm_cmpeq_epi64 result is __m128i
* maybe_ptrs is __m128i already and doesn't require cast
Bug: 819294
Change-Id: I3f8c6cc327191827838e80aea1431ac09315fe88
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2817544
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Stephan Hartmann <stha09@googlemail.com>
Cr-Commit-Position: refs/heads/master@{#871265}
---
diff --git a/base/allocator/partition_allocator/starscan/pcscan.cc b/base/allocator/partition_allocator/starscan/pcscan.cc
index c7854ff..d5c0aea 100644
--- a/base/allocator/partition_allocator/starscan/pcscan.cc
+++ b/base/allocator/partition_allocator/starscan/pcscan.cc
@@ -1143,7 +1143,7 @@
const __m128i maybe_ptrs =
_mm_loadu_si128(reinterpret_cast<__m128i*>(payload));
const __m128i vand = _mm_and_si128(maybe_ptrs, cage_mask);
- const __m128d vcmp = _mm_cmpeq_epi64(vand, vbase);
+ const __m128i vcmp = _mm_cmpeq_epi64(vand, vbase);
const int mask = _mm_movemask_pd(_mm_castsi128_pd(vcmp));
if (LIKELY(!mask))
continue;
@@ -1153,15 +1153,14 @@
if (mask & 0b01) {
quarantine_size +=
pcscan_task_.TryMarkObjectInNormalBuckets<GigaCageLookupPolicy>(
- _mm_cvtsi128_si64(_mm_castpd_si128(maybe_ptrs)));
+ _mm_cvtsi128_si64(maybe_ptrs));
}
if (mask & 0b10) {
// Extraction intrinsics for qwords are only supported in SSE4.1, so
// instead we reshuffle dwords with pshufd. The mask is used to move the
// 4th and 3rd dwords into the second and first position.
static constexpr int kSecondWordMask = (3 << 2) | (2 << 0);
- const __m128i shuffled =
- _mm_shuffle_epi32(_mm_castpd_si128(maybe_ptrs), kSecondWordMask);
+ const __m128i shuffled = _mm_shuffle_epi32(maybe_ptrs, kSecondWordMask);
quarantine_size +=
pcscan_task_.TryMarkObjectInNormalBuckets<GigaCageLookupPolicy>(
_mm_cvtsi128_si64(shuffled));
@@ -0,0 +1,238 @@
From 80368f8ba7a8bab13440463a254888311efe3986 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Tue, 4 May 2021 15:00:19 +0000
Subject: [PATCH] sql: make VirtualCursor standard layout type
sql::recover::VirtualCursor needs to be a standard layout type, but
has members of type std::unique_ptr. However, std::unique_ptr is not
guaranteed to be standard layout. Compiling with clang combined with
gcc-11 libstdc++ fails because of this. Replace std::unique_ptr with
raw pointers.
Bug: 1189788
Change-Id: Ia6dc388cc5ef1c0f2afc75f8ca45b9f12687ca9c
---
sql/recover_module/btree.cc | 21 +++++++++++++++------
sql/recover_module/btree.h | 17 +++++++++++++----
sql/recover_module/cursor.cc | 24 ++++++++++++------------
sql/recover_module/cursor.h | 2 +-
sql/recover_module/pager.cc | 7 +++----
sql/recover_module/pager.h | 5 +++--
6 files changed, 47 insertions(+), 29 deletions(-)
diff --git a/sql/recover_module/btree.cc b/sql/recover_module/btree.cc
index 9ecaafe8a3..839318abf9 100644
--- a/sql/recover_module/btree.cc
+++ b/sql/recover_module/btree.cc
@@ -135,16 +135,25 @@ static_assert(std::is_trivially_destructible<LeafPageDecoder>::value,
"Move the destructor to the .cc file if it's non-trival");
#endif // !DCHECK_IS_ON()
-LeafPageDecoder::LeafPageDecoder(DatabasePageReader* db_reader) noexcept
- : page_id_(db_reader->page_id()),
- db_reader_(db_reader),
- cell_count_(ComputeCellCount(db_reader)),
- next_read_index_(0),
- last_record_size_(0) {
+void LeafPageDecoder::Initialize(DatabasePageReader* db_reader) {
+ DCHECK(db_reader);
DCHECK(IsOnValidPage(db_reader));
+ page_id_ = db_reader->page_id();
+ db_reader_ = db_reader;
+ cell_count_ = ComputeCellCount(db_reader);
+ next_read_index_ = 0;
+ last_record_size_ = 0;
DCHECK(DatabasePageReader::IsValidPageId(page_id_));
}
+void LeafPageDecoder::Reset() {
+ db_reader_ = nullptr;
+ page_id_ = 0;
+ cell_count_ = 0;
+ next_read_index_ = 0;
+ last_record_size_ = 0;
+}
+
bool LeafPageDecoder::TryAdvance() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(CanAdvance());
diff --git a/sql/recover_module/btree.h b/sql/recover_module/btree.h
index d76d076bf6..33114b01fa 100644
--- a/sql/recover_module/btree.h
+++ b/sql/recover_module/btree.h
@@ -102,7 +102,7 @@ class LeafPageDecoder {
//
// |db_reader| must have been used to read an inner page of a table B-tree.
// |db_reader| must outlive this instance.
- explicit LeafPageDecoder(DatabasePageReader* db_reader) noexcept;
+ explicit LeafPageDecoder() noexcept = default;
~LeafPageDecoder() noexcept = default;
LeafPageDecoder(const LeafPageDecoder&) = delete;
@@ -150,6 +150,15 @@ class LeafPageDecoder {
// read as long as CanAdvance() returns true.
bool TryAdvance();
+ // Initialize with DatabasePageReader
+ void Initialize(DatabasePageReader* db_reader);
+
+ // Reset internal DatabasePageReader
+ void Reset();
+
+ // True if DatabasePageReader is valid
+ bool IsValid() { return (db_reader_ != nullptr); }
+
// True if the given reader may point to an inner page in a table B-tree.
//
// The last ReadPage() call on |db_reader| must have succeeded.
@@ -163,14 +172,14 @@ class LeafPageDecoder {
static int ComputeCellCount(DatabasePageReader* db_reader);
// The number of the B-tree page this reader is reading.
- const int64_t page_id_;
+ int64_t page_id_;
// Used to read the tree page.
//
// Raw pointer usage is acceptable because this instance's owner is expected
// to ensure that the DatabasePageReader outlives this.
- DatabasePageReader* const db_reader_;
+ DatabasePageReader* db_reader_;
// Caches the ComputeCellCount() value for this reader's page.
- const int cell_count_ = ComputeCellCount(db_reader_);
+ int cell_count_;
// The reader's cursor state.
//
diff --git a/sql/recover_module/cursor.cc b/sql/recover_module/cursor.cc
index 0029ff9295..42548bc4b5 100644
--- a/sql/recover_module/cursor.cc
+++ b/sql/recover_module/cursor.cc
@@ -26,7 +26,7 @@ VirtualCursor::~VirtualCursor() {
int VirtualCursor::First() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
inner_decoders_.clear();
- leaf_decoder_ = nullptr;
+ leaf_decoder_.Reset();
AppendPageDecoder(table_->root_page_id());
return Next();
@@ -36,18 +36,18 @@ int VirtualCursor::Next() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
record_reader_.Reset();
- while (!inner_decoders_.empty() || leaf_decoder_.get()) {
- if (leaf_decoder_.get()) {
- if (!leaf_decoder_->CanAdvance()) {
+ while (!inner_decoders_.empty() || leaf_decoder_.IsValid()) {
+ if (leaf_decoder_.IsValid()) {
+ if (!leaf_decoder_.CanAdvance()) {
// The leaf has been exhausted. Remove it from the DFS stack.
- leaf_decoder_ = nullptr;
+ leaf_decoder_.Reset();
continue;
}
- if (!leaf_decoder_->TryAdvance())
+ if (!leaf_decoder_.TryAdvance())
continue;
- if (!payload_reader_.Initialize(leaf_decoder_->last_record_size(),
- leaf_decoder_->last_record_offset())) {
+ if (!payload_reader_.Initialize(leaf_decoder_.last_record_size(),
+ leaf_decoder_.last_record_offset())) {
continue;
}
if (!record_reader_.Initialize())
@@ -99,13 +99,13 @@ int VirtualCursor::ReadColumn(int column_index,
int64_t VirtualCursor::RowId() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(record_reader_.IsInitialized());
- DCHECK(leaf_decoder_.get());
- return leaf_decoder_->last_record_rowid();
+ DCHECK(leaf_decoder_.IsValid());
+ return leaf_decoder_.last_record_rowid();
}
void VirtualCursor::AppendPageDecoder(int page_id) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
- DCHECK(leaf_decoder_.get() == nullptr)
+ DCHECK(!leaf_decoder_.IsValid())
<< __func__
<< " must only be called when the current path has no leaf decoder";
@@ -113,7 +113,7 @@ void VirtualCursor::AppendPageDecoder(int page_id) {
return;
if (LeafPageDecoder::IsOnValidPage(&db_reader_)) {
- leaf_decoder_ = std::make_unique<LeafPageDecoder>(&db_reader_);
+ leaf_decoder_.Initialize(&db_reader_);
return;
}
diff --git a/sql/recover_module/cursor.h b/sql/recover_module/cursor.h
index afcd6900e1..b15c31d425 100644
--- a/sql/recover_module/cursor.h
+++ b/sql/recover_module/cursor.h
@@ -129,7 +129,7 @@ class VirtualCursor {
std::vector<std::unique_ptr<InnerPageDecoder>> inner_decoders_;
// Decodes the leaf page containing records.
- std::unique_ptr<LeafPageDecoder> leaf_decoder_;
+ LeafPageDecoder leaf_decoder_;
SEQUENCE_CHECKER(sequence_checker_);
};
diff --git a/sql/recover_module/pager.cc b/sql/recover_module/pager.cc
index 58e75de270..5fe96204e5 100644
--- a/sql/recover_module/pager.cc
+++ b/sql/recover_module/pager.cc
@@ -23,8 +23,7 @@ static_assert(DatabasePageReader::kMaxPageId <= std::numeric_limits<int>::max(),
"ints are not appropriate for representing page IDs");
DatabasePageReader::DatabasePageReader(VirtualTable* table)
- : page_data_(std::make_unique<uint8_t[]>(table->page_size())),
- table_(table) {
+ : page_data_(), table_(table) {
DCHECK(table != nullptr);
DCHECK(IsValidPageSize(table->page_size()));
}
@@ -57,8 +56,8 @@ int DatabasePageReader::ReadPage(int page_id) {
std::numeric_limits<int64_t>::max(),
"The |read_offset| computation above may overflow");
- int sqlite_status =
- RawRead(sqlite_file, read_size, read_offset, page_data_.get());
+ int sqlite_status = RawRead(sqlite_file, read_size, read_offset,
+ const_cast<uint8_t*>(page_data_.data()));
// |page_id_| needs to be set to kInvalidPageId if the read failed.
// Otherwise, future ReadPage() calls with the previous |page_id_| value
diff --git a/sql/recover_module/pager.h b/sql/recover_module/pager.h
index 0e388ddc3b..99314e30ff 100644
--- a/sql/recover_module/pager.h
+++ b/sql/recover_module/pager.h
@@ -5,6 +5,7 @@
#ifndef SQL_RECOVER_MODULE_PAGER_H_
#define SQL_RECOVER_MODULE_PAGER_H_
+#include <array>
#include <cstdint>
#include <memory>
@@ -70,7 +71,7 @@ class DatabasePageReader {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK_NE(page_id_, kInvalidPageId)
<< "Successful ReadPage() required before accessing pager state";
- return page_data_.get();
+ return page_data_.data();
}
// The number of bytes in the page read by the last ReadPage() call.
@@ -137,7 +138,7 @@ class DatabasePageReader {
int page_id_ = kInvalidPageId;
// Stores the bytes of the last page successfully read by ReadPage().
// The content is undefined if the last call to ReadPage() did not succeed.
- const std::unique_ptr<uint8_t[]> page_data_;
+ const std::array<uint8_t, kMaxPageSize> page_data_;
// Raw pointer usage is acceptable because this instance's owner is expected
// to ensure that the VirtualTable outlives this.
VirtualTable* const table_;
+16 -10
View File
@@ -13,7 +13,7 @@
<IsA>app:gui</IsA>
<Summary>A WebKit powered web browser</Summary>
<Description>Chromium-browser is an open-source web browser, powered by WebKit.</Description>
<Archive type="tarxz" sha1sum="d0826ac53536e82ec517468bd8f299340125bfe3">http://gsdview.appspot.com/chromium-browser-official/chromium-89.0.4389.90.tar.xz</Archive>
<Archive type="tarxz" sha1sum="0ad18d5fd5f14b2f2b42dc6534e965f996814b6b">http://gsdview.appspot.com/chromium-browser-official/chromium-91.0.4472.77.tar.xz</Archive>
<BuildDependencies>
<Dependency>alsa-lib-devel</Dependency>
<Dependency>at-spi2-atk-devel</Dependency>
@@ -101,20 +101,19 @@
<Dependency>libevent-devel</Dependency>
</BuildDependencies>
<Patches>
<Patch level="1">add-dependency-on-opus-in-webcodecs.patch</Patch>
<Patch level="1">add-clang-nomerge-attribute-to-CheckError.patch</Patch>
<Patch level="1">extend-enable-accelerated-video-decode-flag.patch</Patch>
<Patch level="1">fix-crash-in-ThemeService.patch</Patch>
<Patch level="1">sql-make-VirtualCursor-standard-layout-type.patch</Patch>
<Patch level="1">use-oauth2-client-switches-as-default.patch</Patch>
<Patch level="1">x11-ozone-fix-two-edge-cases.patch</Patch>
<Patch level="1">chromium-89-EnumTable-crash.patch</Patch>
<Patch level="1">wayland-egl.patch</Patch>
<!-- Chromium Patchset -->
<!-- Source: https://github.com/stha09/chromium-patches -->
<Patch level="1">patches/chromium-78-protobuf-RepeatedPtrField-export.patch</Patch>
<Patch level="1">patches/chromium-88-compiler.patch</Patch>
<Patch level="1">patches/chromium-89-AXTreeSerializer-include.patch</Patch>
<Patch level="1">patches/chromium-89-dawn-include.patch</Patch>
<Patch level="1">patches/chromium-89-quiche-dcheck.patch</Patch>
<Patch level="1">patches/chromium-89-quiche-private.patch</Patch>
<Patch level="1">patches/chromium-89-skia-CropRect.patch</Patch>
<Patch level="1">patches/chromium-90-ruy-include.patch</Patch>
<Patch level="1">patches/chromium-91-compiler.patch</Patch>
<Patch level="1">patches/chromium-91-libyuv-aarch64.patch</Patch>
<Patch level="1">patches/chromium-91-pcscan-vector-types.patch</Patch>
</Patches>
</Source>
@@ -195,6 +194,13 @@
</Package>
<History>
<Update release="23">
<Date>2021-06-03</Date>
<Version>91.0.4472.77</Version>
<Comment>Version Bump</Comment>
<Name>İdris Kalp</Name>
<Email>idriskalp@gmail.com</Email>
</Update>
<Update release="22">
<Date>2021-03-18</Date>
<Version>89.0.4389.90</Version>