summaryrefslogtreecommitdiff
path: root/www-client/chromium/files
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2022-03-01 13:00:17 -0500
committerGravatar Chris Xiong <chirs241097@gmail.com> 2022-03-01 13:00:17 -0500
commitf7d1db5b8e26b77e8b403efb6a8843378f32b8dd (patch)
treecd9595d0b73bdd89496347c247cde9b064548460 /www-client/chromium/files
parent2a06ede2d653fbf8fd5d64da5822fddf26208a2b (diff)
downloadppo-f7d1db5b8e26b77e8b403efb6a8843378f32b8dd.tar.xz
chromium-100.0.4896.12 (testing)
Diffstat (limited to 'www-client/chromium/files')
-rw-r--r--www-client/chromium/files/chromium-100-GLImplementationParts-constexpr.patch92
-rw-r--r--www-client/chromium/files/chromium-100-InMilliseconds-constexpr.patch97
-rw-r--r--www-client/chromium/files/chromium-100-SCTHashdanceMetadata-move.patch35
-rw-r--r--www-client/chromium/files/chromium-100-macro-typo.patch29
-rw-r--r--www-client/chromium/files/chromium-100-sandbox-include.patch12
5 files changed, 265 insertions, 0 deletions
diff --git a/www-client/chromium/files/chromium-100-GLImplementationParts-constexpr.patch b/www-client/chromium/files/chromium-100-GLImplementationParts-constexpr.patch
new file mode 100644
index 0000000..437e672
--- /dev/null
+++ b/www-client/chromium/files/chromium-100-GLImplementationParts-constexpr.patch
@@ -0,0 +1,92 @@
+From d32156fd3773330eca99e9cba5e18db57aaa1a53 Mon Sep 17 00:00:00 2001
+From: Stephan Hartmann <stha09@googlemail.com>
+Date: Sat, 19 Feb 2022 10:14:24 +0000
+Subject: [PATCH] GCC: make GLImplementationParts constructors constexpr
+
+Fix build error in GCC, as the constexpr operator== requires its
+invocations to be also constexpr.
+---
+ ui/gl/gl_implementation.cc | 23 -----------------------
+ ui/gl/gl_implementation.h | 25 +++++++++++++++++++++++--
+ 2 files changed, 23 insertions(+), 25 deletions(-)
+
+diff --git a/ui/gl/gl_implementation.cc b/ui/gl/gl_implementation.cc
+index e4e5456..3e4a47c 100644
+--- a/ui/gl/gl_implementation.cc
++++ b/ui/gl/gl_implementation.cc
+@@ -26,29 +26,6 @@
+
+ namespace gl {
+
+-ANGLEImplementation MakeANGLEImplementation(
+- const GLImplementation gl_impl,
+- const ANGLEImplementation angle_impl) {
+- if (gl_impl == kGLImplementationEGLANGLE) {
+- if (angle_impl == ANGLEImplementation::kNone) {
+- return ANGLEImplementation::kDefault;
+- } else {
+- return angle_impl;
+- }
+- } else {
+- return ANGLEImplementation::kNone;
+- }
+-}
+-
+-GLImplementationParts::GLImplementationParts(
+- const ANGLEImplementation angle_impl)
+- : gl(kGLImplementationEGLANGLE),
+- angle(MakeANGLEImplementation(kGLImplementationEGLANGLE, angle_impl)) {}
+-
+-GLImplementationParts::GLImplementationParts(const GLImplementation gl_impl)
+- : gl(gl_impl),
+- angle(MakeANGLEImplementation(gl_impl, ANGLEImplementation::kDefault)) {}
+-
+ bool GLImplementationParts::IsValid() const {
+ if (angle == ANGLEImplementation::kNone) {
+ return (gl != kGLImplementationEGLANGLE);
+diff --git a/ui/gl/gl_implementation.h b/ui/gl/gl_implementation.h
+index 376ed58..a2513ea 100644
+--- a/ui/gl/gl_implementation.h
++++ b/ui/gl/gl_implementation.h
+@@ -59,8 +59,14 @@ enum class ANGLEImplementation {
+ };
+
+ struct GL_EXPORT GLImplementationParts {
+- explicit GLImplementationParts(const ANGLEImplementation angle_impl);
+- explicit GLImplementationParts(const GLImplementation gl_impl);
++ constexpr explicit GLImplementationParts(const ANGLEImplementation angle_impl)
++ : gl(kGLImplementationEGLANGLE),
++ angle(MakeANGLEImplementation(kGLImplementationEGLANGLE, angle_impl)) {}
++
++ constexpr explicit GLImplementationParts(const GLImplementation gl_impl)
++ : gl(gl_impl),
++ angle(MakeANGLEImplementation(gl_impl, ANGLEImplementation::kDefault)) {
++ }
+
+ GLImplementation gl = kGLImplementationNone;
+ ANGLEImplementation angle = ANGLEImplementation::kNone;
+@@ -80,6 +86,21 @@ struct GL_EXPORT GLImplementationParts {
+ bool IsValid() const;
+ bool IsAllowed(const std::vector<GLImplementationParts>& allowed_impls) const;
+ std::string ToString() const;
++
++ private:
++ constexpr ANGLEImplementation MakeANGLEImplementation(
++ const GLImplementation gl_impl,
++ const ANGLEImplementation angle_impl) {
++ if (gl_impl == kGLImplementationEGLANGLE) {
++ if (angle_impl == ANGLEImplementation::kNone) {
++ return ANGLEImplementation::kDefault;
++ } else {
++ return angle_impl;
++ }
++ } else {
++ return ANGLEImplementation::kNone;
++ }
++ }
+ };
+
+ struct GL_EXPORT GLWindowSystemBindingInfo {
+--
+2.34.1
+
diff --git a/www-client/chromium/files/chromium-100-InMilliseconds-constexpr.patch b/www-client/chromium/files/chromium-100-InMilliseconds-constexpr.patch
new file mode 100644
index 0000000..cf4562a
--- /dev/null
+++ b/www-client/chromium/files/chromium-100-InMilliseconds-constexpr.patch
@@ -0,0 +1,97 @@
+From da6e3f6071fdabeb96c0805626418414b4a4cea8 Mon Sep 17 00:00:00 2001
+From: Stephan Hartmann <stha09@googlemail.com>
+Date: Wed, 9 Feb 2022 17:56:21 +0000
+Subject: [PATCH] GCC: make base::InMilliseconds(F,RoundedUp) constexpr
+
+media::DecodeTimestamp uses it in several constexpr methods.
+---
+ base/time/time.cc | 24 ------------------------
+ base/time/time.h | 30 +++++++++++++++++++++++++++---
+ 2 files changed, 27 insertions(+), 27 deletions(-)
+
+diff --git a/base/time/time.cc b/base/time/time.cc
+index 0de273e..e0acda2 100644
+--- a/base/time/time.cc
++++ b/base/time/time.cc
+@@ -74,30 +74,6 @@ int TimeDelta::InDaysFloored() const {
+ : std::numeric_limits<int>::max();
+ }
+
+-double TimeDelta::InMillisecondsF() const {
+- if (!is_inf())
+- return static_cast<double>(delta_) / Time::kMicrosecondsPerMillisecond;
+- return (delta_ < 0) ? -std::numeric_limits<double>::infinity()
+- : std::numeric_limits<double>::infinity();
+-}
+-
+-int64_t TimeDelta::InMilliseconds() const {
+- if (!is_inf())
+- return delta_ / Time::kMicrosecondsPerMillisecond;
+- return (delta_ < 0) ? std::numeric_limits<int64_t>::min()
+- : std::numeric_limits<int64_t>::max();
+-}
+-
+-int64_t TimeDelta::InMillisecondsRoundedUp() const {
+- if (!is_inf()) {
+- const int64_t result = delta_ / Time::kMicrosecondsPerMillisecond;
+- // Convert |result| from truncating to ceiling.
+- return (delta_ > result * Time::kMicrosecondsPerMillisecond) ? (result + 1)
+- : result;
+- }
+- return delta_;
+-}
+-
+ double TimeDelta::InMicrosecondsF() const {
+ if (!is_inf())
+ return static_cast<double>(delta_);
+diff --git a/base/time/time.h b/base/time/time.h
+index c027aab..fb1d78d 100644
+--- a/base/time/time.h
++++ b/base/time/time.h
+@@ -216,9 +216,9 @@ class BASE_EXPORT TimeDelta {
+ constexpr int InMinutes() const;
+ constexpr double InSecondsF() const;
+ constexpr int64_t InSeconds() const;
+- double InMillisecondsF() const;
+- int64_t InMilliseconds() const;
+- int64_t InMillisecondsRoundedUp() const;
++ constexpr double InMillisecondsF() const;
++ constexpr int64_t InMilliseconds() const;
++ constexpr int64_t InMillisecondsRoundedUp() const;
+ constexpr int64_t InMicroseconds() const { return delta_; }
+ double InMicrosecondsF() const;
+ constexpr int64_t InNanoseconds() const;
+@@ -889,6 +889,30 @@ constexpr int64_t TimeDelta::InSeconds() const {
+ return is_inf() ? delta_ : (delta_ / Time::kMicrosecondsPerSecond);
+ }
+
++constexpr double TimeDelta::InMillisecondsF() const {
++ if (!is_inf())
++ return static_cast<double>(delta_) / Time::kMicrosecondsPerMillisecond;
++ return (delta_ < 0) ? -std::numeric_limits<double>::infinity()
++ : std::numeric_limits<double>::infinity();
++}
++
++constexpr int64_t TimeDelta::InMilliseconds() const {
++ if (!is_inf())
++ return delta_ / Time::kMicrosecondsPerMillisecond;
++ return (delta_ < 0) ? std::numeric_limits<int64_t>::min()
++ : std::numeric_limits<int64_t>::max();
++}
++
++constexpr int64_t TimeDelta::InMillisecondsRoundedUp() const {
++ if (!is_inf()) {
++ const int64_t result = delta_ / Time::kMicrosecondsPerMillisecond;
++ // Convert |result| from truncating to ceiling.
++ return (delta_ > result * Time::kMicrosecondsPerMillisecond) ? (result + 1)
++ : result;
++ }
++ return delta_;
++}
++
+ constexpr int64_t TimeDelta::InNanoseconds() const {
+ return base::ClampMul(delta_, Time::kNanosecondsPerMicrosecond);
+ }
+--
+2.34.1
+
diff --git a/www-client/chromium/files/chromium-100-SCTHashdanceMetadata-move.patch b/www-client/chromium/files/chromium-100-SCTHashdanceMetadata-move.patch
new file mode 100644
index 0000000..9039429
--- /dev/null
+++ b/www-client/chromium/files/chromium-100-SCTHashdanceMetadata-move.patch
@@ -0,0 +1,35 @@
+From 364dc0067d1c20c7a2d21277a7ec0c4419d9bc11 Mon Sep 17 00:00:00 2001
+From: Jose Dapena Paz <jdapena@igalia.com>
+Date: Wed, 23 Feb 2022 12:18:57 +0100
+Subject: [PATCH] GCC: explicitely move return value of SCTHashdanceMetadata::ToValue
+
+GCC rejects to do Return Value Optimization in
+SCTHashdanceMetadata::ToValue, because the copy constructor is
+deleted, and in that scenario RVO is rejected in GCC:
+ ../../services/network/sct_auditing/sct_auditing_reporter.cc: In member function ‘base::Value network::SCTAuditingReporter::SCTHashdanceMetadata::ToValue() const’:
+ ../../services/network/sct_auditing/sct_auditing_reporter.cc:191:10: error: use of deleted function ‘base::Value::Value(const base::Value&)’
+ 191 | return value;
+ | ^~~~~
+ In file included from ../../services/network/sct_auditing/sct_auditing_reporter.h:14,
+ from ../../services/network/sct_auditing/sct_auditing_reporter.cc:5:
+ ../../base/values.h:254:3: note: declared here
+ 254 | Value(const Value&) = delete;
+ | ^~~~~
+
+Bug: 819294
+Change-Id: I111e51dd10eee7b909d4ac3c0911aac18a589166
+---
+
+diff --git a/services/network/sct_auditing/sct_auditing_reporter.cc b/services/network/sct_auditing/sct_auditing_reporter.cc
+index a057e8e..365527b 100644
+--- a/services/network/sct_auditing/sct_auditing_reporter.cc
++++ b/services/network/sct_auditing/sct_auditing_reporter.cc
+@@ -188,7 +188,7 @@
+ kLogIdKey, base::Base64Encode(base::as_bytes(base::make_span(log_id))));
+ value.SetKey(kLogMMDKey, base::TimeDeltaToValue(log_mmd));
+ value.SetKey(kCertificateExpiry, base::TimeToValue(certificate_expiry));
+- return value;
++ return std::move(value);
+ }
+
+ // static
diff --git a/www-client/chromium/files/chromium-100-macro-typo.patch b/www-client/chromium/files/chromium-100-macro-typo.patch
new file mode 100644
index 0000000..833f869
--- /dev/null
+++ b/www-client/chromium/files/chromium-100-macro-typo.patch
@@ -0,0 +1,29 @@
+From 1183b14db8bd08d731ff3433c436887de00be3aa Mon Sep 17 00:00:00 2001
+From: Jose Dapena Paz <jdapena@igalia.com>
+Date: Fri, 18 Feb 2022 16:28:25 +0000
+Subject: [PATCH] Fix typo in non-clang GSL_OWNER macro
+
+GCC build fails because GSL_OWNER is not defined (GSL_OWNER_ was
+the one actually declared).
+
+Bug: 819294
+Change-Id: I1c3d17cb1c08b9bc0e8a888452da9868c308ddb5
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3472080
+Reviewed-by: Daniel Cheng <dcheng@chromium.org>
+Commit-Queue: Daniel Cheng <dcheng@chromium.org>
+Cr-Commit-Position: refs/heads/main@{#972974}
+---
+
+diff --git a/base/compiler_specific.h b/base/compiler_specific.h
+index eec5810..1ee8074 100644
+--- a/base/compiler_specific.h
++++ b/base/compiler_specific.h
+@@ -386,7 +386,7 @@
+ #define GSL_OWNER [[gsl::Owner]]
+ #define GSL_POINTER [[gsl::Pointer]]
+ #else
+-#define GSL_OWNER_
++#define GSL_OWNER
+ #define GSL_POINTER
+ #endif
+
diff --git a/www-client/chromium/files/chromium-100-sandbox-include.patch b/www-client/chromium/files/chromium-100-sandbox-include.patch
new file mode 100644
index 0000000..328d524
--- /dev/null
+++ b/www-client/chromium/files/chromium-100-sandbox-include.patch
@@ -0,0 +1,12 @@
+diff --git a/sandbox/linux/services/credentials.cc b/sandbox/linux/services/credentials.cc
+index c933eafd1..c0368e92b 100644
+--- a/sandbox/linux/services/credentials.cc
++++ b/sandbox/linux/services/credentials.cc
+@@ -11,6 +11,7 @@
+ #include <stddef.h>
+ #include <stdint.h>
+ #include <stdio.h>
++#include <string.h>
+ #include <sys/syscall.h>
+ #include <sys/types.h>
+ #include <sys/wait.h>