qt5-webengine

This commit is contained in:
Rmys
2026-02-18 17:31:02 +03:00
parent 3ed32d19cc
commit ad0ab21526
40 changed files with 548 additions and 40417 deletions
+14 -26
View File
@@ -10,47 +10,35 @@ from pisi.actionsapi import pisitools
from pisi.actionsapi import qt5
from pisi.actionsapi import get
def setup():
shelltools.cd("%s" % get.workDIR())
shelltools.move("qtwebengine-5*", "qt5-webengine-%s" % get.srcVERSION())
shelltools.cd("qt5-webengine-%s" % get.srcVERSION())
shelltools.move("../qtwebengine-chromium-87-based/ninja", "%s/qt5-webengine-5.15.16/src/3rdparty" % get.workDIR())
shelltools.move("../qtwebengine-chromium-87-based/gn", "%s/qt5-webengine-5.15.16/src/3rdparty" % get.workDIR())
shelltools.move("../qtwebengine-chromium-87-based/chromium", "%s/qt5-webengine-5.15.16/src/3rdparty" % get.workDIR())
shelltools.system("mkdir .git")
pisitools.dosed(".qmake.conf", "5.15.19", "5.15.16")
#shelltools.unlinkDir("src/3rdparty")
#shelltools.move("../qtwebengine-chromium-*", "src/3rdparty")
#shelltools.system("mkdir src/3rdparty/chromium/.git")
#shelltools.system("patch -p1 < qtwebengine-5.15.7-build_fixes-1.patch")
# shelltools.system("patch -p1 < qtwebengine-everywhere-src-5.15.5-TRUE.patch")
shelltools.system("sed -i 's/NINJAJOBS/NINJA_JOBS/' src/core/gn_run.pro")
#shelltools.copy("qtwebengine-release.sh", "%s/qtwebengine-release.sh" % get.workDIR())
#shelltools.cd("%s" % get.workDIR())
#shelltools.system("sh ./qtwebengine-release.sh")
#shelltools.cd("qtwebengine-everywhere-opensource-src-%s" % get.srcVERSION())
# Disable jumbo build https://bugreports.qt.io/browse/QTBUG-88657 gcc10
shelltools.system("sed -i 's|use_jumbo_build=true|use_jumbo_build=false|' -i src/buildtools/config/common.pri")
shelltools.system("sed -i '1i#include <stdint.h>' src/3rdparty/chromium/base/trace_event/trace_arguments.h")
shelltools.system("sed -i '1s/^/#include <stdint.h>\n/' src/3rdparty/chromium/cc/input/main_thread_scrolling_reason.h")
shelltools.system("sed -i '1i#include <stdint.h>' src/3rdparty/chromium/cc/input/main_thread_scrolling_reason.h")
shelltools.system("sed -i '1i#include <stdint.h>' src/3rdparty/chromium/cc/metrics/dropped_frame_counter.h")
shelltools.system("sed -i '1i#include <stdint.h>' src/3rdparty/chromium/cc/input/snap_selection_strategy.h")
shelltools.system("sed -i '1s/^/#include <stdint.h>\n/' src/3rdparty/chromium/cc/metrics/dropped_frame_counter.h")
shelltools.system("sed -i '1s/^/#include <stdint.h>\n/' src/3rdparty/chromium/cc/input/snap_selection_strategy.h")
#shelltools.system("sh ./qtwebengine-release.sh")
#shelltools.system("git submodule init")
#shelltools.system("git submodule update")
shelltools.makedirs("build")
shelltools.cd("build")
#shelltools.export("QT5LINK", "/usr/lib/qt5/bin")
#shelltools.export("QT5DIR", "/usr/lib/qt5")
#shelltools.export("CFLAGS", "%s -I/usr/lib/sqlite3.16.2" % get.CFLAGS())
#shelltools.system("qmake WEBENGINE_CONFIG+=use_proprietary_codecs WEBENGINE_CONFIG+=use_system_icu WEBENGINE_CONFIG+=use_system_protobuf WEBENGINE_CONFIG+=use_system_ffmpeg qtwebengine.pro")
#pisitools.ldflags.add("-Wl,--no-keep-memory ")
#shelltools.export("NINJAJOBS", "-j 4")
shelltools.system("qmake .. -- -proprietary-codecs \
-system-ffmpeg \
-system-webp \
@@ -1,32 +0,0 @@
https://build.opensuse.org/package/view_file/KDE:Qt:5.15/libqt5-qtwebengine/0001-skia-Some-includes-to-fix-build-with-GCC-12.patch?expand=1
https://bugs.gentoo.org/840326
From 68799a1e0815b20ca59ce354a55280399257a201 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fvogt@suse.de>
Date: Fri, 25 Mar 2022 15:29:28 +0100
Subject: [PATCH] skia: Some includes to fix build with GCC 12
Those includes got introduced upstream for other reasons and fixed building
with GCC 12 as a side effect.
--- a/src/3rdparty/chromium/third_party/skia/include/core/SkColor.h
+++ b/src/3rdparty/chromium/third_party/skia/include/core/SkColor.h
@@ -12,6 +12,8 @@
#include "include/core/SkScalar.h"
#include "include/core/SkTypes.h"
+#include <array>
+
/** \file SkColor.h
Types, consts, functions, and macros for colors.
--- a/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp
+++ b/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp
@@ -8,6 +8,8 @@
#include "include/utils/SkParse.h"
+#include <algorithm> // std::lower_bound
+
static constexpr const char* gColorNames[] = {
"aliceblue",
"antiquewhite",
@@ -0,0 +1,99 @@
diff --git a/chromium/build/config/compiler/BUILD.gn b/chromium/build/config/compiler/BUILD.gn
index b511a58c5a8..abd78a74ead 100644
--- a/chromium/build/config/compiler/BUILD.gn
+++ b/chromium/build/config/compiler/BUILD.gn
@@ -566,7 +566,7 @@ config("compiler") {
# Override Chromium's default for projects that wish to stay on C++11.
cflags_cc += [ "-std=${standard_prefix}++11" ]
} else {
- cflags_cc += [ "-std=${standard_prefix}++14" ]
+ cflags_cc += [ "-std=${standard_prefix}++17" ]
}
} else if (!is_win && !is_nacl) {
if (target_os == "android") {
diff --git a/chromium/base/allocator/partition_allocator/partition_alloc_constants.h b/chromium/base/allocator/partition_allocator/partition_alloc_constants.h
index f03ba1e4ab4..b1495f7ae74 100644
--- a/chromium/base/allocator/partition_allocator/partition_alloc_constants.h
+++ b/chromium/base/allocator/partition_allocator/partition_alloc_constants.h
@@ -195,7 +195,7 @@ NumPartitionPagesPerSuperPage() {
//
// __STDCPP_DEFAULT_NEW_ALIGNMENT__ is C++17. As such, it is not defined on all
// platforms, as Chrome's requirement is C++14 as of 2020.
-#if defined(__STDCPP_DEFAULT_NEW_ALIGNMENT__)
+#if 0
static constexpr size_t kAlignment =
std::max(alignof(std::max_align_t), __STDCPP_DEFAULT_NEW_ALIGNMENT__);
#else
diff --git a/chromium/third_party/webrtc/common_video/h264/sps_parser.h b/chromium/third_party/webrtc/common_video/h264/sps_parser.h
index 76e627d27a3..942435f44a0 100644
--- a/chromium/third_party/webrtc/common_video/h264/sps_parser.h
+++ b/chromium/third_party/webrtc/common_video/h264/sps_parser.h
@@ -12,6 +12,7 @@
#define COMMON_VIDEO_H264_SPS_PARSER_H_
#include "absl/types/optional.h"
+#include <cstdint>
namespace rtc {
class BitBuffer;
diff --git a/chromium/third_party/webrtc/common_video/h264/pps_parser.h b/chromium/third_party/webrtc/common_video/h264/pps_parser.h
index d6c31b06887..d8852dfd186 100644
--- a/chromium/third_party/webrtc/common_video/h264/pps_parser.h
+++ b/chromium/third_party/webrtc/common_video/h264/pps_parser.h
@@ -12,6 +12,7 @@
#define COMMON_VIDEO_H264_PPS_PARSER_H_
#include "absl/types/optional.h"
+#include <cstdint>
namespace rtc {
class BitBuffer;
diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h
index 3b9971abae1..d4458038527 100644
--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h
+++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h
@@ -13,6 +13,7 @@
#include <array>
#include <vector>
+#include <memory>
#include "absl/types/optional.h"
#include "api/array_view.h"
diff --git a/chromium/third_party/webrtc/modules/include/module_common_types_public.h b/chromium/third_party/webrtc/modules/include/module_common_types_public.h
index 345e45ce127..e686e5d691a 100644
--- a/chromium/third_party/webrtc/modules/include/module_common_types_public.h
+++ b/chromium/third_party/webrtc/modules/include/module_common_types_public.h
@@ -12,6 +12,7 @@
#define MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
#include <limits>
+#include <cstdint>
#include "absl/types/optional.h"
diff --git a/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc b/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc
index 8fcc799b795..bc69ddcf18c 100644
--- a/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc
+++ b/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc
@@ -15,6 +15,7 @@
#include "third_party/blink/renderer/core/page/scrolling/text_fragment_anchor_metrics.h"
#include "third_party/blink/renderer/core/page/scrolling/text_fragment_finder.h"
#include "third_party/blink/renderer/platform/text/text_boundaries.h"
+#include "absl/base/attributes.h"
namespace blink {
diff --git a/chromium/third_party/abseil-cpp/absl/base/options.h b/chromium/third_party/abseil-cpp/absl/base/options.h
index df506f0fae6..1de105fed4a 100644
--- a/chromium/third_party/abseil-cpp/absl/base/options.h
+++ b/chromium/third_party/abseil-cpp/absl/base/options.h
@@ -180,7 +180,7 @@
// absl::variant is a typedef of std::variant, use the feature macro
// ABSL_USES_STD_VARIANT.
-#define ABSL_OPTION_USE_STD_VARIANT 2
+#define ABSL_OPTION_USE_STD_VARIANT 0
// ABSL_OPTION_USE_INLINE_NAMESPACE
@@ -0,0 +1,290 @@
diff --git a/chromium/ppapi/utility/completion_callback_factory_thread_traits.h b/chromium/ppapi/utility/completion_callback_factory_thread_traits.h
index ac0b31a75..5d1c421d0 100644
--- a/chromium/ppapi/utility/completion_callback_factory_thread_traits.h
+++ b/chromium/ppapi/utility/completion_callback_factory_thread_traits.h
@@ -38,6 +38,10 @@ namespace pp {
/// As a further optimization, we can add support for this later.
class ThreadSafeThreadTraits {
public:
+
+ typedef pp::Lock Lock;
+ typedef pp::AutoLock AutoLock;
+
class RefCount {
public:
/// Default constructor. In debug mode, this checks that the object is being
@@ -67,8 +71,6 @@ class ThreadSafeThreadTraits {
int32_t ref_;
};
- typedef pp::Lock Lock;
- typedef pp::AutoLock AutoLock;
};
/// The non-thread-safe version of thread traits. Using this class as the
diff --git a/chromium/ui/events/gesture_event_details.h b/chromium/ui/events/gesture_event_details.h
index d20416738..8dadab3d0 100644
--- a/chromium/ui/events/gesture_event_details.h
+++ b/chromium/ui/events/gesture_event_details.h
@@ -5,6 +5,7 @@
#ifndef UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_
#define UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_
+#include <cstdint>
#include <string.h>
#include "base/check_op.h"
diff --git a/chromium/ui/gl/gl_surface_glx.cc b/chromium/ui/gl/gl_surface_glx.cc
index 1d5527691..ef9d5ce13 100644
--- a/chromium/ui/gl/gl_surface_glx.cc
+++ b/chromium/ui/gl/gl_surface_glx.cc
@@ -4,6 +4,7 @@
#include "ui/gl/gl_surface_glx.h"
+#include <cstdint>
#include <utility>
#include "base/bind.h"
diff --git a/chromium/ui/gl/gl_surface_glx.h b/chromium/ui/gl/gl_surface_glx.h
index ab612cd87..2178d8514 100644
--- a/chromium/ui/gl/gl_surface_glx.h
+++ b/chromium/ui/gl/gl_surface_glx.h
@@ -5,6 +5,7 @@
#ifndef UI_GL_GL_SURFACE_GLX_H_
#define UI_GL_GL_SURFACE_GLX_H_
+#include <cstdint>
#include <stdint.h>
#include <memory>
diff --git a/chromium/third_party/webrtc/api/task_queue/task_queue_base.h b/chromium/third_party/webrtc/api/task_queue/task_queue_base.h
index 90b1efd31..63526a738 100644
--- a/chromium/third_party/webrtc/api/task_queue/task_queue_base.h
+++ b/chromium/third_party/webrtc/api/task_queue/task_queue_base.h
@@ -10,6 +10,7 @@
#ifndef API_TASK_QUEUE_TASK_QUEUE_BASE_H_
#define API_TASK_QUEUE_TASK_QUEUE_BASE_H_
+#include <cstdint>
#include <memory>
#include "api/task_queue/queued_task.h"
diff --git a/chromium/third_party/perfetto/src/trace_processor/importers/gzip/gzip_utils.cc b/chromium/third_party/perfetto/src/trace_processor/importers/gzip/gzip_utils.cc
index 8a30c7f32..4934432cc 100644
--- a/chromium/third_party/perfetto/src/trace_processor/importers/gzip/gzip_utils.cc
+++ b/chromium/third_party/perfetto/src/trace_processor/importers/gzip/gzip_utils.cc
@@ -20,6 +20,8 @@
#include "perfetto/base/build_config.h"
#include "perfetto/base/compiler.h"
+#include <cstdint>
+
#if PERFETTO_BUILDFLAG(PERFETTO_ZLIB)
#include <zlib.h>
#else
diff --git a/chromium/third_party/perfetto/src/trace_processor/importers/gzip/gzip_utils.h b/chromium/third_party/perfetto/src/trace_processor/importers/gzip/gzip_utils.h
index 624363ff6..6d717fba4 100644
--- a/chromium/third_party/perfetto/src/trace_processor/importers/gzip/gzip_utils.h
+++ b/chromium/third_party/perfetto/src/trace_processor/importers/gzip/gzip_utils.h
@@ -17,6 +17,7 @@
#ifndef SRC_TRACE_PROCESSOR_IMPORTERS_GZIP_GZIP_UTILS_H_
#define SRC_TRACE_PROCESSOR_IMPORTERS_GZIP_GZIP_UTILS_H_
+#include <cstdint>
#include <memory>
struct z_stream_s;
diff --git a/chromium/third_party/perfetto/include/perfetto/ext/tracing/core/slice.h b/chromium/third_party/perfetto/include/perfetto/ext/tracing/core/slice.h
index 4ce66fdea..3f3932b22 100644
--- a/chromium/third_party/perfetto/include/perfetto/ext/tracing/core/slice.h
+++ b/chromium/third_party/perfetto/include/perfetto/ext/tracing/core/slice.h
@@ -20,6 +20,7 @@
#include <stddef.h>
#include <string.h>
+#include <cstdint>
#include <memory>
#include <string>
#include <vector>
diff --git a/chromium/third_party/perfetto/src/tracing/core/trace_packet.cc b/chromium/third_party/perfetto/src/tracing/core/trace_packet.cc
index 0dea150c1..c3def1683 100644
--- a/chromium/third_party/perfetto/src/tracing/core/trace_packet.cc
+++ b/chromium/third_party/perfetto/src/tracing/core/trace_packet.cc
@@ -19,6 +19,8 @@
#include "perfetto/base/logging.h"
#include "perfetto/protozero/proto_utils.h"
+#include <cstdint>
+
namespace perfetto {
TracePacket::TracePacket() = default;
diff --git a/chromium/third_party/perfetto/include/perfetto/tracing/tracing_backend.h b/chromium/third_party/perfetto/include/perfetto/tracing/tracing_backend.h
index 67b0d2eb5..3c2462de5 100644
--- a/chromium/third_party/perfetto/include/perfetto/tracing/tracing_backend.h
+++ b/chromium/third_party/perfetto/include/perfetto/tracing/tracing_backend.h
@@ -17,6 +17,7 @@
#ifndef INCLUDE_PERFETTO_TRACING_TRACING_BACKEND_H_
#define INCLUDE_PERFETTO_TRACING_TRACING_BACKEND_H_
+#include <cstdint>
#include <memory>
#include <string>
diff --git a/chromium/base/task/thread_pool.h b/chromium/base/task/thread_pool.h
index 085c249ba..afc674ca7 100644
--- a/chromium/base/task/thread_pool.h
+++ b/chromium/base/task/thread_pool.h
@@ -5,6 +5,7 @@
#ifndef BASE_TASK_THREAD_POOL_H_
#define BASE_TASK_THREAD_POOL_H_
+#include <cstdint>
#include <memory>
#include <utility>
diff --git a/chromium/net/tools/huffman_trie/trie_entry.h b/chromium/net/tools/huffman_trie/trie_entry.h
index fe70260f9..eac6a7fc2 100644
--- a/chromium/net/tools/huffman_trie/trie_entry.h
+++ b/chromium/net/tools/huffman_trie/trie_entry.h
@@ -5,6 +5,7 @@
#ifndef NET_TOOLS_HUFFMAN_TRIE_TRIE_ENTRY_H_
#define NET_TOOLS_HUFFMAN_TRIE_TRIE_ENTRY_H_
+#include <cstdint>
#include <memory>
#include <string>
#include <vector>
diff --git a/chromium/third_party/webrtc/api/fec_controller.h b/chromium/third_party/webrtc/api/fec_controller.h
index 3e5f7bb21..87777a53f 100644
--- a/chromium/third_party/webrtc/api/fec_controller.h
+++ b/chromium/third_party/webrtc/api/fec_controller.h
@@ -11,6 +11,7 @@
#ifndef API_FEC_CONTROLLER_H_
#define API_FEC_CONTROLLER_H_
+#include <cstdint>
#include <memory>
#include <vector>
diff --git a/chromium/third_party/webrtc/modules/video_coding/timestamp_map.h b/chromium/third_party/webrtc/modules/video_coding/timestamp_map.h
index c85666c9a..dfb90e447 100644
--- a/chromium/third_party/webrtc/modules/video_coding/timestamp_map.h
+++ b/chromium/third_party/webrtc/modules/video_coding/timestamp_map.h
@@ -11,6 +11,7 @@
#ifndef MODULES_VIDEO_CODING_TIMESTAMP_MAP_H_
#define MODULES_VIDEO_CODING_TIMESTAMP_MAP_H_
+#include <cstdint>
#include <memory>
namespace webrtc {
diff --git a/chromium/third_party/webrtc/api/network_state_predictor.h b/chromium/third_party/webrtc/api/network_state_predictor.h
index 9cf5ab6f0..2d165baa5 100644
--- a/chromium/third_party/webrtc/api/network_state_predictor.h
+++ b/chromium/third_party/webrtc/api/network_state_predictor.h
@@ -11,6 +11,7 @@
#ifndef API_NETWORK_STATE_PREDICTOR_H_
#define API_NETWORK_STATE_PREDICTOR_H_
+#include <cstdint>
#include <memory>
#include <vector>
diff --git a/chromium/gpu/command_buffer/common/skia_utils.h b/chromium/gpu/command_buffer/common/skia_utils.h
index 6508d79a1..a9f9528f1 100644
--- a/chromium/gpu/command_buffer/common/skia_utils.h
+++ b/chromium/gpu/command_buffer/common/skia_utils.h
@@ -5,6 +5,7 @@
#ifndef GPU_COMMAND_BUFFER_COMMON_SKIA_UTILS_H_
#define GPU_COMMAND_BUFFER_COMMON_SKIA_UTILS_H_
+#include <cstdint>
#include <memory>
#include "base/optional.h"
diff --git a/chromium/gpu/command_buffer/service/gpu_fence_manager.h b/chromium/gpu/command_buffer/service/gpu_fence_manager.h
index ee50d6fdd..576f6e3bc 100644
--- a/chromium/gpu/command_buffer/service/gpu_fence_manager.h
+++ b/chromium/gpu/command_buffer/service/gpu_fence_manager.h
@@ -5,6 +5,7 @@
#ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_FENCE_MANAGER_H_
#define GPU_COMMAND_BUFFER_SERVICE_GPU_FENCE_MANAGER_H_
+#include <cstdint>
#include <memory>
#include <vector>
diff --git a/chromium/third_party/pdfium/core/fpdfapi/page/cpdf_function.h b/chromium/third_party/pdfium/core/fpdfapi/page/cpdf_function.h
index fd68b6b49..dc7c015d5 100644
--- a/chromium/third_party/pdfium/core/fpdfapi/page/cpdf_function.h
+++ b/chromium/third_party/pdfium/core/fpdfapi/page/cpdf_function.h
@@ -7,6 +7,7 @@
#ifndef CORE_FPDFAPI_PAGE_CPDF_FUNCTION_H_
#define CORE_FPDFAPI_PAGE_CPDF_FUNCTION_H_
+#include <cstdint>
#include <memory>
#include <set>
#include <vector>
diff --git a/chromium/third_party/pdfium/core/fxcodec/jbig2/JBig2_DocumentContext.h b/chromium/third_party/pdfium/core/fxcodec/jbig2/JBig2_DocumentContext.h
index 9bcdd371e..5921794f1 100644
--- a/chromium/third_party/pdfium/core/fxcodec/jbig2/JBig2_DocumentContext.h
+++ b/chromium/third_party/pdfium/core/fxcodec/jbig2/JBig2_DocumentContext.h
@@ -7,6 +7,7 @@
#ifndef CORE_FXCODEC_JBIG2_JBIG2_DOCUMENTCONTEXT_H_
#define CORE_FXCODEC_JBIG2_JBIG2_DOCUMENTCONTEXT_H_
+#include <cstdint>
#include <list>
#include <memory>
#include <utility>
diff --git a/chromium/third_party/pdfium/third_party/base/span.h b/chromium/third_party/pdfium/third_party/base/span.h
index bb07f43a0..0b7daf775 100644
--- a/chromium/third_party/pdfium/third_party/base/span.h
+++ b/chromium/third_party/pdfium/third_party/base/span.h
@@ -9,6 +9,7 @@
#include <algorithm>
#include <array>
+#include <cstdint>
#include <iterator>
#include <type_traits>
#include <utility>
diff --git a/chromium/third_party/webrtc/video/stats_counter.h b/chromium/third_party/webrtc/video/stats_counter.h
index fb6017f41..ed5530ca0 100644
--- a/chromium/third_party/webrtc/video/stats_counter.h
+++ b/chromium/third_party/webrtc/video/stats_counter.h
@@ -11,6 +11,7 @@
#ifndef VIDEO_STATS_COUNTER_H_
#define VIDEO_STATS_COUNTER_H_
+#include <cstdint>
#include <memory>
#include <string>
diff --git a/chromium/third_party/woff2/include/woff2/output.h b/chromium/third_party/woff2/include/woff2/output.h
index c325f67be..5c4dc4d18 100644
--- a/chromium/third_party/woff2/include/woff2/output.h
+++ b/chromium/third_party/woff2/include/woff2/output.h
@@ -10,6 +10,7 @@
#define WOFF2_WOFF2_OUT_H_
#include <algorithm>
+#include <cstdint>
#include <cstring>
#include <memory>
#include <string>
diff --git a/chromium/cc/input/main_thread_scrolling_reason.h b/chromium/cc/input/main_thread_scrolling_reason.h
index 4ddd536afcc..dc1bc072790 100644
--- a/chromium/cc/input/main_thread_scrolling_reason.h
+++ b/chromium/cc/input/main_thread_scrolling_reason.h
@@ -7,6 +7,7 @@
#include <memory>
#include <string>
+#include <cstdint>
#include "cc/cc_export.h"
namespace base {
@@ -0,0 +1,58 @@
Patch-Source: https://sources.debian.org/data/main/q/qtwebengine-opensource-src/5.15.16+dfsg-3/debian/patches/python3.12-six.patch
--
Description: implement find_spec() for _SixMetaPathImporter
Origin: upstream, https://github.com/benjaminp/six/commit/25916292d96f5f09
Last-Update: 2024-03-17
--- a/chromium/third_party/protobuf/third_party/six/six.py
+++ b/chromium/third_party/protobuf/third_party/six/six.py
@@ -71,6 +71,11 @@ else:
MAXSIZE = int((1 << 63) - 1)
del X
+if PY34:
+ from importlib.util import spec_from_loader
+else:
+ spec_from_loader = None
+
def _add_doc(func, doc):
"""Add documentation to a function."""
@@ -186,6 +191,11 @@ class _SixMetaPathImporter(object):
return self
return None
+ def find_spec(self, fullname, path, target=None):
+ if fullname in self.known_modules:
+ return spec_from_loader(fullname, self)
+ return None
+
def __get_module(self, fullname):
try:
return self.known_modules[fullname]
--- a/chromium/tools/grit/third_party/six/__init__.py
+++ b/chromium/tools/grit/third_party/six/__init__.py
@@ -71,6 +71,11 @@ else:
MAXSIZE = int((1 << 63) - 1)
del X
+if PY34:
+ from importlib.util import spec_from_loader
+else:
+ spec_from_loader = None
+
def _add_doc(func, doc):
"""Add documentation to a function."""
@@ -186,6 +191,11 @@ class _SixMetaPathImporter(object):
return self
return None
+ def find_spec(self, fullname, path, target=None):
+ if fullname in self.known_modules:
+ return spec_from_loader(fullname, self)
+ return None
+
def __get_module(self, fullname):
try:
return self.known_modules[fullname]
@@ -0,0 +1,79 @@
https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/uchar_8h_source.html
https://github.com/unicode-org/icu/blame/main/icu4c/source/common/unicode/uchar.h
/usr/include/unicode/uchar.h
ICU78 adds LineBreak U_LB_UNAMBIGUOUS_HYPHEN = 48,/*[HH]*/.
U_LB_COUNT goes from 48 to 49.
kBreakAllLineBreakClassTable is expected to be square with
the same number of bits across as the lines down for every
U_LB_COUNT LineBreak. This table should have U_LB_COUNT=49
bit columns and 49 rows with a bunch of 1 bits sprinkled
all over and should expand each time a new LineBreak is
added. Rather than fiddling with the BA_LB_COUNT math or
keep extending the table with zeros across and down as they
did here:
https://src.opensuse.org/nodejs/nodejs-electron/src/commit/ee8e43b84d0e17b17d817943357e74dee3e5474ae7e6eaff93c60926bfc3780a/text_break_iterator-icu74-breakAllLineBreakClassTable-should-be-consistent.patch
we just hard set the table to 40 lines to support 0XX-39RI.
ShouldBreakAfterBreakAll for LineBreak >= 40EB always
return 0/false which is what the recent table patches were
doing anyways. Look at the columns RI to VI and lines
[RI]-[VI]. It's all zeros so everyone gave up extending
this table with cleverly placed 1's years ago and just came
up with Whatever Works (TM) patches. LineBreak support >=
39RI running with 0 may be less than optimal. Here's
another patch.
https://bugs.gentoo.org/917635
The original table code and patches since are all garbage
anyways. Noone seems to understand what this table does. I
don't either but I do know its limits and proper shape and
that it's not required to have lines and columns added for
each new LineBreak unless you want perfect support for new
LineBreak.
The NodeJS patch adds a 6th array column which won't
compile on earlier ICU versions where U_LB_COUNT is small.
static const unsigned char kBreakAllLineBreakClassTable[][BA_LB_COUNT / 8 + 1] = {
This line is written wrong. It creates an extra byte
column when BA_LB_COUNT is divisible by 8. Our example of
40 LineBreak can be stored in 40/8=5 column bytes yet this
sets the column count to 40/8+1=6. This would be correct
though with the size of this code I don't see a problem
allocating 40 extra bytes.
static const unsigned char kBreakAllLineBreakClassTable[][(BA_LB_COUNT-1) / 8 + 1] = {
severach@aur
https://aur.archlinux.org/packages/qt5-webengine
$ notepadqq
Cannot mix incompatible Qt library (5.15.17) with this library (5.15.18)
If you have trouble with an application not working, look
through this list for packages with old versions.
pacman -Qs qt5-
local/qt5-base 5.15.18+kde+r109-2 (qt5)
* A cross-platform application and UI framework
local/qt5-webchannel 5.15.17+kde+r3-1 (qt5)
* Provides access to QObject or QML objects from HTML clients for seamless integration of Qt applications with HTML/JavaScript clients
diff -pNaru3 a/chromium/third_party/blink/renderer/platform/text/text_break_iterator.cc b/chromium/third_party/blink/renderer/platform/text/text_break_iterator.cc
--- a/chromium/third_party/blink/renderer/platform/text/text_break_iterator.cc 2025-11-11 01:42:16.454081862 -0500
+++ b/chromium/third_party/blink/renderer/platform/text/text_break_iterator.cc 2025-11-11 01:49:41.838185933 -0500
@@ -163,7 +163,7 @@ static const unsigned char kAsciiLineBre
// clang-format on
#if U_ICU_VERSION_MAJOR_NUM >= 74
-#define BA_LB_COUNT (U_LB_COUNT - 8)
+#define BA_LB_COUNT (40) /* (U_LB_COUNT - 8) */
#elif U_ICU_VERSION_MAJOR_NUM >= 58
#define BA_LB_COUNT (U_LB_COUNT - 3)
#else
@@ -1,12 +0,0 @@
diff -up qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/angle/src/common/utilities.cpp.nullptr qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/angle/src/common/utilities.cpp
--- qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/angle/src/common/utilities.cpp.nullptr 2021-12-15 10:09:27.000000000 -0600
+++ qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/angle/src/common/utilities.cpp 2022-01-19 08:52:02.659577615 -0600
@@ -254,7 +254,7 @@ std::string GetGLSLTypeString(GLenum typ
return "mat4";
default:
UNREACHABLE();
- return nullptr;
+ return "";
}
}
@@ -1,12 +0,0 @@
diff -up qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/hunspell/src/hunspell/hunspell.cxx.nullptr qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/hunspell/src/hunspell/hunspell.cxx
--- qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/hunspell/src/hunspell/hunspell.cxx.nullptr 2021-12-15 10:09:27.000000000 -0600
+++ qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/hunspell/src/hunspell/hunspell.cxx 2022-01-19 10:30:40.845051982 -0600
@@ -1725,7 +1725,7 @@ std::string HunspellImpl::get_xml_par(co
if (end == '>')
end = '<';
else if (end != '\'' && end != '"')
- return 0; // bad XML
+ return dest; // bad XML
for (par++; *par != '\0' && *par != end; ++par) {
dest.push_back(*par);
}
@@ -1,10 +0,0 @@
--- ./src/3rdparty/chromium/qtwebengine/browser/pdf/BUILD.gn.orig 2024-07-03 13:49:13.812285886 +0100
+++ ./src/3rdparty/chromium/qtwebengine/browser/pdf/BUILD.gn 2024-07-03 13:51:45.789966941 +0100
@@ -6,6 +6,7 @@ source_set("pdf") {
]
deps = [
+ "//chrome/app:generated_resources",
"//content/public/browser",
]
}
@@ -1,45 +0,0 @@
Avoid calls to the undeclared strlcpy function in libsync. This
prevents a build failure with future compilers.
Submitted upstream: <https://bugreports.qt.io/browse/QTBUG-111440>
diff -up qtwebengine-everywhere-src-5.15.12/src/3rdparty/chromium/third_party/libsync/BUILD.gn.c99 qtwebengine-everywhere-src-5.15.12/src/3rdparty/chromium/third_party/libsync/BUILD.gn
--- qtwebengine-everywhere-src-5.15.12/src/3rdparty/chromium/third_party/libsync/BUILD.gn.c99 2023-02-23 10:54:15.909380015 +0100
+++ qtwebengine-everywhere-src-5.15.12/src/3rdparty/chromium/third_party/libsync/BUILD.gn 2023-02-23 11:00:32.019601795 +0100
@@ -21,24 +21,15 @@ if (!use_system_libsync) {
]
}
- config("libsync_private_config") {
- # To suppress the warning caused by strlcpy.
- cflags = [ "-Wno-implicit-function-declaration" ]
- }
-
source_set("libsync") {
sources = [
"src/include/sync/sync.h",
"src/sw_sync.h",
"src/sync.c",
- "strlcpy.c",
]
configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [
- "//build/config/compiler:no_chromium_code",
- ":libsync_private_config",
- ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
public_configs = [ ":libsync_config" ]
}
diff -up qtwebengine-everywhere-src-5.15.12/src/3rdparty/chromium/third_party/libsync/src/sync.c.c99 qtwebengine-everywhere-src-5.15.12/src/3rdparty/chromium/third_party/libsync/src/sync.c
--- qtwebengine-everywhere-src-5.15.12/src/3rdparty/chromium/third_party/libsync/src/sync.c.c99 2023-02-23 10:54:30.650231820 +0100
+++ qtwebengine-everywhere-src-5.15.12/src/3rdparty/chromium/third_party/libsync/src/sync.c 2023-02-23 10:54:50.116036131 +0100
@@ -29,6 +29,7 @@
#include <sync/sync.h>
+#include "../strlcpy.c"
struct sw_sync_create_fence_data {
__u32 value;
@@ -1,493 +0,0 @@
From 6e554a30893150793c2638e3689cf208ffc8e375 Mon Sep 17 00:00:00 2001
From: Dale Curtis <dalecurtis@chromium.org>
Date: Sat, 2 Apr 2022 05:13:53 +0000
Subject: [PATCH] Roll src/third_party/ffmpeg/ 574c39cce..32b2d1d526 (1125
commits)
https://chromium.googlesource.com/chromium/third_party/ffmpeg.git/+log/574c39cce323..32b2d1d526
Created with:
roll-dep src/third_party/ffmpeg
Fixed: 1293918
Cq-Include-Trybots: luci.chromium.try:mac_chromium_asan_rel_ng,linux_chromium_asan_rel_ng,linux_chromium_chromeos_asan_rel_ng
Change-Id: I41945d0f963e3d1f65940067bac22f63b68e37d2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3565647
Auto-Submit: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#988253}
---
.../clear_key_cdm/ffmpeg_cdm_audio_decoder.cc | 29 ++++++++++---------
media/ffmpeg/ffmpeg_common.cc | 11 +++----
media/filters/audio_file_reader.cc | 9 +++---
media/filters/audio_file_reader_unittest.cc | 6 ++--
.../filters/audio_video_metadata_extractor.cc | 11 +++++--
.../filters/ffmpeg_aac_bitstream_converter.cc | 7 +++--
...ffmpeg_aac_bitstream_converter_unittest.cc | 2 +-
media/filters/ffmpeg_audio_decoder.cc | 13 +++++----
8 files changed, 51 insertions(+), 37 deletions(-)
diff --git a/src/3rdparty/chromium/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc b/src/3rdparty/chromium/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc
index a043005..9ae2ca9 100644
--- a/src/3rdparty/chromium/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc
+++ b/src/3rdparty/chromium/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc
@@ -73,7 +73,7 @@ void CdmAudioDecoderConfigToAVCodecContext(
codec_context->sample_fmt = AV_SAMPLE_FMT_NONE;
}
- codec_context->channels = config.channel_count;
+ codec_context->ch_layout.nb_channels = config.channel_count;
codec_context->sample_rate = config.samples_per_second;
if (config.extra_data) {
@@ -123,8 +123,8 @@ void CopySamples(cdm::AudioFormat cdm_format,
case cdm::kAudioFormatPlanarS16:
case cdm::kAudioFormatPlanarF32: {
const int decoded_size_per_channel =
- decoded_audio_size / av_frame.channels;
- for (int i = 0; i < av_frame.channels; ++i) {
+ decoded_audio_size / av_frame.ch_layout.nb_channels;
+ for (int i = 0; i < av_frame.ch_layout.nb_channels; ++i) {
memcpy(output_buffer, av_frame.extended_data[i],
decoded_size_per_channel);
output_buffer += decoded_size_per_channel;
@@ -184,13 +184,14 @@ bool FFmpegCdmAudioDecoder::Initialize(
// Success!
decoding_loop_.reset(new FFmpegDecodingLoop(codec_context_.get()));
samples_per_second_ = config.samples_per_second;
- bytes_per_frame_ = codec_context_->channels * config.bits_per_channel / 8;
+ bytes_per_frame_ =
+ codec_context_->ch_layout.nb_channels * config.bits_per_channel / 8;
output_timestamp_helper_.reset(
new AudioTimestampHelper(config.samples_per_second));
is_initialized_ = true;
// Store initial values to guard against midstream configuration changes.
- channels_ = codec_context_->channels;
+ channels_ = codec_context_->ch_layout.nb_channels;
av_sample_format_ = codec_context_->sample_fmt;
return true;
@@ -290,17 +291,18 @@ cdm::Status FFmpegCdmAudioDecoder::DecodeBuffer(
for (auto& frame : audio_frames) {
int decoded_audio_size = 0;
if (frame->sample_rate != samples_per_second_ ||
- frame->channels != channels_ || frame->format != av_sample_format_) {
+ frame->ch_layout.nb_channels != channels_ ||
+ frame->format != av_sample_format_) {
DLOG(ERROR) << "Unsupported midstream configuration change!"
<< " Sample Rate: " << frame->sample_rate << " vs "
- << samples_per_second_ << ", Channels: " << frame->channels
+ << samples_per_second_ << ", Channels: " << frame->ch_layout.nb_channels
<< " vs " << channels_ << ", Sample Format: " << frame->format
<< " vs " << av_sample_format_;
return cdm::kDecodeError;
}
decoded_audio_size = av_samples_get_buffer_size(
- nullptr, codec_context_->channels, frame->nb_samples,
+ nullptr, codec_context_->ch_layout.nb_channels, frame->nb_samples,
codec_context_->sample_fmt, 1);
if (!decoded_audio_size)
continue;
@@ -319,7 +321,7 @@ bool FFmpegCdmAudioDecoder::OnNewFrame(
size_t* total_size,
std::vector<std::unique_ptr<AVFrame, ScopedPtrAVFreeFrame>>* audio_frames,
AVFrame* frame) {
- *total_size += av_samples_get_buffer_size(nullptr, codec_context_->channels,
+ *total_size += av_samples_get_buffer_size(nullptr, codec_context_->ch_layout.nb_channels,
frame->nb_samples,
codec_context_->sample_fmt, 1);
audio_frames->emplace_back(av_frame_clone(frame));
diff --git a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc
index c17dd9f..0448cb5 100644
--- a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc
+++ b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc
@@ -341,10 +341,11 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context,
codec_context->sample_fmt, codec_context->codec_id);
ChannelLayout channel_layout =
- codec_context->channels > 8
+ codec_context->ch_layout.nb_channels > 8
? CHANNEL_LAYOUT_DISCRETE
- : ChannelLayoutToChromeChannelLayout(codec_context->channel_layout,
- codec_context->channels);
+ : ChannelLayoutToChromeChannelLayout(
+ codec_context->ch_layout.u.mask,
+ codec_context->ch_layout.nb_channels);
int sample_rate = codec_context->sample_rate;
switch (codec) {
@@ -397,7 +398,7 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context,
extra_data, encryption_scheme, seek_preroll,
codec_context->delay);
if (channel_layout == CHANNEL_LAYOUT_DISCRETE)
- config->SetChannelsForDiscrete(codec_context->channels);
+ config->SetChannelsForDiscrete(codec_context->ch_layout.nb_channels);
#if BUILDFLAG(ENABLE_PLATFORM_AC3_EAC3_AUDIO)
// These are bitstream formats unknown to ffmpeg, so they don't have
@@ -462,7 +463,7 @@ void AudioDecoderConfigToAVCodecContext(const AudioDecoderConfig& config,
// TODO(scherkus): should we set |channel_layout|? I'm not sure if FFmpeg uses
// said information to decode.
- codec_context->channels = config.channels();
+ codec_context->ch_layout.nb_channels = config.channels();
codec_context->sample_rate = config.samples_per_second();
if (config.extra_data().empty()) {
diff --git a/src/3rdparty/chromium/media/filters/audio_file_reader.cc b/src/3rdparty/chromium/media/filters/audio_file_reader.cc
index bd73908..745c4c7 100644
--- a/src/3rdparty/chromium/media/filters/audio_file_reader.cc
+++ b/src/3rdparty/chromium/media/filters/audio_file_reader.cc
@@ -112,14 +112,15 @@ bool AudioFileReader::OpenDecoder() {
// Verify the channel layout is supported by Chrome. Acts as a sanity check
// against invalid files. See http://crbug.com/171962
- if (ChannelLayoutToChromeChannelLayout(codec_context_->channel_layout,
- codec_context_->channels) ==
+ if (ChannelLayoutToChromeChannelLayout(
+ codec_context_->ch_layout.u.mask,
+ codec_context_->ch_layout.nb_channels) ==
CHANNEL_LAYOUT_UNSUPPORTED) {
return false;
}
// Store initial values to guard against midstream configuration changes.
- channels_ = codec_context_->channels;
+ channels_ = codec_context_->ch_layout.nb_channels;
audio_codec_ = CodecIDToAudioCodec(codec_context_->codec_id);
sample_rate_ = codec_context_->sample_rate;
av_sample_format_ = codec_context_->sample_fmt;
@@ -222,7 +223,7 @@ bool AudioFileReader::OnNewFrame(
if (frames_read < 0)
return false;
- const int channels = frame->channels;
+ const int channels = frame->ch_layout.nb_channels;
if (frame->sample_rate != sample_rate_ || channels != channels_ ||
frame->format != av_sample_format_) {
DLOG(ERROR) << "Unsupported midstream configuration change!"
diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter.cc b/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter.cc
index 6f231c8..ca5e5fb 100644
--- a/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter.cc
+++ b/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter.cc
@@ -195,14 +195,15 @@ bool FFmpegAACBitstreamConverter::ConvertPacket(AVPacket* packet) {
if (!header_generated_ || codec_ != stream_codec_parameters_->codec_id ||
audio_profile_ != stream_codec_parameters_->profile ||
sample_rate_index_ != sample_rate_index ||
- channel_configuration_ != stream_codec_parameters_->channels ||
+ channel_configuration_ !=
+ stream_codec_parameters_->ch_layout.nb_channels ||
frame_length_ != header_plus_packet_size) {
header_generated_ =
GenerateAdtsHeader(stream_codec_parameters_->codec_id,
0, // layer
stream_codec_parameters_->profile, sample_rate_index,
0, // private stream
- stream_codec_parameters_->channels,
+ stream_codec_parameters_->ch_layout.nb_channels,
0, // originality
0, // home
0, // copyrighted_stream
@@ -214,7 +215,7 @@ bool FFmpegAACBitstreamConverter::ConvertPacket(AVPacket* packet) {
codec_ = stream_codec_parameters_->codec_id;
audio_profile_ = stream_codec_parameters_->profile;
sample_rate_index_ = sample_rate_index;
- channel_configuration_ = stream_codec_parameters_->channels;
+ channel_configuration_ = stream_codec_parameters_->ch_layout.nb_channels;
frame_length_ = header_plus_packet_size;
}
diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc b/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc
index ac8bb13..3e4e3f6 100644
--- a/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc
+++ b/src/3rdparty/chromium/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc
@@ -29,7 +29,7 @@ class FFmpegAACBitstreamConverterTest : public testing::Test {
memset(&test_parameters_, 0, sizeof(AVCodecParameters));
test_parameters_.codec_id = AV_CODEC_ID_AAC;
test_parameters_.profile = FF_PROFILE_AAC_MAIN;
- test_parameters_.channels = 2;
+ test_parameters_.ch_layout.nb_channels = 2;
test_parameters_.extradata = extradata_header_;
test_parameters_.extradata_size = sizeof(extradata_header_);
}
diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc b/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc
index 72fac61..ab49fd5 100644
--- a/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc
+++ b/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc
@@ -27,7 +27,7 @@ namespace media {
// Return the number of channels from the data in |frame|.
static inline int DetermineChannels(AVFrame* frame) {
- return frame->channels;
+ return frame->ch_layout.nb_channels;
}
// Called by FFmpeg's allocation routine to allocate a buffer. Uses
@@ -227,7 +227,7 @@ bool FFmpegAudioDecoder::OnNewFrame(const DecoderBuffer& buffer,
// Translate unsupported into discrete layouts for discrete configurations;
// ffmpeg does not have a labeled discrete configuration internally.
ChannelLayout channel_layout = ChannelLayoutToChromeChannelLayout(
- codec_context_->channel_layout, codec_context_->channels);
+ codec_context_->ch_layout.u.mask, codec_context_->ch_layout.nb_channels);
if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED &&
config_.channel_layout() == CHANNEL_LAYOUT_DISCRETE) {
channel_layout = CHANNEL_LAYOUT_DISCRETE;
@@ -344,11 +344,11 @@ bool FFmpegAudioDecoder::ConfigureDecoder(const AudioDecoderConfig& config) {
// Success!
av_sample_format_ = codec_context_->sample_fmt;
- if (codec_context_->channels != config.channels()) {
+ if (codec_context_->ch_layout.nb_channels != config.channels()) {
MEDIA_LOG(ERROR, media_log_)
<< "Audio configuration specified " << config.channels()
<< " channels, but FFmpeg thinks the file contains "
- << codec_context_->channels << " channels";
+ << codec_context_->ch_layout.nb_channels << " channels";
ReleaseFFmpegResources();
state_ = kUninitialized;
return false;
@@ -398,7 +398,7 @@ int FFmpegAudioDecoder::GetAudioBuffer(struct AVCodecContext* s,
if (frame->nb_samples <= 0)
return AVERROR(EINVAL);
- if (s->channels != channels) {
+ if (s->ch_layout.nb_channels != channels) {
DLOG(ERROR) << "AVCodecContext and AVFrame disagree on channel count.";
return AVERROR(EINVAL);
}
@@ -431,7 +431,8 @@ int FFmpegAudioDecoder::GetAudioBuffer(struct AVCodecContext* s,
ChannelLayout channel_layout =
config_.channel_layout() == CHANNEL_LAYOUT_DISCRETE
? CHANNEL_LAYOUT_DISCRETE
- : ChannelLayoutToChromeChannelLayout(s->channel_layout, s->channels);
+ : ChannelLayoutToChromeChannelLayout(s->ch_layout.u.mask,
+ s->ch_layout.nb_channels);
if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED) {
DLOG(ERROR) << "Unsupported channel layout.";
commit 62274859104bd828373ae406aa9309e610449ac5
Author: Ted Meyer <tmathmeyer@chromium.org>
Date: Fri Mar 22 19:56:55 2024 +0000
Replace deprecated use of AVCodecContext::reordered_opaque
We can use the AV_CODEC_FLAG_COPY_OPAQUE flag on the codec context
now to trigger timestamp propagation.
Bug: 330573128
Change-Id: I6bc57241a35ab5283742aad8d42acb4dc5e85858
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5384308
Commit-Queue: Ted (Chromium) Meyer <tmathmeyer@chromium.org>
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1277051}
diff --git a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc
index 0448cb5..89e9cf9 100644
--- a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc
+++ b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc
@@ -414,7 +414,9 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context,
#if BUILDFLAG(USE_PROPRIETARY_CODECS)
// TODO(dalecurtis): Just use the profile from the codec context if ffmpeg
// ever starts supporting xHE-AAC.
- if (codec == kCodecAAC && codec_context->profile == FF_PROFILE_UNKNOWN) {
+ constexpr uint8_t kXHEAAc = 41;
+ if (codec == kCodecAAC && codec_context->profile == FF_PROFILE_UNKNOWN ||
+ codec_context->profile == kXHEAAc) {
// Errors aren't fatal here, so just drop any MediaLog messages.
NullMediaLog media_log;
mp4::AAC aac_parser;
diff --git a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_regression_tests.cc b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_regression_tests.cc
index ebd1bab..04d5ecc 100644
--- a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_regression_tests.cc
+++ b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_regression_tests.cc
@@ -86,16 +86,16 @@ FFMPEG_TEST_CASE(Cr47761, "crbug47761.ogg", PIPELINE_OK, PIPELINE_OK);
FFMPEG_TEST_CASE(Cr50045, "crbug50045.mp4", PIPELINE_OK, PIPELINE_OK);
FFMPEG_TEST_CASE(Cr62127, "crbug62127.webm", PIPELINE_OK, PIPELINE_OK);
FFMPEG_TEST_CASE(Cr93620, "security/93620.ogg", PIPELINE_OK, PIPELINE_OK);
-FFMPEG_TEST_CASE(Cr100492,
- "security/100492.webm",
- DECODER_ERROR_NOT_SUPPORTED,
- DECODER_ERROR_NOT_SUPPORTED);
+FFMPEG_TEST_CASE(Cr100492, "security/100492.webm", PIPELINE_OK, PIPELINE_OK);
FFMPEG_TEST_CASE(Cr100543, "security/100543.webm", PIPELINE_OK, PIPELINE_OK);
FFMPEG_TEST_CASE(Cr101458,
"security/101458.webm",
PIPELINE_ERROR_DECODE,
PIPELINE_ERROR_DECODE);
-FFMPEG_TEST_CASE(Cr108416, "security/108416.webm", PIPELINE_OK, PIPELINE_OK);
+FFMPEG_TEST_CASE(Cr108416,
+ "security/108416.webm",
+ PIPELINE_ERROR_DECODE,
+ PIPELINE_ERROR_DECODE);
FFMPEG_TEST_CASE(Cr110849,
"security/110849.mkv",
DEMUXER_ERROR_COULD_NOT_OPEN,
@@ -150,7 +150,10 @@ FFMPEG_TEST_CASE(Cr234630b,
"security/234630b.mov",
DEMUXER_ERROR_NO_SUPPORTED_STREAMS,
DEMUXER_ERROR_NO_SUPPORTED_STREAMS);
-FFMPEG_TEST_CASE(Cr242786, "security/242786.webm", PIPELINE_OK, PIPELINE_OK);
+FFMPEG_TEST_CASE(Cr242786,
+ "security/242786.webm",
+ PIPELINE_OK,
+ PIPELINE_ERROR_DECODE);
// Test for out-of-bounds access with slightly corrupt file (detection logic
// thinks it's a MONO file, but actually contains STEREO audio).
FFMPEG_TEST_CASE(Cr275590,
@@ -371,8 +374,8 @@ FFMPEG_TEST_CASE(WEBM_2,
DEMUXER_ERROR_NO_SUPPORTED_STREAMS);
FFMPEG_TEST_CASE(WEBM_4,
"security/out.webm.68798.1929",
- DECODER_ERROR_NOT_SUPPORTED,
- DECODER_ERROR_NOT_SUPPORTED);
+ PIPELINE_OK,
+ PIPELINE_OK);
FFMPEG_TEST_CASE(WEBM_5, "frame_size_change.webm", PIPELINE_OK, PIPELINE_OK);
// General MKV test cases.
diff --git a/src/3rdparty/chromium/media/filters/audio_file_reader.cc b/src/3rdparty/chromium/media/filters/audio_file_reader.cc
index 745c4c7..2b3abba 100644
--- a/src/3rdparty/chromium/media/filters/audio_file_reader.cc
+++ b/src/3rdparty/chromium/media/filters/audio_file_reader.cc
@@ -242,10 +242,10 @@ bool AudioFileReader::OnNewFrame(
// silence from being output. In the case where we are also discarding some
// portion of the packet (as indicated by a negative pts), we further want to
// adjust the duration downward by however much exists before zero.
- if (audio_codec_ == kCodecAAC && frame->pkt_duration) {
+ if (audio_codec_ == kCodecAAC && frame->duration) {
const base::TimeDelta pkt_duration = ConvertFromTimeBase(
glue_->format_context()->streams[stream_index_]->time_base,
- frame->pkt_duration + std::min(static_cast<int64_t>(0), frame->pts));
+ frame->duration + std::min(static_cast<int64_t>(0), frame->pts));
const base::TimeDelta frame_duration = base::TimeDelta::FromSecondsD(
frames_read / static_cast<double>(sample_rate_));
diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc
index 7996606..a15aafc 100644
--- a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc
+++ b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc
@@ -86,7 +86,7 @@ bool FFmpegVideoDecoder::IsCodecSupported(VideoCodec codec) {
}
FFmpegVideoDecoder::FFmpegVideoDecoder(MediaLog* media_log)
- : media_log_(media_log), state_(kUninitialized), decode_nalus_(false) {
+ : media_log_(media_log), state_(kUninitialized), decode_nalus_(false), timestamp_map_(128) {
DVLOG(1) << __func__;
thread_checker_.DetachFromThread();
}
@@ -183,7 +183,6 @@ int FFmpegVideoDecoder::GetVideoBuffer(struct AVCodecContext* codec_context,
frame->width = coded_size.width();
frame->height = coded_size.height();
frame->format = codec_context->pix_fmt;
- frame->reordered_opaque = codec_context->reordered_opaque;
// Now create an AVBufferRef for the data just allocated. It will own the
// reference to the VideoFrame object.
@@ -318,8 +317,10 @@ bool FFmpegVideoDecoder::FFmpegDecode(const DecoderBuffer& buffer) {
DCHECK(packet.data);
DCHECK_GT(packet.size, 0);
- // Let FFmpeg handle presentation timestamp reordering.
- codec_context_->reordered_opaque = buffer.timestamp().InMicroseconds();
+ const int64_t timestamp = buffer.timestamp().InMicroseconds();
+ const TimestampId timestamp_id = timestamp_id_generator_.GenerateNextId();
+ timestamp_map_.Put(timestamp_id, timestamp);
+ packet.opaque = reinterpret_cast<void*>(timestamp_id.GetUnsafeValue());
}
switch (decoding_loop_->DecodePacket(
@@ -358,8 +359,13 @@ bool FFmpegVideoDecoder::OnNewFrame(AVFrame* frame) {
scoped_refptr<VideoFrame> video_frame =
reinterpret_cast<VideoFrame*>(av_buffer_get_opaque(frame->buf[0]));
+ const auto ts_id = TimestampId(reinterpret_cast<size_t>(frame->opaque));
+ const auto ts_lookup = timestamp_map_.Get(ts_id);
+ if (ts_lookup == timestamp_map_.end()) {
+ return false;
+ }
video_frame->set_timestamp(
- base::TimeDelta::FromMicroseconds(frame->reordered_opaque));
+ base::TimeDelta::FromMicroseconds(std::get<1>(*ts_lookup)));
video_frame->metadata()->power_efficient = false;
output_cb_.Run(video_frame);
return true;
@@ -385,8 +391,10 @@ bool FFmpegVideoDecoder::ConfigureDecoder(const VideoDecoderConfig& config,
codec_context_->thread_count = GetFFmpegVideoDecoderThreadCount(config);
codec_context_->thread_type =
FF_THREAD_SLICE | (low_delay ? 0 : FF_THREAD_FRAME);
+
codec_context_->opaque = this;
codec_context_->get_buffer2 = GetVideoBufferImpl;
+ codec_context_->flags |= AV_CODEC_FLAG_COPY_OPAQUE;
if (decode_nalus_)
codec_context_->flags2 |= AV_CODEC_FLAG2_CHUNKS;
diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.h b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.h
index f13ce41..ee2444b 100644
--- a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.h
+++ b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.h
@@ -8,6 +8,8 @@
#include <list>
#include <memory>
+#include "base/containers/mru_cache.h"
+#include "base/util/type_safety/id_type.h"
#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
@@ -85,6 +87,20 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder {
// FFmpeg structures owned by this object.
std::unique_ptr<AVCodecContext, ScopedPtrAVFreeContext> codec_context_;
+ // The gist here is that timestamps need to be 64 bits to store microsecond
+ // precision. A 32 bit integer would overflow at ~35 minutes at this level of
+ // precision. We can't cast the timestamp to the void ptr object used by the
+ // opaque field in ffmpeg then, because it would lose data on a 32 bit build.
+ // However, we don't actually have 2^31 timestamped frames in a single
+ // playback, so it's fine to use the 32 bit value as a key in a map which
+ // contains the actual timestamps. Additionally, we've in the past set 128
+ // outstanding frames for re-ordering as a limit for cross-thread decoding
+ // tasks, so we'll do that here too with the LRU cache.
+ using TimestampId = util::IdType<int64_t, size_t, 0>;
+
+ TimestampId::Generator timestamp_id_generator_;
+ base::MRUCache<TimestampId, int64_t> timestamp_map_;
+
VideoDecoderConfig config_;
VideoFramePool frame_pool_;
diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
index d12fade..8abfbbf 100644
--- a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
+++ b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
@@ -114,7 +114,6 @@ int H264DecoderImpl::AVGetBuffer2(AVCodecContext* context,
int total_size = y_size + 2 * uv_size;
av_frame->format = context->pix_fmt;
- av_frame->reordered_opaque = context->reordered_opaque;
// Set |av_frame| members as required by FFmpeg.
av_frame->data[kYPlaneIndex] = frame_buffer->MutableDataY();
@@ -273,8 +272,6 @@ int32_t H264DecoderImpl::Decode(const EncodedImage& input_image,
return WEBRTC_VIDEO_CODEC_ERROR;
}
packet.size = static_cast<int>(input_image.size());
- int64_t frame_timestamp_us = input_image.ntp_time_ms_ * 1000; // ms -> μs
- av_context_->reordered_opaque = frame_timestamp_us;
int result = avcodec_send_packet(av_context_.get(), &packet);
if (result < 0) {
@@ -290,10 +287,6 @@ int32_t H264DecoderImpl::Decode(const EncodedImage& input_image,
return WEBRTC_VIDEO_CODEC_ERROR;
}
- // We don't expect reordering. Decoded frame tamestamp should match
- // the input one.
- RTC_DCHECK_EQ(av_frame_->reordered_opaque, frame_timestamp_us);
-
absl::optional<uint8_t> qp;
// TODO(sakal): Maybe it is possible to get QP directly from FFmpeg.
h264_bitstream_parser_.ParseBitstream(input_image.data(), input_image.size());
@@ -1,17 +0,0 @@
diff -up qtwebengine-everywhere-src-5.15.5/src/webenginewidgets/api/qwebenginedownloaditem.h.QT_DEPRECATED_VERSION qtwebengine-everywhere-src-5.15.5/src/webenginewidgets/api/qwebenginedownloaditem.h
--- qtwebengine-everywhere-src-5.15.5/src/webenginewidgets/api/qwebenginedownloaditem.h.QT_DEPRECATED_VERSION 2021-06-24 07:34:27.991417071 -0500
+++ qtwebengine-everywhere-src-5.15.5/src/webenginewidgets/api/qwebenginedownloaditem.h 2021-06-24 07:36:28.996937357 -0500
@@ -120,9 +120,13 @@ public:
QString mimeType() const;
#if QT_DEPRECATED_SINCE(5, 14)
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
+#if QT_VERSION >= QT_VERSION_CHECK(5,14,0)
QT_DEPRECATED_VERSION_X(5, 14, "Use downloadDirectory() and downloadFileName() instead")
+#endif
QString path() const;
+#if QT_VERSION >= QT_VERSION_CHECK(5,14,0)
QT_DEPRECATED_VERSION_X(5, 14, "Use setDownloadDirectory() and setDownloadFileName() instead")
+#endif
void setPath(QString path);
#else
QT_DEPRECATED_X("Use downloadDirectory() and downloadFileName() instead")
@@ -1,27 +0,0 @@
Quoting the description from qtwebengine-6.7.0-ninja1.12.patch:
"""
Patch status: pending being looked at upstream
Issue[1][2][3] also exist in chromium itself[4], and unclear
why this started happening only with ninja-1.12.0 at the moment.
Just a quickfix, likely not fully correct and seems there may
be further unresolved race issues.
[1] https://bugs.gentoo.org/930107
[2] https://bugreports.qt.io/browse/QTBUG-124375
[3] https://github.com/ninja-build/ninja/issues/2417
[4] https://bugs.gentoo.org/930112
"""
This has a hunk removed but is otherwise the same.
--- ./src/3rdparty/chromium/content/browser/BUILD.gn.orig 2024-03-26 14:47:34.000000000 +0000
+++ ./src/3rdparty/chromium/content/browser/BUILD.gn 2024-06-24 04:57:25.108720935 +0100
@@ -196,6 +196,7 @@ jumbo_static_library("browser") {
"//content/common",
"//content/common:buildflags",
"//content/common:mojo_bindings",
+ "//components/spellcheck:buildflags",
"//content/public/browser:proto",
"//content/public/common:common_sources",
"//content/public/common:content_descriptor_keys",
@@ -1,16 +0,0 @@
diff --git a/src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc b/src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc
index c38d7fdfa..0a8b0fd8b 100644
--- a/src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc
+++ b/src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc
@@ -72,6 +72,11 @@ typedef void* SockOptArg;
#if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(__native_client__)
+// Seems that kernel 5.2.0 renames this define to SIOCGSTAMP_OLD
+#ifndef SIOCGSTAMP
+#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */
+#endif
+
int64_t GetSocketRecvTimestamp(int socket) {
struct timeval tv_ioctl;
int ret = ioctl(socket, SIOCGSTAMP, &tv_ioctl);
@@ -1,24 +0,0 @@
diff -up qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/BUILD.gn.libpipewire-0.3 qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/BUILD.gn
--- qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/BUILD.gn.libpipewire-0.3 2021-12-15 10:09:27.000000000 -0600
+++ qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/BUILD.gn 2022-02-18 09:43:31.402923179 -0600
@@ -202,7 +202,7 @@ if (is_linux || is_chromeos) {
if (rtc_link_pipewire) {
pkg_config("pipewire") {
- packages = [ "libpipewire-0.2" ]
+ packages = [ "libpipewire-0.3" ]
}
} else {
# When libpipewire is not directly linked, use stubs to allow for dlopening of
diff -up qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/webrtc/webrtc.gni.libpipewire-0.3 qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/webrtc/webrtc.gni
--- qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/webrtc/webrtc.gni.libpipewire-0.3 2021-12-15 10:09:27.000000000 -0600
+++ qtwebengine-everywhere-src-5.15.8/src/3rdparty/chromium/third_party/webrtc/webrtc.gni 2022-02-18 12:35:13.895009491 -0600
@@ -115,7 +115,7 @@ declare_args() {
rtc_use_pipewire = is_desktop_linux && use_sysroot
# Set this to link PipeWire directly instead of using the dlopen.
- rtc_link_pipewire = false
+ rtc_link_pipewire = true
# Enable to use the Mozilla internal settings.
build_with_mozilla = false
@@ -1,12 +0,0 @@
diff -up qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/sandbox/linux/system_headers/arm64_linux_syscalls.h.aarch64-new-stat qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/sandbox/linux/system_headers/arm64_linux_syscalls.h
--- qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/sandbox/linux/system_headers/arm64_linux_syscalls.h.aarch64-new-stat 2018-11-19 12:55:45.000000000 -0600
+++ qtwebengine-everywhere-src-5.11.3/src/3rdparty/chromium/sandbox/linux/system_headers/arm64_linux_syscalls.h 2018-12-08 21:16:39.931896244 -0600
@@ -5,6 +5,8 @@
#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_ARM64_LINUX_SYSCALLS_H_
#define SANDBOX_LINUX_SYSTEM_HEADERS_ARM64_LINUX_SYSCALLS_H_
+#define __ARCH_WANT_NEW_STAT
+
#include <asm-generic/unistd.h>
#if !defined(__NR_io_setup)
@@ -1,12 +0,0 @@
diff -up qtwebengine-everywhere-opensource-src-5.15.5/src/3rdparty/chromium/third_party/libxml/src/encoding.c.TRUE qtwebengine-everywhere-opensource-src-5.15.5/src/3rdparty/chromium/third_party/libxml/src/encoding.c
--- qtwebengine-everywhere-opensource-src-5.15.5/src/3rdparty/chromium/third_party/libxml/src/encoding.c.TRUE 2021-05-28 07:05:45.000000000 -0500
+++ qtwebengine-everywhere-opensource-src-5.15.5/src/3rdparty/chromium/third_party/libxml/src/encoding.c 2021-06-24 09:44:41.592468805 -0500
@@ -2004,7 +2004,7 @@ xmlEncOutputChunk(xmlCharEncodingHandler
#ifdef LIBXML_ICU_ENABLED
else if (handler->uconv_out != NULL) {
ret = xmlUconvWrapper(handler->uconv_out, 0, out, outlen, in, inlen,
- TRUE);
+ 1);
}
#endif /* LIBXML_ICU_ENABLED */
else {
@@ -1,154 +0,0 @@
Allow building qtwebengine using ffmpeg 5
Origin: ArchLinux, https://github.com/archlinux/svntogit-packages/tree/packages/qt5-webengine/trunk
diff --git a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h
index 2734a48..70b1877 100644
--- a/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h
+++ b/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.h
@@ -29,6 +29,7 @@ extern "C" {
#include <libavformat/avformat.h>
#include <libavformat/avio.h>
#include <libavutil/avutil.h>
+#include <libavutil/channel_layout.h>
#include <libavutil/imgutils.h>
#include <libavutil/log.h>
#include <libavutil/mastering_display_metadata.h>
diff --git a/src/3rdparty/chromium/media/filters/audio_file_reader.cc b/src/3rdparty/chromium/media/filters/audio_file_reader.cc
index cb81d92..bd73908 100644
--- a/src/3rdparty/chromium/media/filters/audio_file_reader.cc
+++ b/src/3rdparty/chromium/media/filters/audio_file_reader.cc
@@ -85,7 +85,7 @@ bool AudioFileReader::OpenDemuxer() {
}
bool AudioFileReader::OpenDecoder() {
- AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
+ const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
if (codec) {
// MP3 decodes to S16P which we don't support, tell it to use S16 instead.
if (codec_context_->sample_fmt == AV_SAMPLE_FMT_S16P)
diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc b/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc
index 0d825ed..72fac61 100644
--- a/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc
+++ b/src/3rdparty/chromium/media/filters/ffmpeg_audio_decoder.cc
@@ -329,7 +329,7 @@ bool FFmpegAudioDecoder::ConfigureDecoder(const AudioDecoderConfig& config) {
}
}
- AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
+ const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
if (!codec ||
avcodec_open2(codec_context_.get(), codec, &codec_options) < 0) {
DLOG(ERROR) << "Could not initialize audio decoder: "
diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.cc b/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.cc
index d34db63..427565b 100644
--- a/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.cc
+++ b/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.cc
@@ -98,12 +98,12 @@ static base::TimeDelta ExtractStartTime(AVStream* stream) {
// Next try to use the first DTS value, for codecs where we know PTS == DTS
// (excludes all H26x codecs). The start time must be returned in PTS.
- if (stream->first_dts != kNoFFmpegTimestamp &&
+ if (av_stream_get_first_dts(stream) != kNoFFmpegTimestamp &&
stream->codecpar->codec_id != AV_CODEC_ID_HEVC &&
stream->codecpar->codec_id != AV_CODEC_ID_H264 &&
stream->codecpar->codec_id != AV_CODEC_ID_MPEG4) {
const base::TimeDelta first_pts =
- ConvertFromTimeBase(stream->time_base, stream->first_dts);
+ ConvertFromTimeBase(stream->time_base, av_stream_get_first_dts(stream));
if (first_pts < start_time)
start_time = first_pts;
}
@@ -408,11 +408,11 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
scoped_refptr<DecoderBuffer> buffer;
if (type() == DemuxerStream::TEXT) {
- int id_size = 0;
+ size_t id_size = 0;
uint8_t* id_data = av_packet_get_side_data(
packet.get(), AV_PKT_DATA_WEBVTT_IDENTIFIER, &id_size);
- int settings_size = 0;
+ size_t settings_size = 0;
uint8_t* settings_data = av_packet_get_side_data(
packet.get(), AV_PKT_DATA_WEBVTT_SETTINGS, &settings_size);
@@ -424,7 +424,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
buffer = DecoderBuffer::CopyFrom(packet->data, packet->size,
side_data.data(), side_data.size());
} else {
- int side_data_size = 0;
+ size_t side_data_size = 0;
uint8_t* side_data = av_packet_get_side_data(
packet.get(), AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, &side_data_size);
@@ -485,7 +485,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
packet->size - data_offset);
}
- int skip_samples_size = 0;
+ size_t skip_samples_size = 0;
const uint32_t* skip_samples_ptr =
reinterpret_cast<const uint32_t*>(av_packet_get_side_data(
packet.get(), AV_PKT_DATA_SKIP_SAMPLES, &skip_samples_size));
diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_glue.cc b/src/3rdparty/chromium/media/filters/ffmpeg_glue.cc
index 0ef3521..8483ecc 100644
--- a/src/3rdparty/chromium/media/filters/ffmpeg_glue.cc
+++ b/src/3rdparty/chromium/media/filters/ffmpeg_glue.cc
@@ -59,7 +59,6 @@ static int64_t AVIOSeekOperation(void* opaque, int64_t offset, int whence) {
}
void FFmpegGlue::InitializeFFmpeg() {
- av_register_all();
}
static void LogContainer(bool is_local_file,
@@ -95,9 +94,6 @@ FFmpegGlue::FFmpegGlue(FFmpegURLProtocol* protocol) {
// Enable fast, but inaccurate seeks for MP3.
format_context_->flags |= AVFMT_FLAG_FAST_SEEK;
- // Ensures we can read out various metadata bits like vp8 alpha.
- format_context_->flags |= AVFMT_FLAG_KEEP_SIDE_DATA;
-
// Ensures format parsing errors will bail out. From an audit on 11/2017, all
// instances were real failures. Solves bugs like http://crbug.com/710791.
format_context_->error_recognition |= AV_EF_EXPLODE;
diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc
index ef12477..7996606 100644
--- a/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc
+++ b/src/3rdparty/chromium/media/filters/ffmpeg_video_decoder.cc
@@ -391,7 +391,7 @@ bool FFmpegVideoDecoder::ConfigureDecoder(const VideoDecoderConfig& config,
if (decode_nalus_)
codec_context_->flags2 |= AV_CODEC_FLAG2_CHUNKS;
- AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
+ const AVCodec* codec = avcodec_find_decoder(codec_context_->codec_id);
if (!codec || avcodec_open2(codec_context_.get(), codec, NULL) < 0) {
ReleaseFFmpegResources();
return false;
diff --git a/src/3rdparty/chromium/media/filters/media_file_checker.cc b/src/3rdparty/chromium/media/filters/media_file_checker.cc
index 59c2a2f..1a9872c 100644
--- a/src/3rdparty/chromium/media/filters/media_file_checker.cc
+++ b/src/3rdparty/chromium/media/filters/media_file_checker.cc
@@ -68,7 +68,7 @@ bool MediaFileChecker::Start(base::TimeDelta check_time) {
auto context = AVStreamToAVCodecContext(format_context->streams[i]);
if (!context)
continue;
- AVCodec* codec = avcodec_find_decoder(cp->codec_id);
+ const AVCodec* codec = avcodec_find_decoder(cp->codec_id);
if (codec && avcodec_open2(context.get(), codec, nullptr) >= 0) {
auto loop = std::make_unique<FFmpegDecodingLoop>(context.get());
stream_contexts[i] = {std::move(context), std::move(loop)};
diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
index 9002b87..d12fade 100644
--- a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
+++ b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
@@ -203,7 +203,7 @@ int32_t H264DecoderImpl::InitDecode(const VideoCodec* codec_settings,
// a pointer |this|.
av_context_->opaque = this;
- AVCodec* codec = avcodec_find_decoder(av_context_->codec_id);
+ const AVCodec* codec = avcodec_find_decoder(av_context_->codec_id);
if (!codec) {
// This is an indication that FFmpeg has not been initialized or it has not
// been compiled/initialized with the correct set of codecs.
@@ -1,431 +0,0 @@
diff --git a/src/3rdparty/chromium/base/debug/profiler.h b/src/3rdparty/chromium/base/debug/profiler.h
index be6e272e0..b27f5f690 100644
--- a/src/3rdparty/chromium/base/debug/profiler.h
+++ b/src/3rdparty/chromium/base/debug/profiler.h
@@ -5,6 +5,7 @@
#ifndef BASE_DEBUG_PROFILER_H_
#define BASE_DEBUG_PROFILER_H_
+#include <cstdint>
#include <stddef.h>
#include <cstdint>
diff --git a/src/3rdparty/chromium/cc/trees/target_property.cc b/src/3rdparty/chromium/cc/trees/target_property.cc
index 00595fda0..ebd8c605a 100644
--- a/src/3rdparty/chromium/cc/trees/target_property.cc
+++ b/src/3rdparty/chromium/cc/trees/target_property.cc
@@ -6,6 +6,10 @@
#include "cc/trees/target_property.h"
+#include <cstdint>
+
+#include <cstdint>
+
namespace cc {
static_assert(TargetProperty::LAST_TARGET_PROPERTY < kMaxTargetPropertyIndex,
diff --git a/src/3rdparty/chromium/device/base/synchronization/one_writer_seqlock.cc b/src/3rdparty/chromium/device/base/synchronization/one_writer_seqlock.cc
index 98266a16c..7676e6097 100644
--- a/src/3rdparty/chromium/device/base/synchronization/one_writer_seqlock.cc
+++ b/src/3rdparty/chromium/device/base/synchronization/one_writer_seqlock.cc
@@ -6,6 +6,8 @@
#include "device/base/synchronization/one_writer_seqlock.h"
+#include <cstdint>
+
namespace device {
OneWriterSeqLock::OneWriterSeqLock() : sequence_(0) {}
diff --git a/src/3rdparty/chromium/extensions/common/constants.h b/src/3rdparty/chromium/extensions/common/constants.h
index e6183dc11..5a12758ac 100644
--- a/src/3rdparty/chromium/extensions/common/constants.h
+++ b/src/3rdparty/chromium/extensions/common/constants.h
@@ -13,6 +13,8 @@
#include "components/version_info/channel.h"
#include "ui/base/layout.h"
+#include <cstdint>
+
namespace extensions {
// Scheme we serve extension content from.
diff --git a/src/3rdparty/chromium/gpu/config/gpu_preferences.h b/src/3rdparty/chromium/gpu/config/gpu_preferences.h
index 57bda1f99..7a5ef9b3a 100644
--- a/src/3rdparty/chromium/gpu/config/gpu_preferences.h
+++ b/src/3rdparty/chromium/gpu/config/gpu_preferences.h
@@ -5,6 +5,7 @@
#ifndef GPU_CONFIG_GPU_PREFERENCES_H_
#define GPU_CONFIG_GPU_PREFERENCES_H_
+#include <cstdint>
#include <stddef.h>
#include <cstdint>
#include <string>
diff --git a/src/3rdparty/chromium/net/base/parse_number.h b/src/3rdparty/chromium/net/base/parse_number.h
index 301d14ac8..378058a23 100644
--- a/src/3rdparty/chromium/net/base/parse_number.h
+++ b/src/3rdparty/chromium/net/base/parse_number.h
@@ -11,6 +11,8 @@
#include "base/strings/string_piece.h"
#include "net/base/net_export.h"
+#include <cstdint>
+
// This file contains utility functions for parsing numbers, in the context of
// network protocols.
//
diff --git a/src/3rdparty/chromium/pdf/document_attachment_info.h b/src/3rdparty/chromium/pdf/document_attachment_info.h
index fd78cb729..f9330a0db 100644
--- a/src/3rdparty/chromium/pdf/document_attachment_info.h
+++ b/src/3rdparty/chromium/pdf/document_attachment_info.h
@@ -9,6 +9,8 @@
#include "base/strings/string16.h"
+#include <cstdint>
+
namespace chrome_pdf {
struct DocumentAttachmentInfo {
diff --git a/src/3rdparty/chromium/ppapi/utility/completion_callback_factory_thread_traits.h b/src/3rdparty/chromium/ppapi/utility/completion_callback_factory_thread_traits.h
index ac0b31a75..5d1c421d0 100644
--- a/src/3rdparty/chromium/ppapi/utility/completion_callback_factory_thread_traits.h
+++ b/src/3rdparty/chromium/ppapi/utility/completion_callback_factory_thread_traits.h
@@ -38,6 +38,10 @@ namespace pp {
/// As a further optimization, we can add support for this later.
class ThreadSafeThreadTraits {
public:
+
+ typedef pp::Lock Lock;
+ typedef pp::AutoLock AutoLock;
+
class RefCount {
public:
/// Default constructor. In debug mode, this checks that the object is being
@@ -67,8 +71,6 @@ class ThreadSafeThreadTraits {
int32_t ref_;
};
- typedef pp::Lock Lock;
- typedef pp::AutoLock AutoLock;
};
/// The non-thread-safe version of thread traits. Using this class as the
diff --git a/src/3rdparty/chromium/third_party/angle/src/common/angleutils.h b/src/3rdparty/chromium/third_party/angle/src/common/angleutils.h
index fb9a44225..f9330f313 100644
--- a/src/3rdparty/chromium/third_party/angle/src/common/angleutils.h
+++ b/src/3rdparty/chromium/third_party/angle/src/common/angleutils.h
@@ -15,6 +15,7 @@
# include "absl/container/flat_hash_map.h"
#endif // defined(ANGLE_USE_ABSEIL)
+#include <cstdint>
#include <climits>
#include <cstdarg>
#include <cstddef>
diff --git a/src/3rdparty/chromium/third_party/libgav1/src/src/utils/threadpool.cc b/src/3rdparty/chromium/third_party/libgav1/src/src/utils/threadpool.cc
index 4e8788bc4..a5d35b31b 100644
--- a/src/3rdparty/chromium/third_party/libgav1/src/src/utils/threadpool.cc
+++ b/src/3rdparty/chromium/third_party/libgav1/src/src/utils/threadpool.cc
@@ -31,6 +31,7 @@
#include <cstdio>
#include <cstdint>
#include <cstring>
+#include <cstdio>
#include <new>
#include <utility>
diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/proto_importer_module.h b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/proto_importer_module.h
index 098433c47..0820bb220 100644
--- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/proto_importer_module.h
+++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/proto_importer_module.h
@@ -23,6 +23,8 @@
#include "perfetto/trace_processor/status.h"
#include "src/trace_processor/trace_blob_view.h"
+#include <cstdint>
+
namespace perfetto {
namespace protos {
diff --git a/src/3rdparty/chromium/ui/events/gesture_event_details.h b/src/3rdparty/chromium/ui/events/gesture_event_details.h
index d20416738..8dadab3d0 100644
--- a/src/3rdparty/chromium/ui/events/gesture_event_details.h
+++ b/src/3rdparty/chromium/ui/events/gesture_event_details.h
@@ -5,6 +5,7 @@
#ifndef UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_
#define UI_EVENTS_GESTURE_DETECTION_GESTURE_EVENT_DETAILS_H_
+#include <cstdint>
#include <string.h>
#include "base/check_op.h"
diff --git a/src/3rdparty/chromium/ui/gl/gl_surface_glx.cc b/src/3rdparty/chromium/ui/gl/gl_surface_glx.cc
index 1d5527691..ef9d5ce13 100644
--- a/src/3rdparty/chromium/ui/gl/gl_surface_glx.cc
+++ b/src/3rdparty/chromium/ui/gl/gl_surface_glx.cc
@@ -4,6 +4,7 @@
#include "ui/gl/gl_surface_glx.h"
+#include <cstdint>
#include <utility>
#include "base/bind.h"
diff --git a/src/3rdparty/chromium/ui/gl/gl_surface_glx.h b/src/3rdparty/chromium/ui/gl/gl_surface_glx.h
index ab612cd87..2178d8514 100644
--- a/src/3rdparty/chromium/ui/gl/gl_surface_glx.h
+++ b/src/3rdparty/chromium/ui/gl/gl_surface_glx.h
@@ -5,6 +5,7 @@
#ifndef UI_GL_GL_SURFACE_GLX_H_
#define UI_GL_GL_SURFACE_GLX_H_
+#include <cstdint>
#include <stdint.h>
#include <memory>
diff --git a/src/3rdparty/chromium/v8/src/base/logging.h b/src/3rdparty/chromium/v8/src/base/logging.h
index 7c774ed30..1c44cf72a 100644
--- a/src/3rdparty/chromium/v8/src/base/logging.h
+++ b/src/3rdparty/chromium/v8/src/base/logging.h
@@ -5,6 +5,7 @@
#ifndef V8_BASE_LOGGING_H_
#define V8_BASE_LOGGING_H_
+#include <cstdint>
#include <cstring>
#include <cstdint>
#include <sstream>
diff --git a/src/core/browsing_data_remover_delegate_qt.h b/src/core/browsing_data_remover_delegate_qt.h
index 5adfbbe7e..4e5c59e33 100644
--- a/src/core/browsing_data_remover_delegate_qt.h
+++ b/src/core/browsing_data_remover_delegate_qt.h
@@ -44,6 +44,8 @@
#include "content/public/browser/browsing_data_remover_delegate.h"
+#include <cstdint>
+
namespace QtWebEngineCore {
class BrowsingDataRemoverDelegateQt : public content::BrowsingDataRemoverDelegate {
diff --git a/src/3rdparty/chromium/third_party/webrtc/api/task_queue/task_queue_base.h b/src/3rdparty/chromium/third_party/webrtc/api/task_queue/task_queue_base.h
index 90b1efd31..63526a738 100644
--- a/src/3rdparty/chromium/third_party/webrtc/api/task_queue/task_queue_base.h
+++ b/src/3rdparty/chromium/third_party/webrtc/api/task_queue/task_queue_base.h
@@ -10,6 +10,7 @@
#ifndef API_TASK_QUEUE_TASK_QUEUE_BASE_H_
#define API_TASK_QUEUE_TASK_QUEUE_BASE_H_
+#include <cstdint>
#include <memory>
#include "api/task_queue/queued_task.h"
diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/gzip/gzip_utils.cc b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/gzip/gzip_utils.cc
index 8a30c7f32..4934432cc 100644
--- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/gzip/gzip_utils.cc
+++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/gzip/gzip_utils.cc
@@ -20,6 +20,8 @@
#include "perfetto/base/build_config.h"
#include "perfetto/base/compiler.h"
+#include <cstdint>
+
#if PERFETTO_BUILDFLAG(PERFETTO_ZLIB)
#include <zlib.h>
#else
diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/gzip/gzip_utils.h b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/gzip/gzip_utils.h
index 624363ff6..6d717fba4 100644
--- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/gzip/gzip_utils.h
+++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/gzip/gzip_utils.h
@@ -17,6 +17,7 @@
#ifndef SRC_TRACE_PROCESSOR_IMPORTERS_GZIP_GZIP_UTILS_H_
#define SRC_TRACE_PROCESSOR_IMPORTERS_GZIP_GZIP_UTILS_H_
+#include <cstdint>
#include <memory>
struct z_stream_s;
diff --git a/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/tracing/core/slice.h b/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/tracing/core/slice.h
index 4ce66fdea..3f3932b22 100644
--- a/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/tracing/core/slice.h
+++ b/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/tracing/core/slice.h
@@ -20,6 +20,7 @@
#include <stddef.h>
#include <string.h>
+#include <cstdint>
#include <memory>
#include <string>
#include <vector>
diff --git a/src/3rdparty/chromium/third_party/perfetto/src/tracing/core/trace_packet.cc b/src/3rdparty/chromium/third_party/perfetto/src/tracing/core/trace_packet.cc
index 0dea150c1..c3def1683 100644
--- a/src/3rdparty/chromium/third_party/perfetto/src/tracing/core/trace_packet.cc
+++ b/src/3rdparty/chromium/third_party/perfetto/src/tracing/core/trace_packet.cc
@@ -19,6 +19,8 @@
#include "perfetto/base/logging.h"
#include "perfetto/protozero/proto_utils.h"
+#include <cstdint>
+
namespace perfetto {
TracePacket::TracePacket() = default;
diff --git a/src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/tracing_backend.h b/src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/tracing_backend.h
index 67b0d2eb5..3c2462de5 100644
--- a/src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/tracing_backend.h
+++ b/src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/tracing_backend.h
@@ -17,6 +17,7 @@
#ifndef INCLUDE_PERFETTO_TRACING_TRACING_BACKEND_H_
#define INCLUDE_PERFETTO_TRACING_TRACING_BACKEND_H_
+#include <cstdint>
#include <memory>
#include <string>
diff --git a/src/3rdparty/chromium/base/task/thread_pool.h b/src/3rdparty/chromium/base/task/thread_pool.h
index 085c249ba..afc674ca7 100644
--- a/src/3rdparty/chromium/base/task/thread_pool.h
+++ b/src/3rdparty/chromium/base/task/thread_pool.h
@@ -5,6 +5,7 @@
#ifndef BASE_TASK_THREAD_POOL_H_
#define BASE_TASK_THREAD_POOL_H_
+#include <cstdint>
#include <memory>
#include <utility>
diff --git a/src/3rdparty/chromium/net/tools/huffman_trie/trie_entry.h b/src/3rdparty/chromium/net/tools/huffman_trie/trie_entry.h
index fe70260f9..eac6a7fc2 100644
--- a/src/3rdparty/chromium/net/tools/huffman_trie/trie_entry.h
+++ b/src/3rdparty/chromium/net/tools/huffman_trie/trie_entry.h
@@ -5,6 +5,7 @@
#ifndef NET_TOOLS_HUFFMAN_TRIE_TRIE_ENTRY_H_
#define NET_TOOLS_HUFFMAN_TRIE_TRIE_ENTRY_H_
+#include <cstdint>
#include <memory>
#include <string>
#include <vector>
diff --git a/src/3rdparty/chromium/third_party/webrtc/api/fec_controller.h b/src/3rdparty/chromium/third_party/webrtc/api/fec_controller.h
index 3e5f7bb21..87777a53f 100644
--- a/src/3rdparty/chromium/third_party/webrtc/api/fec_controller.h
+++ b/src/3rdparty/chromium/third_party/webrtc/api/fec_controller.h
@@ -11,6 +11,7 @@
#ifndef API_FEC_CONTROLLER_H_
#define API_FEC_CONTROLLER_H_
+#include <cstdint>
#include <memory>
#include <vector>
diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/timestamp_map.h b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/timestamp_map.h
index c85666c9a..dfb90e447 100644
--- a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/timestamp_map.h
+++ b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/timestamp_map.h
@@ -11,6 +11,7 @@
#ifndef MODULES_VIDEO_CODING_TIMESTAMP_MAP_H_
#define MODULES_VIDEO_CODING_TIMESTAMP_MAP_H_
+#include <cstdint>
#include <memory>
namespace webrtc {
diff --git a/src/3rdparty/chromium/third_party/webrtc/api/network_state_predictor.h b/src/3rdparty/chromium/third_party/webrtc/api/network_state_predictor.h
index 9cf5ab6f0..2d165baa5 100644
--- a/src/3rdparty/chromium/third_party/webrtc/api/network_state_predictor.h
+++ b/src/3rdparty/chromium/third_party/webrtc/api/network_state_predictor.h
@@ -11,6 +11,7 @@
#ifndef API_NETWORK_STATE_PREDICTOR_H_
#define API_NETWORK_STATE_PREDICTOR_H_
+#include <cstdint>
#include <memory>
#include <vector>
diff --git a/src/3rdparty/chromium/gpu/command_buffer/common/skia_utils.h b/src/3rdparty/chromium/gpu/command_buffer/common/skia_utils.h
index 6508d79a1..a9f9528f1 100644
--- a/src/3rdparty/chromium/gpu/command_buffer/common/skia_utils.h
+++ b/src/3rdparty/chromium/gpu/command_buffer/common/skia_utils.h
@@ -5,6 +5,7 @@
#ifndef GPU_COMMAND_BUFFER_COMMON_SKIA_UTILS_H_
#define GPU_COMMAND_BUFFER_COMMON_SKIA_UTILS_H_
+#include <cstdint>
#include <memory>
#include "base/optional.h"
diff --git a/src/3rdparty/chromium/gpu/command_buffer/service/gpu_fence_manager.h b/src/3rdparty/chromium/gpu/command_buffer/service/gpu_fence_manager.h
index ee50d6fdd..576f6e3bc 100644
--- a/src/3rdparty/chromium/gpu/command_buffer/service/gpu_fence_manager.h
+++ b/src/3rdparty/chromium/gpu/command_buffer/service/gpu_fence_manager.h
@@ -5,6 +5,7 @@
#ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_FENCE_MANAGER_H_
#define GPU_COMMAND_BUFFER_SERVICE_GPU_FENCE_MANAGER_H_
+#include <cstdint>
#include <memory>
#include <vector>
diff --git a/src/3rdparty/chromium/third_party/pdfium/core/fpdfapi/page/cpdf_function.h b/src/3rdparty/chromium/third_party/pdfium/core/fpdfapi/page/cpdf_function.h
index fd68b6b49..dc7c015d5 100644
--- a/src/3rdparty/chromium/third_party/pdfium/core/fpdfapi/page/cpdf_function.h
+++ b/src/3rdparty/chromium/third_party/pdfium/core/fpdfapi/page/cpdf_function.h
@@ -7,6 +7,7 @@
#ifndef CORE_FPDFAPI_PAGE_CPDF_FUNCTION_H_
#define CORE_FPDFAPI_PAGE_CPDF_FUNCTION_H_
+#include <cstdint>
#include <memory>
#include <set>
#include <vector>
diff --git a/src/3rdparty/chromium/third_party/pdfium/core/fxcodec/jbig2/JBig2_DocumentContext.h b/src/3rdparty/chromium/third_party/pdfium/core/fxcodec/jbig2/JBig2_DocumentContext.h
index 9bcdd371e..5921794f1 100644
--- a/src/3rdparty/chromium/third_party/pdfium/core/fxcodec/jbig2/JBig2_DocumentContext.h
+++ b/src/3rdparty/chromium/third_party/pdfium/core/fxcodec/jbig2/JBig2_DocumentContext.h
@@ -7,6 +7,7 @@
#ifndef CORE_FXCODEC_JBIG2_JBIG2_DOCUMENTCONTEXT_H_
#define CORE_FXCODEC_JBIG2_JBIG2_DOCUMENTCONTEXT_H_
+#include <cstdint>
#include <list>
#include <memory>
#include <utility>
diff --git a/src/3rdparty/chromium/third_party/pdfium/third_party/base/span.h b/src/3rdparty/chromium/third_party/pdfium/third_party/base/span.h
index bb07f43a0..0b7daf775 100644
--- a/src/3rdparty/chromium/third_party/pdfium/third_party/base/span.h
+++ b/src/3rdparty/chromium/third_party/pdfium/third_party/base/span.h
@@ -9,6 +9,7 @@
#include <algorithm>
#include <array>
+#include <cstdint>
#include <iterator>
#include <type_traits>
#include <utility>
diff --git a/src/3rdparty/chromium/third_party/webrtc/video/stats_counter.h b/src/3rdparty/chromium/third_party/webrtc/video/stats_counter.h
index fb6017f41..ed5530ca0 100644
--- a/src/3rdparty/chromium/third_party/webrtc/video/stats_counter.h
+++ b/src/3rdparty/chromium/third_party/webrtc/video/stats_counter.h
@@ -11,6 +11,7 @@
#ifndef VIDEO_STATS_COUNTER_H_
#define VIDEO_STATS_COUNTER_H_
+#include <cstdint>
#include <memory>
#include <string>
diff --git a/src/3rdparty/chromium/third_party/woff2/include/woff2/output.h b/src/3rdparty/chromium/third_party/woff2/include/woff2/output.h
index c325f67be..5c4dc4d18 100644
--- a/src/3rdparty/chromium/third_party/woff2/include/woff2/output.h
+++ b/src/3rdparty/chromium/third_party/woff2/include/woff2/output.h
@@ -10,6 +10,7 @@
#define WOFF2_WOFF2_OUT_H_
#include <algorithm>
+#include <cstdint>
#include <cstring>
#include <memory>
#include <string>
@@ -1,99 +0,0 @@
diff --git a/src/3rdparty/chromium/build/config/compiler/BUILD.gn b/src/3rdparty/chromium/build/config/compiler/BUILD.gn
index b511a58c5a8..abd78a74ead 100644
--- a/src/3rdparty/chromium/build/config/compiler/BUILD.gn
+++ b/src/3rdparty/chromium/build/config/compiler/BUILD.gn
@@ -566,7 +566,7 @@ config("compiler") {
# Override Chromium's default for projects that wish to stay on C++11.
cflags_cc += [ "-std=${standard_prefix}++11" ]
} else {
- cflags_cc += [ "-std=${standard_prefix}++14" ]
+ cflags_cc += [ "-std=${standard_prefix}++17" ]
}
} else if (!is_win && !is_nacl) {
if (target_os == "android") {
diff --git a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h
index f03ba1e4ab4..b1495f7ae74 100644
--- a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h
+++ b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h
@@ -195,7 +195,7 @@ NumPartitionPagesPerSuperPage() {
//
// __STDCPP_DEFAULT_NEW_ALIGNMENT__ is C++17. As such, it is not defined on all
// platforms, as Chrome's requirement is C++14 as of 2020.
-#if defined(__STDCPP_DEFAULT_NEW_ALIGNMENT__)
+#if 0
static constexpr size_t kAlignment =
std::max(alignof(std::max_align_t), __STDCPP_DEFAULT_NEW_ALIGNMENT__);
#else
diff --git a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h b/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h
index 76e627d27a3..942435f44a0 100644
--- a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h
+++ b/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h
@@ -12,6 +12,7 @@
#define COMMON_VIDEO_H264_SPS_PARSER_H_
#include "absl/types/optional.h"
+#include <cstdint>
namespace rtc {
class BitBuffer;
diff --git a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/pps_parser.h b/src/3rdparty/chromium/third_party/webrtc/common_video/h264/pps_parser.h
index d6c31b06887..d8852dfd186 100644
--- a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/pps_parser.h
+++ b/src/3rdparty/chromium/third_party/webrtc/common_video/h264/pps_parser.h
@@ -12,6 +12,7 @@
#define COMMON_VIDEO_H264_PPS_PARSER_H_
#include "absl/types/optional.h"
+#include <cstdint>
namespace rtc {
class BitBuffer;
diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h b/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h
index 3b9971abae1..d4458038527 100644
--- a/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h
+++ b/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h
@@ -13,6 +13,7 @@
#include <array>
#include <vector>
+#include <memory>
#include "absl/types/optional.h"
#include "api/array_view.h"
diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h b/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h
index 345e45ce127..e686e5d691a 100644
--- a/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h
+++ b/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h
@@ -12,6 +12,7 @@
#define MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
#include <limits>
+#include <cstdint>
#include "absl/types/optional.h"
diff --git a/src/3rdparty/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc b/src/3rdparty/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc
index 8fcc799b795..bc69ddcf18c 100644
--- a/src/3rdparty/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc
+++ b/src/3rdparty/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc
@@ -15,6 +15,7 @@
#include "third_party/blink/renderer/core/page/scrolling/text_fragment_anchor_metrics.h"
#include "third_party/blink/renderer/core/page/scrolling/text_fragment_finder.h"
#include "third_party/blink/renderer/platform/text/text_boundaries.h"
+#include "absl/base/attributes.h"
namespace blink {
diff --git a/src/3rdparty/chromium/third_party/abseil-cpp/absl/base/options.h b/src/3rdparty/chromium/third_party/abseil-cpp/absl/base/options.h
index df506f0fae6..1de105fed4a 100644
--- a/src/3rdparty/chromium/third_party/abseil-cpp/absl/base/options.h
+++ b/src/3rdparty/chromium/third_party/abseil-cpp/absl/base/options.h
@@ -180,7 +180,7 @@
// absl::variant is a typedef of std::variant, use the feature macro
// ABSL_USES_STD_VARIANT.
-#define ABSL_OPTION_USE_STD_VARIANT 2
+#define ABSL_OPTION_USE_STD_VARIANT 0
// ABSL_OPTION_USE_INLINE_NAMESPACE
@@ -1,11 +0,0 @@
diff --git a/src/buildtools/config/functions.pri b/src/buildtools/config/functions.pri
index 8c11faa16..191d3d623 100644
--- a/src/buildtools/config/functions.pri
+++ b/src/buildrools/config/functions.pri
@@ -1,5 +1,5 @@
defineReplace(qtwebengine_extractCFlag) {
- CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS
+ CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS $$QMAKE_CFLAGS_RELEASE
OPTION = $$find(CFLAGS, $$1)
OPTION = $$split(OPTION, =)
PARAM = $$member(OPTION, 1)
@@ -1,15 +0,0 @@
diff --git a/src/buildtools/config/linux.pri b/src/buildtools/config/linux.pri
index f45c418fe..f6c7b714e 100644
--- a/src/buildtools/config/linux.pri
+++ b/src/buildtools/config/linux.pri
@@ -87,7 +87,9 @@ contains(QT_ARCH, "arm") {
gn_args += arm_use_neon=false
# If the toolchain does not explicitly specify to use NEON instructions
# we use arm_neon_optional for ARMv7
- equals(MARMV, 7): gn_args += arm_optionally_use_neon=true
+ # Disable NEON entirely for now, if set in the specfile, e.g., to
+ # work around some build failure.
+ # equals(MARMV, 7): gn_args += arm_optionally_use_neon=true
}
}
@@ -1,15 +0,0 @@
diff --git a/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp b/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp
index 0dc349706..0bfee6da4 100644
--- a/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp
+++ b/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp
@@ -11,6 +11,10 @@
#include <algorithm> // std::lower_bound
#include <iterator>
+#include <string.h>
+#include <algorithm>
+#include <iterator>
+
static constexpr const char* gColorNames[] = {
"aliceblue",
"antiquewhite",
@@ -1,540 +0,0 @@
riscv64 support patch taken from Opensuse:
https://build.opensuse.org/package/show/openSUSE:Factory:RISCV/libqt5-qtwebengine?rev=110
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
@@ -44,6 +44,8 @@ typedef MDRawContextARM RawContextCPU;
typedef MDRawContextARM64_Old RawContextCPU;
#elif defined(__mips__)
typedef MDRawContextMIPS RawContextCPU;
+#elif defined(__riscv)
+typedef MDRawContextRISCV64 RawContextCPU;
#else
#error "This code has not been ported to your platform yet."
#endif
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
@@ -270,7 +270,23 @@ void ThreadInfo::FillCPUContext(RawConte
out->float_save.fir = mcontext.fpc_eir;
#endif
}
-#endif // __mips__
+#elif defined(__riscv)
+
+uintptr_t ThreadInfo::GetInstructionPointer() const {
+ return mcontext.__gregs[REG_PC];
+}
+
+void ThreadInfo::FillCPUContext(RawContextCPU* out) const {
+ out->context_flags = MD_CONTEXT_RISCV64_FULL;
+
+ my_memcpy (out->iregs, mcontext.__gregs, MD_CONTEXT_RISCV64_GPR_COUNT * 8);
+
+ out->float_save.fcsr = mcontext.__fpregs.__d.__fcsr;
+ my_memcpy(&out->float_save.regs, &mcontext.__fpregs.__d.__f,
+ MD_FLOATINGSAVEAREA_RISCV64_FPR_COUNT * 8);
+}
+
+#endif // __riscv
void ThreadInfo::GetGeneralPurposeRegisters(void** gp_regs, size_t* size) {
assert(gp_regs || size);
@@ -279,6 +295,11 @@ void ThreadInfo::GetGeneralPurposeRegist
*gp_regs = mcontext.gregs;
if (size)
*size = sizeof(mcontext.gregs);
+#elif defined(__riscv)
+ if (gp_regs)
+ *gp_regs = mcontext.__gregs;
+ if (size)
+ *size = sizeof(mcontext.__gregs);
#else
if (gp_regs)
*gp_regs = &regs;
@@ -294,6 +315,11 @@ void ThreadInfo::GetFloatingPointRegiste
*fp_regs = &mcontext.fpregs;
if (size)
*size = sizeof(mcontext.fpregs);
+#elif defined(__riscv)
+ if (fp_regs)
+ *fp_regs = &mcontext.__fpregs;
+ if (size)
+ *size = sizeof(mcontext.__fpregs);
#else
if (fp_regs)
*fp_regs = &fpregs;
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
@@ -68,7 +68,7 @@ struct ThreadInfo {
// Use the structures defined in <sys/user.h>
struct user_regs_struct regs;
struct user_fpsimd_struct fpregs;
-#elif defined(__mips__)
+#elif defined(__mips__) || defined(__riscv)
// Use the structure defined in <sys/ucontext.h>.
mcontext_t mcontext;
#endif
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
@@ -461,7 +461,7 @@ bool ExceptionHandler::HandleSignal(int
memcpy(&g_crash_context_.float_state, fp_ptr,
sizeof(g_crash_context_.float_state));
}
-#elif !defined(__ARM_EABI__) && !defined(__mips__)
+#elif !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__riscv)
// FP state is not part of user ABI on ARM Linux.
// In case of MIPS Linux FP state is already part of ucontext_t
// and 'float_state' is not a member of CrashContext.
@@ -701,7 +701,7 @@ bool ExceptionHandler::WriteMinidump() {
}
#endif
-#if !defined(__ARM_EABI__) && !defined(__aarch64__) && !defined(__mips__)
+#if !defined(__ARM_EABI__) && !defined(__aarch64__) && !defined(__mips__) && !defined(__riscv)
// FPU state is not part of ARM EABI ucontext_t.
memcpy(&context.float_state, context.context.uc_mcontext.fpregs,
sizeof(context.float_state));
@@ -726,6 +726,9 @@ bool ExceptionHandler::WriteMinidump() {
#elif defined(__mips__)
context.siginfo.si_addr =
reinterpret_cast<void*>(context.context.uc_mcontext.pc);
+#elif defined(__riscv)
+ context.siginfo.si_addr =
+ reinterpret_cast<void*>(context.context.uc_mcontext.__gregs[REG_PC]);
#else
#error "This code has not been ported to your platform yet."
#endif
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
@@ -192,7 +192,7 @@ class ExceptionHandler {
siginfo_t siginfo;
pid_t tid; // the crashing thread.
ucontext_t context;
-#if !defined(__ARM_EABI__) && !defined(__mips__)
+#if !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__riscv)
// #ifdef this out because FP state is not part of user ABI for Linux ARM.
// In case of MIPS Linux FP state is already part of ucontext_t so
// 'float_state' is not required.
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
@@ -138,7 +138,7 @@ class MicrodumpWriter {
const MicrodumpExtraInfo& microdump_extra_info,
LinuxDumper* dumper)
: ucontext_(context ? &context->context : NULL),
-#if !defined(__ARM_EABI__) && !defined(__mips__)
+#if !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__riscv)
float_state_(context ? &context->float_state : NULL),
#endif
dumper_(dumper),
@@ -337,6 +337,12 @@ class MicrodumpWriter {
# else
# error "This mips ABI is currently not supported (n32)"
#endif
+#elif defined(__riscv)
+# if __riscv_xlen == 64
+ const char kArch[] = "riscv64";
+# else
+# error "This RISC-V ABI is currently not supported"
+#endif
#else
#error "This code has not been ported to your platform yet"
#endif
@@ -409,7 +415,7 @@ class MicrodumpWriter {
void DumpCPUState() {
RawContextCPU cpu;
my_memset(&cpu, 0, sizeof(RawContextCPU));
-#if !defined(__ARM_EABI__) && !defined(__mips__)
+#if !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__riscv)
UContextReader::FillCPUContext(&cpu, ucontext_, float_state_);
#else
UContextReader::FillCPUContext(&cpu, ucontext_);
@@ -605,7 +611,7 @@ class MicrodumpWriter {
void* Alloc(unsigned bytes) { return dumper_->allocator()->Alloc(bytes); }
const ucontext_t* const ucontext_;
-#if !defined(__ARM_EABI__) && !defined(__mips__)
+#if !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__riscv)
const google_breakpad::fpstate_t* const float_state_;
#endif
LinuxDumper* dumper_;
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
@@ -112,6 +112,9 @@ bool LinuxCoreDumper::GetThreadInfoByInd
#elif defined(__mips__)
stack_pointer =
reinterpret_cast<uint8_t*>(info->mcontext.gregs[MD_CONTEXT_MIPS_REG_SP]);
+#elif defined(__riscv)
+ stack_pointer =
+ reinterpret_cast<uint8_t*>(info->mcontext.__gregs[MD_CONTEXT_RISCV64_REG_SP]);
#else
#error "This code hasn't been ported to your platform yet."
#endif
@@ -208,6 +211,8 @@ bool LinuxCoreDumper::EnumerateThreads()
info.mcontext.mdlo = status->pr_reg[EF_LO];
info.mcontext.mdhi = status->pr_reg[EF_HI];
info.mcontext.pc = status->pr_reg[EF_CP0_EPC];
+#elif defined(__riscv)
+ memcpy(info.mcontext.__gregs, status->pr_reg, sizeof(info.mcontext.__gregs));
#else // __mips__
memcpy(&info.regs, status->pr_reg, sizeof(info.regs));
#endif // __mips__
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
@@ -63,7 +63,8 @@ namespace google_breakpad {
(defined(__mips__) && _MIPS_SIM == _ABIO32)
typedef Elf32_auxv_t elf_aux_entry;
#elif defined(__x86_64) || defined(__aarch64__) || \
- (defined(__mips__) && _MIPS_SIM != _ABIO32)
+ (defined(__mips__) && _MIPS_SIM != _ABIO32) || \
+ (defined(__riscv) && __riscv_xlen == 64)
typedef Elf64_auxv_t elf_aux_entry;
#endif
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
@@ -298,6 +298,9 @@ bool LinuxPtraceDumper::GetThreadInfoByI
#elif defined(__mips__)
stack_pointer =
reinterpret_cast<uint8_t*>(info->mcontext.gregs[MD_CONTEXT_MIPS_REG_SP]);
+#elif defined(__riscv)
+ stack_pointer =
+ reinterpret_cast<uint8_t*>(info->mcontext.__gregs[MD_CONTEXT_RISCV64_REG_SP]);
#else
#error "This code hasn't been ported to your platform yet."
#endif
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
@@ -136,7 +136,7 @@ class MinidumpWriter {
: fd_(minidump_fd),
path_(minidump_path),
ucontext_(context ? &context->context : NULL),
-#if !defined(__ARM_EABI__) && !defined(__mips__)
+#if !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__riscv)
float_state_(context ? &context->float_state : NULL),
#endif
dumper_(dumper),
@@ -468,7 +468,7 @@ class MinidumpWriter {
if (!cpu.Allocate())
return false;
my_memset(cpu.get(), 0, sizeof(RawContextCPU));
-#if !defined(__ARM_EABI__) && !defined(__mips__)
+#if !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__riscv)
UContextReader::FillCPUContext(cpu.get(), ucontext_, float_state_);
#else
UContextReader::FillCPUContext(cpu.get(), ucontext_);
@@ -897,7 +897,7 @@ class MinidumpWriter {
dirent->location.rva = 0;
}
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || defined(__riscv)
bool WriteCPUInformation(MDRawSystemInfo* sys_info) {
char vendor_id[sizeof(sys_info->cpu.x86_cpu_info.vendor_id) + 1] = {0};
static const char vendor_id_name[] = "vendor_id";
@@ -925,6 +925,12 @@ class MinidumpWriter {
# else
# error "This mips ABI is currently not supported (n32)"
#endif
+#elif defined(__riscv)
+# if __riscv_xlen == 64
+ MD_CPU_ARCHITECTURE_RISCV64;
+# else
+# error "This RISC-V ABI is currently not supported"
+# endif
#elif defined(__i386__)
MD_CPU_ARCHITECTURE_X86;
#else
@@ -1333,7 +1339,7 @@ class MinidumpWriter {
const char* path_; // Path to the file where the minidum should be written.
const ucontext_t* const ucontext_; // also from the signal handler
-#if !defined(__ARM_EABI__) && !defined(__mips__)
+#if !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__riscv)
const google_breakpad::fpstate_t* const float_state_; // ditto
#endif
LinuxDumper* dumper_;
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
@@ -48,7 +48,7 @@ class ExceptionHandler;
#if defined(__aarch64__)
typedef struct fpsimd_context fpstate_t;
-#elif !defined(__ARM_EABI__) && !defined(__mips__)
+#elif !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__riscv)
typedef std::remove_pointer<fpregset_t>::type fpstate_t;
#endif
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/breakpad_getcontext.S
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/breakpad_getcontext.S
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/breakpad_getcontext.S
@@ -481,6 +481,68 @@ breakpad_getcontext:
.cfi_endproc
.size breakpad_getcontext, . - breakpad_getcontext
+#elif defined(__riscv) && __riscv_xlen == 64
+
+#define __NR_rt_sigprocmask 135
+#define _NSIG8 64 / 8
+#define SIG_BLOCK 0
+
+ .text
+ .global breakpad_getcontext
+ .hidden breakpad_getcontext
+ .type breakpad_getcontext, @function
+ .align 2
+breakpad_getcontext:
+ sd ra, MCONTEXT_GREGS_OFFSET + 0*8(a0)
+ sd ra, MCONTEXT_GREGS_OFFSET + 1*8(a0)
+ sd sp, MCONTEXT_GREGS_OFFSET + 2*8(a0)
+ sd s0, MCONTEXT_GREGS_OFFSET + 8*8(a0)
+ sd s1, MCONTEXT_GREGS_OFFSET + 9*8(a0)
+ sd x0, MCONTEXT_GREGS_OFFSET + 10*8(a0) /* return 0 by overwriting a0. */
+ sd s2, MCONTEXT_GREGS_OFFSET + 18*8(a0)
+ sd s3, MCONTEXT_GREGS_OFFSET + 19*8(a0)
+ sd s4, MCONTEXT_GREGS_OFFSET + 20*8(a0)
+ sd s5, MCONTEXT_GREGS_OFFSET + 21*8(a0)
+ sd s6, MCONTEXT_GREGS_OFFSET + 22*8(a0)
+ sd s7, MCONTEXT_GREGS_OFFSET + 23*8(a0)
+ sd s8, MCONTEXT_GREGS_OFFSET + 24*8(a0)
+ sd s9, MCONTEXT_GREGS_OFFSET + 25*8(a0)
+ sd s10, MCONTEXT_GREGS_OFFSET + 26*8(a0)
+ sd s11, MCONTEXT_GREGS_OFFSET + 27*8(a0)
+
+#ifndef __riscv_float_abi_soft
+ frsr a1
+
+ fsd fs0, MCONTEXT_FPREGS_OFFSET + 8*8(a0)
+ fsd fs1, MCONTEXT_FPREGS_OFFSET + 9*8(a0)
+ fsd fs2, MCONTEXT_FPREGS_OFFSET + 18*8(a0)
+ fsd fs3, MCONTEXT_FPREGS_OFFSET + 19*8(a0)
+ fsd fs4, MCONTEXT_FPREGS_OFFSET + 20*8(a0)
+ fsd fs5, MCONTEXT_FPREGS_OFFSET + 21*8(a0)
+ fsd fs6, MCONTEXT_FPREGS_OFFSET + 22*8(a0)
+ fsd fs7, MCONTEXT_FPREGS_OFFSET + 23*8(a0)
+ fsd fs8, MCONTEXT_FPREGS_OFFSET + 24*8(a0)
+ fsd fs9, MCONTEXT_FPREGS_OFFSET + 25*8(a0)
+ fsd fs10, MCONTEXT_FPREGS_OFFSET + 26*8(a0)
+ fsd fs11, MCONTEXT_FPREGS_OFFSET + 27*8(a0)
+
+ sw a1, MCONTEXT_FSR_OFFSET(a0)
+#endif /* __riscv_float_abi_soft */
+
+/* rt_sigprocmask (SIG_BLOCK, NULL, &ucp->uc_sigmask, _NSIG / 8) */
+ li a3, _NSIG8
+ add a2, a0, UCONTEXT_SIGMASK_OFFSET
+ mv a1, zero
+ li a0, SIG_BLOCK
+
+ li a7, __NR_rt_sigprocmask
+ scall
+
+ /* Always return 0 for success, even if sigprocmask failed. */
+ mv a0, zero
+ ret
+ .size breakpad_getcontext, . - breakpad_getcontext
+
#else
#error "This file has not been ported for your CPU!"
#endif
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
@@ -65,7 +65,8 @@ bool MemoryMappedFile::Map(const char* p
}
#if defined(__x86_64__) || defined(__aarch64__) || \
- (defined(__mips__) && _MIPS_SIM == _ABI64)
+ (defined(__mips__) && _MIPS_SIM == _ABI64) || \
+ (defined(__riscv) && __riscv_xlen == 64)
struct kernel_stat st;
if (sys_fstat(fd, &st) == -1 || st.st_size < 0) {
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/ucontext_constants.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/ucontext_constants.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/ucontext_constants.h
@@ -146,6 +146,14 @@
#endif
#define FPREGS_OFFSET_MXCSR 24
+#elif defined(__riscv)
+
+#define UCONTEXT_SIGMASK_OFFSET 40
+
+#define MCONTEXT_GREGS_OFFSET 176
+#define MCONTEXT_FPREGS_OFFSET 432
+#define MCONTEXT_FSR_OFFSET (MCONTEXT_FPREGS_OFFSET + 32*8)
+
#else
#error "This header has not been ported for your CPU"
#endif
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/google_breakpad/common/minidump_cpu_riscv64.h
===================================================================
--- /dev/null
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/google_breakpad/common/minidump_cpu_riscv64.h
@@ -0,0 +1,121 @@
+/* Copyright 2013 Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+
+/* minidump_format.h: A cross-platform reimplementation of minidump-related
+ * portions of DbgHelp.h from the Windows Platform SDK.
+ *
+ * (This is C99 source, please don't corrupt it with C++.)
+ *
+ * This file contains the necessary definitions to read minidump files
+ * produced on ARM. These files may be read on any platform provided
+ * that the alignments of these structures on the processing system are
+ * identical to the alignments of these structures on the producing system.
+ * For this reason, precise-sized types are used. The structures defined
+ * by this file have been laid out to minimize alignment problems by
+ * ensuring that all members are aligned on their natural boundaries.
+ * In some cases, tail-padding may be significant when different ABIs specify
+ * different tail-padding behaviors. To avoid problems when reading or
+ * writing affected structures, MD_*_SIZE macros are provided where needed,
+ * containing the useful size of the structures without padding.
+ *
+ * Structures that are defined by Microsoft to contain a zero-length array
+ * are instead defined here to contain an array with one element, as
+ * zero-length arrays are forbidden by standard C and C++. In these cases,
+ * *_minsize constants are provided to be used in place of sizeof. For a
+ * cleaner interface to these sizes when using C++, see minidump_size.h.
+ *
+ * These structures are also sufficient to populate minidump files.
+ *
+ * Because precise data type sizes are crucial for this implementation to
+ * function properly and portably, a set of primitive types with known sizes
+ * are used as the basis of each structure defined by this file.
+ *
+ * Author: Colin Blundell
+ */
+
+/*
+ * RISCV64 support
+ */
+
+#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_RISCV64_H__
+#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_RISCV64_H__
+
+#include "google_breakpad/common/breakpad_types.h"
+
+#define MD_FLOATINGSAVEAREA_RISCV64_FPR_COUNT 32
+#define MD_CONTEXT_RISCV64_GPR_COUNT 32
+
+typedef struct {
+ /* 32 64-bit floating point registers, f0 .. f31. */
+ uint64_t regs[MD_FLOATINGSAVEAREA_RISCV64_FPR_COUNT];
+
+ uint32_t fcsr; /* FPU control and status register */
+} MDFloatingSaveAreaRISCV64;
+
+/* For (MDRawContextRISCV64).context_flags. These values indicate the type of
+ * context stored in the structure. */
+#define MD_CONTEXT_RISCV64 0x00400000
+#define MD_CONTEXT_RISCV64_CONTROL (MD_CONTEXT_RISCV64 | 0x00000001)
+#define MD_CONTEXT_RISCV64_INTEGER (MD_CONTEXT_RISCV64 | 0x00000002)
+#define MD_CONTEXT_RISCV64_FLOATING_POINT (MD_CONTEXT_RISCV64 | 0x00000004)
+#define MD_CONTEXT_RISCV64_DEBUG (MD_CONTEXT_RISCV64 | 0x00000008)
+#define MD_CONTEXT_RISCV64_FULL (MD_CONTEXT_RISCV64_CONTROL | \
+ MD_CONTEXT_RISCV64_INTEGER | \
+ MD_CONTEXT_RISCV64_FLOATING_POINT)
+#define MD_CONTEXT_RISCV64_ALL (MD_CONTEXT_RISCV64_FULL | MD_CONTEXT_RISCV64_DEBUG)
+
+typedef struct {
+ /* Determines which fields of this struct are populated */
+ uint32_t context_flags;
+
+ /* 32 64-bit integer registers, x1 .. x31 + the PC
+ * Note the following fixed uses:
+ * x8 is the frame pointer
+ * x1 is the link register
+ * x2 is the stack pointer
+ * The PC is effectively x0.
+ */
+ uint64_t iregs[MD_CONTEXT_RISCV64_GPR_COUNT];
+
+ /* The next field is included with MD_CONTEXT64_ARM_FLOATING_POINT */
+ MDFloatingSaveAreaRISCV64 float_save;
+
+} MDRawContextRISCV64;
+
+/* Indices into iregs for registers with a dedicated or conventional
+ * purpose.
+ */
+enum MDRISCV64RegisterNumbers {
+ MD_CONTEXT_RISCV64_REG_FP = 8,
+ MD_CONTEXT_RISCV64_REG_RA = 1,
+ MD_CONTEXT_RISCV64_REG_SP = 2,
+ MD_CONTEXT_RISCV64_REG_PC = 0
+};
+
+#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_RISCV64_H__ */
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/google_breakpad/common/minidump_format.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/google_breakpad/common/minidump_format.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/google_breakpad/common/minidump_format.h
@@ -118,6 +118,7 @@ typedef struct {
#include "minidump_cpu_mips.h"
#include "minidump_cpu_ppc.h"
#include "minidump_cpu_ppc64.h"
+#include "minidump_cpu_riscv64.h"
#include "minidump_cpu_sparc.h"
#include "minidump_cpu_x86.h"
@@ -660,6 +661,7 @@ typedef enum {
MD_CPU_ARCHITECTURE_PPC64 = 0x8002, /* Breakpad-defined value for PPC64 */
MD_CPU_ARCHITECTURE_ARM64_OLD = 0x8003, /* Breakpad-defined value for ARM64 */
MD_CPU_ARCHITECTURE_MIPS64 = 0x8004, /* Breakpad-defined value for MIPS64 */
+ MD_CPU_ARCHITECTURE_RISCV64 = 0x8005, /* Breakpad-defined value for RISCV64 */
MD_CPU_ARCHITECTURE_UNKNOWN = 0xffff /* PROCESSOR_ARCHITECTURE_UNKNOWN */
} MDCPUArchitecture;
@@ -1,809 +0,0 @@
riscv64 support patch taken from Opensuse:
https://build.opensuse.org/package/show/openSUSE:Factory:RISCV/libqt5-qtwebengine?rev=110
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_context.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_context.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_context.h
@@ -592,6 +592,41 @@ struct MinidumpContextMIPS64 {
uint64_t fir;
};
+//! \brief 64bit RISC-V-specifc flags for MinidumpContextRISCV64::context_flags.
+//! Based on minidump_cpu_riscv64.h from breakpad
+enum MinidumpContextRISCV64Flags : uint32_t {
+ //! \brief Identifies the context structure as RISCV64.
+ kMinidumpContextRISCV64 = 0x00080000,
+
+ //! \brief Indicates the validity of integer registers.
+ //!
+ //! Registers `x1`-`x31` and pc are valid.
+ kMinidumpContextRISCV64Integer = kMinidumpContextRISCV64 | 0x00000002,
+
+ //! \brief Indicates the validity of floating point registers.
+ //!
+ //! Floating point registers `f0`-`f31`, and `fcsr` are valid
+ kMinidumpContextRISCV64FloatingPoint = kMinidumpContextRISCV64 | 0x00000004,
+
+ //! \brief Indicates the validity of all registers.
+ kMinidumpContextRISCV64All = kMinidumpContextRISCV64Integer |
+ kMinidumpContextRISCV64FloatingPoint,
+};
+
+//! \brief A 64bit RISCV CPU context (register state) carried in a minidump file.
+struct MinidumpContextRISCV64 {
+ uint64_t context_flags;
+
+ //! \brief General purpose registers.
+ uint64_t regs[32];
+
+ //! \brief FPU registers.
+ uint64_t fpregs[32];
+
+ //! \brief FPU status register.
+ uint64_t fcsr;
+};
+
} // namespace crashpad
#endif // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_H_
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
@@ -101,6 +101,13 @@ MinidumpContextWriter::CreateFromSnapsho
break;
}
+ case kCPUArchitectureRISCV64: {
+ context = std::make_unique<MinidumpContextRISCV64Writer>();
+ reinterpret_cast<MinidumpContextRISCV64Writer*>(context.get())
+ ->InitializeFromSnapshot(context_snapshot->riscv64);
+ break;
+ }
+
default: {
LOG(ERROR) << "unknown context architecture "
<< context_snapshot->architecture;
@@ -452,5 +459,42 @@ size_t MinidumpContextMIPS64Writer::Cont
DCHECK_GE(state(), kStateFrozen);
return sizeof(context_);
}
+
+MinidumpContextRISCV64Writer::MinidumpContextRISCV64Writer()
+ : MinidumpContextWriter(), context_() {
+ context_.context_flags = kMinidumpContextRISCV64;
+}
+
+MinidumpContextRISCV64Writer::~MinidumpContextRISCV64Writer() = default;
+
+void MinidumpContextRISCV64Writer::InitializeFromSnapshot(
+ const CPUContextRISCV64* context_snapshot) {
+ DCHECK_EQ(state(), kStateMutable);
+ DCHECK_EQ(context_.context_flags, kMinidumpContextRISCV64);
+
+ context_.context_flags = kMinidumpContextRISCV64All;
+
+ static_assert(sizeof(context_.regs) == sizeof(context_snapshot->regs),
+ "GPRs size mismatch");
+ memcpy(context_.regs, context_snapshot->regs, sizeof(context_.regs));
+
+ static_assert(sizeof(context_.fpregs) == sizeof(context_snapshot->fpregs),
+ "FPRs size mismatch");
+ memcpy(context_.fpregs,
+ context_snapshot->fpregs,
+ sizeof(context_.fpregs));
+ context_.fcsr = context_snapshot->fcsr;
+}
+
+bool MinidumpContextRISCV64Writer::WriteObject(
+ FileWriterInterface* file_writer) {
+ DCHECK_EQ(state(), kStateWritable);
+ return file_writer->Write(&context_, sizeof(context_));
+}
+
+size_t MinidumpContextRISCV64Writer::ContextSize() const {
+ DCHECK_GE(state(), kStateFrozen);
+ return sizeof(context_);
+}
} // namespace crashpad
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
@@ -315,6 +315,46 @@ class MinidumpContextMIPS64Writer final
DISALLOW_COPY_AND_ASSIGN(MinidumpContextMIPS64Writer);
};
+//! \brief The writer for a MinidumpContextRISCV64 structure in a minidump file.
+class MinidumpContextRISCV64Writer final : public MinidumpContextWriter {
+ public:
+ MinidumpContextRISCV64Writer();
+ ~MinidumpContextRISCV64Writer() override;
+
+ //! \brief Initializes the MinidumpContextRISCV based on \a context_snapshot.
+ //!
+ //! \param[in] context_snapshot The context snapshot to use as source data.
+ //!
+ //! \note Valid in #kStateMutable. No mutation of context() may be done before
+ //! calling this method, and it is not normally necessary to alter
+ //! context() after calling this method.
+ void InitializeFromSnapshot(const CPUContextRISCV64* context_snapshot);
+
+ //! \brief Returns a pointer to the context structure that this object will
+ //! write.
+ //!
+ //! \attention This returns a non-`const` pointer to this objects private
+ //! data so that a caller can populate the context structure directly.
+ //! This is done because providing setter interfaces to each field in the
+ //! context structure would be unwieldy and cumbersome. Care must be taken
+ //! to populate the context structure correctly. The context structure
+ //! must only be modified while this object is in the #kStateMutable
+ //! state.
+ MinidumpContextRISCV64* context() { return &context_; }
+
+ protected:
+ // MinidumpWritable:
+ bool WriteObject(FileWriterInterface* file_writer) override;
+
+ // MinidumpContextWriter:
+ size_t ContextSize() const override;
+
+ private:
+ MinidumpContextRISCV64 context_;
+
+ DISALLOW_COPY_AND_ASSIGN(MinidumpContextRISCV64Writer);
+};
+
} // namespace crashpad
#endif // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_WRITER_H_
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
@@ -135,6 +135,10 @@ std::string MinidumpMiscInfoDebugBuildSt
static constexpr char kCPU[] = "mips";
#elif defined(ARCH_CPU_MIPS64EL)
static constexpr char kCPU[] = "mips64";
+#elif defined(ARCH_CPU_RISCV)
+ static constexpr char kCPU[] = "riscv";
+#elif defined(ARCH_CPU_RISCV64)
+ static constexpr char kCPU[] = "riscv64";
#else
#error define kCPU for this CPU
#endif
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/capture_memory.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/capture_memory.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/capture_memory.cc
@@ -112,6 +112,16 @@ void CaptureMemory::PointedToByContext(c
for (size_t i = 0; i < base::size(context.mipsel->regs); ++i) {
MaybeCaptureMemoryAround(delegate, context.mipsel->regs[i]);
}
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ if (context.architecture == kCPUArchitectureRISCV) {
+ for (size_t i = 0; i < base::size(context.riscv->regs); ++i) {
+ MaybeCaptureMemoryAround(delegate, context.riscv->regs[i]);
+ }
+ } else {
+ for (size_t i = 0; i < base::size(context.riscv64->regs); ++i) {
+ MaybeCaptureMemoryAround(delegate, context.riscv64->regs[i]);
+ }
+ }
#else
#error Port.
#endif
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
@@ -43,7 +43,13 @@ enum CPUArchitecture {
kCPUArchitectureMIPSEL,
//! \brief 64-bit MIPSEL.
- kCPUArchitectureMIPS64EL
+ kCPUArchitectureMIPS64EL,
+
+ //! \brief 32-bit RISCV.
+ kCPUArchitectureRISCV,
+
+ //! \brief 64-bit RISCV.
+ kCPUArchitectureRISCV64
};
} // namespace crashpad
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/cpu_context.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/cpu_context.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/cpu_context.cc
@@ -196,10 +196,12 @@ bool CPUContext::Is64Bit() const {
case kCPUArchitectureX86_64:
case kCPUArchitectureARM64:
case kCPUArchitectureMIPS64EL:
+ case kCPUArchitectureRISCV64:
return true;
case kCPUArchitectureX86:
case kCPUArchitectureARM:
case kCPUArchitectureMIPSEL:
+ case kCPUArchitectureRISCV:
return false;
default:
NOTREACHED();
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/cpu_context.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/cpu_context.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/cpu_context.h
@@ -352,6 +352,20 @@ struct CPUContextMIPS64 {
uint64_t fir;
};
+//! \brief A context structure carrying RISC CPU state.
+struct CPUContextRISCV {
+ uint32_t regs[32];
+ uint64_t fpregs[32];
+ uint32_t fcsr;
+};
+
+//! \brief A context structure carrying RISC64 CPU state.
+struct CPUContextRISCV64 {
+ uint64_t regs[32];
+ uint64_t fpregs[32];
+ uint32_t fcsr;
+};
+
//! \brief A context structure capable of carrying the context of any supported
//! CPU architecture.
struct CPUContext {
@@ -382,6 +396,8 @@ struct CPUContext {
CPUContextARM64* arm64;
CPUContextMIPS* mipsel;
CPUContextMIPS64* mips64;
+ CPUContextRISCV* riscv;
+ CPUContextRISCV64* riscv64;
};
};
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
@@ -266,6 +266,30 @@ void InitializeCPUContextARM64_OnlyFPSIM
context->fpcr = float_context.fpcr;
}
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+
+template <typename Traits>
+void InitializeCPUContextRISCV(
+ const typename Traits::SignalThreadContext& thread_context,
+ const typename Traits::SignalFloatContext& float_context,
+ typename Traits::CPUContext* context) {
+ static_assert(sizeof(context->regs) == sizeof(thread_context),
+ "registers size mismatch");
+ static_assert(sizeof(context->fpregs) == sizeof(float_context.f),
+ "fp registers size mismatch");
+ memcpy(&context->regs, &thread_context, sizeof(context->regs));
+ memcpy(&context->fpregs, &float_context, sizeof(context->fpregs));
+ context->fcsr = float_context.fcsr;
+}
+template void InitializeCPUContextRISCV<ContextTraits32>(
+ const ContextTraits32::SignalThreadContext& thread_context,
+ const ContextTraits32::SignalFloatContext& float_context,
+ ContextTraits32::CPUContext* context);
+template void InitializeCPUContextRISCV<ContextTraits64>(
+ const ContextTraits64::SignalThreadContext& thread_context,
+ const ContextTraits64::SignalFloatContext& float_context,
+ ContextTraits64::CPUContext* context);
+
#endif // ARCH_CPU_X86_FAMILY
} // namespace internal
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
@@ -174,6 +174,22 @@ void InitializeCPUContextMIPS(
#endif // ARCH_CPU_MIPS_FAMILY || DOXYGEN
+#if defined(ARCH_CPU_RISCV_FAMILY) || DOXYGEN
+
+//! \brief Initializes a CPUContextRISCV structure from native context
+//! structures on Linux.
+//!
+//! \param[in] thread_context The native thread context.
+//! \param[in] float_context The native float context.
+//! \param[out] context The CPUContextRISCV structure to initialize.
+template <typename Traits>
+void InitializeCPUContextRISCV(
+ const typename Traits::SignalThreadContext& thread_context,
+ const typename Traits::SignalFloatContext& float_context,
+ typename Traits::CPUContext* context);
+
+#endif // ARCH_CPU_RISCV_FAMILY || DOXYGEN
+
} // namespace internal
} // namespace crashpad
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
@@ -323,6 +323,61 @@ bool ExceptionSnapshotLinux::ReadContext
reader, context_address, context_.mips64);
}
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+
+template <typename Traits>
+static bool ReadContext(ProcessReaderLinux* reader,
+ LinuxVMAddress context_address,
+ typename Traits::CPUContext* dest_context) {
+ const ProcessMemory* memory = reader->Memory();
+
+ LinuxVMAddress gregs_address = context_address +
+ offsetof(UContext<Traits>, mcontext) +
+ offsetof(typename Traits::MContext, gregs);
+
+ typename Traits::SignalThreadContext thread_context;
+ if (!memory->Read(gregs_address, sizeof(thread_context), &thread_context)) {
+ LOG(ERROR) << "Couldn't read gregs";
+ return false;
+ }
+
+ LinuxVMAddress fpregs_address = context_address +
+ offsetof(UContext<Traits>, mcontext) +
+ offsetof(typename Traits::MContext, fpregs);
+
+ typename Traits::SignalFloatContext fp_context;
+ if (!memory->Read(fpregs_address, sizeof(fp_context), &fp_context)) {
+ LOG(ERROR) << "Couldn't read fpregs";
+ return false;
+ }
+
+ InitializeCPUContextRISCV<Traits>(thread_context, fp_context, dest_context);
+
+ return true;
+}
+
+template <>
+bool ExceptionSnapshotLinux::ReadContext<ContextTraits32>(
+ ProcessReaderLinux* reader,
+ LinuxVMAddress context_address) {
+ context_.architecture = kCPUArchitectureRISCV;
+ context_.riscv = &context_union_.riscv;
+
+ return internal::ReadContext<ContextTraits32>(
+ reader, context_address, context_.riscv);
+}
+
+template <>
+bool ExceptionSnapshotLinux::ReadContext<ContextTraits64>(
+ ProcessReaderLinux* reader,
+ LinuxVMAddress context_address) {
+ context_.architecture = kCPUArchitectureRISCV64;
+ context_.riscv64 = &context_union_.riscv64;
+
+ return internal::ReadContext<ContextTraits64>(
+ reader, context_address, context_.riscv64);
+}
+
#endif // ARCH_CPU_X86_FAMILY
bool ExceptionSnapshotLinux::Initialize(ProcessReaderLinux* process_reader,
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
@@ -84,6 +84,9 @@ class ExceptionSnapshotLinux final : pub
#elif defined(ARCH_CPU_MIPS_FAMILY)
CPUContextMIPS mipsel;
CPUContextMIPS64 mips64;
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ CPUContextRISCV riscv;
+ CPUContextRISCV64 riscv64;
#endif
} context_union_;
CPUContext context_;
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
@@ -108,6 +108,9 @@ void ProcessReaderLinux::Thread::Initial
#elif defined(ARCH_CPU_MIPS_FAMILY)
stack_pointer = reader->Is64Bit() ? thread_info.thread_context.t64.regs[29]
: thread_info.thread_context.t32.regs[29];
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ stack_pointer = reader->Is64Bit() ? thread_info.thread_context.t64.sp
+ : thread_info.thread_context.t32.sp;
#else
#error Port.
#endif
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
@@ -422,6 +422,67 @@ static_assert(offsetof(UContext<ContextT
"context offset mismatch");
#endif
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+
+struct MContext32 {
+ uint32_t gregs[32];
+ uint64_t fpregs[32];
+ unsigned int fcsr;
+};
+
+struct MContext64 {
+ uint64_t gregs[32];
+ uint64_t fpregs[32];
+ unsigned int fcsr;
+};
+
+struct ContextTraits32 : public Traits32 {
+ using MContext = MContext32;
+ using SignalThreadContext = ThreadContext::t32_t;
+ using SignalFloatContext = FloatContext::f32_t;
+ using CPUContext = CPUContextRISCV;
+};
+
+struct ContextTraits64 : public Traits64 {
+ using MContext = MContext64;
+ using SignalThreadContext = ThreadContext::t64_t;
+ using SignalFloatContext = FloatContext::f64_t;
+ using CPUContext = CPUContextRISCV64;
+};
+
+template <typename Traits>
+struct UContext {
+ typename Traits::ULong flags;
+ typename Traits::Address link;
+ SignalStack<Traits> stack;
+ Sigset<Traits> sigmask;
+ char padding[128 - sizeof(sigmask)];
+ typename Traits::Char_64Only padding2[8];
+ typename Traits::MContext mcontext;
+};
+
+#if defined(ARCH_CPU_RISCV)
+static_assert(offsetof(UContext<ContextTraits32>, mcontext) ==
+ offsetof(ucontext_t, uc_mcontext),
+ "context offset mismatch");
+static_assert(offsetof(UContext<ContextTraits32>, mcontext.gregs) ==
+ offsetof(ucontext_t, uc_mcontext.__gregs),
+ "context offset mismatch");
+static_assert(offsetof(UContext<ContextTraits32>, mcontext.fpregs) ==
+ offsetof(ucontext_t, uc_mcontext.__fpregs),
+ "context offset mismatch");
+#elif defined(ARCH_CPU_RISCV64)
+static_assert(offsetof(UContext<ContextTraits64>, mcontext) ==
+ offsetof(ucontext_t, uc_mcontext),
+ "context offset mismatch");
+static_assert(offsetof(UContext<ContextTraits64>, mcontext.gregs) ==
+ offsetof(ucontext_t, uc_mcontext.__gregs),
+ "context offset mismatch");
+static_assert(offsetof(UContext<ContextTraits64>, mcontext.fpregs) ==
+ offsetof(ucontext_t, uc_mcontext.__fpregs),
+ "context offset mismatch");
+#endif
+
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
@@ -204,6 +204,9 @@ CPUArchitecture SystemSnapshotLinux::Get
#elif defined(ARCH_CPU_MIPS_FAMILY)
return process_reader_->Is64Bit() ? kCPUArchitectureMIPS64EL
: kCPUArchitectureMIPSEL;
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ return process_reader_->Is64Bit() ? kCPUArchitectureRISCV64
+ : kCPUArchitectureRISCV;
#else
#error port to your architecture
#endif
@@ -219,6 +222,9 @@ uint32_t SystemSnapshotLinux::CPURevisio
#elif defined(ARCH_CPU_MIPS_FAMILY)
// Not implementable on MIPS
return 0;
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ // Not implementable on RISCV
+ return 0;
#else
#error port to your architecture
#endif
@@ -239,6 +245,9 @@ std::string SystemSnapshotLinux::CPUVend
#elif defined(ARCH_CPU_MIPS_FAMILY)
// Not implementable on MIPS
return std::string();
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ // Not implementable on RISCV
+ return std::string();
#else
#error port to your architecture
#endif
@@ -372,6 +381,9 @@ bool SystemSnapshotLinux::NXEnabled() co
#elif defined(ARCH_CPU_MIPS_FAMILY)
// Not implementable on MIPS
return false;
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ // Not implementable on RISCV
+ return false;
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
@@ -186,6 +186,22 @@ bool ThreadSnapshotLinux::Initialize(Pro
thread.thread_info.float_context.f32,
context_.mipsel);
}
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ if (process_reader->Is64Bit()) {
+ context_.architecture = kCPUArchitectureRISCV64;
+ context_.riscv64 = &context_union_.riscv64;
+ InitializeCPUContextRISCV<ContextTraits64>(
+ thread.thread_info.thread_context.t64,
+ thread.thread_info.float_context.f64,
+ context_.riscv64);
+ } else {
+ context_.architecture = kCPUArchitectureRISCV;
+ context_.riscv = &context_union_.riscv;
+ InitializeCPUContextRISCV<ContextTraits32>(
+ thread.thread_info.thread_context.t32,
+ thread.thread_info.float_context.f32,
+ context_.riscv);
+ }
#else
#error Port.
#endif
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
@@ -68,6 +68,9 @@ class ThreadSnapshotLinux final : public
#elif defined(ARCH_CPU_MIPS_FAMILY)
CPUContextMIPS mipsel;
CPUContextMIPS64 mips64;
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ CPUContextRISCV riscv;
+ CPUContextRISCV64 riscv64;
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/ptracer.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/ptracer.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/ptracer.cc
@@ -398,6 +398,96 @@ bool GetThreadArea64(pid_t tid,
return true;
}
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+
+template <typename Destination>
+bool GetRegisterSet(pid_t tid, int set, Destination* dest, bool can_log) {
+ iovec iov;
+ iov.iov_base = dest;
+ iov.iov_len = sizeof(*dest);
+ if (ptrace(PTRACE_GETREGSET, tid, reinterpret_cast<void*>(set), &iov) != 0) {
+ PLOG_IF(ERROR, can_log) << "ptrace";
+ return false;
+ }
+ if (iov.iov_len != sizeof(*dest)) {
+ LOG_IF(ERROR, can_log) << "Unexpected registers size";
+ return false;
+ }
+ return true;
+}
+
+bool GetFloatingPointRegisters32(pid_t tid,
+ FloatContext* context,
+ bool can_log) {
+ return false;
+}
+
+bool GetFloatingPointRegisters64(pid_t tid,
+ FloatContext* context,
+ bool can_log) {
+ return GetRegisterSet(tid, NT_PRFPREG, &context->f64.f, can_log);
+}
+
+bool GetThreadArea32(pid_t tid,
+ const ThreadContext& context,
+ LinuxVMAddress* address,
+ bool can_log) {
+ return false;
+}
+
+bool GetThreadArea64(pid_t tid,
+ const ThreadContext& context,
+ LinuxVMAddress* address,
+ bool can_log) {
+ *address = context.t64.tp;
+ return true;
+}
+
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+
+template <typename Destination>
+bool GetRegisterSet(pid_t tid, int set, Destination* dest, bool can_log) {
+ iovec iov;
+ iov.iov_base = dest;
+ iov.iov_len = sizeof(*dest);
+ if (ptrace(PTRACE_GETREGSET, tid, reinterpret_cast<void*>(set), &iov) != 0) {
+ PLOG_IF(ERROR, can_log) << "ptrace";
+ return false;
+ }
+ if (iov.iov_len != sizeof(*dest)) {
+ LOG_IF(ERROR, can_log) << "Unexpected registers size";
+ return false;
+ }
+ return true;
+}
+
+bool GetFloatingPointRegisters32(pid_t tid,
+ FloatContext* context,
+ bool can_log) {
+ return false;
+}
+
+bool GetFloatingPointRegisters64(pid_t tid,
+ FloatContext* context,
+ bool can_log) {
+ return GetRegisterSet(tid, NT_PRFPREG, &context->f64.f, can_log);
+}
+
+bool GetThreadArea32(pid_t tid,
+ const ThreadContext& context,
+ LinuxVMAddress* address,
+ bool can_log) {
+ return false;
+}
+
+bool GetThreadArea64(pid_t tid,
+ const ThreadContext& context,
+ LinuxVMAddress* address,
+ bool can_log) {
+ *address = context.t64.tp;
+ return true;
+}
+
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h
@@ -79,6 +79,40 @@ union ThreadContext {
uint32_t cp0_status;
uint32_t cp0_cause;
uint32_t padding1_;
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ // Reflects user_regs_struct in asm/ptrace.h.
+ uint32_t pc;
+ uint32_t ra;
+ uint32_t sp;
+ uint32_t gp;
+ uint32_t tp;
+ uint32_t t0;
+ uint32_t t1;
+ uint32_t t2;
+ uint32_t s0;
+ uint32_t s1;
+ uint32_t a0;
+ uint32_t a1;
+ uint32_t a2;
+ uint32_t a3;
+ uint32_t a4;
+ uint32_t a5;
+ uint32_t a6;
+ uint32_t a7;
+ uint32_t s2;
+ uint32_t s3;
+ uint32_t s4;
+ uint32_t s5;
+ uint32_t s6;
+ uint32_t s7;
+ uint32_t s8;
+ uint32_t s9;
+ uint32_t s10;
+ uint32_t s11;
+ uint32_t t3;
+ uint32_t t4;
+ uint32_t t5;
+ uint32_t t6;
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
@@ -132,6 +166,40 @@ union ThreadContext {
uint64_t cp0_badvaddr;
uint64_t cp0_status;
uint64_t cp0_cause;
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ // Reflects user_regs_struct in asm/ptrace.h.
+ uint64_t pc;
+ uint64_t ra;
+ uint64_t sp;
+ uint64_t gp;
+ uint64_t tp;
+ uint64_t t0;
+ uint64_t t1;
+ uint64_t t2;
+ uint64_t s0;
+ uint64_t s1;
+ uint64_t a0;
+ uint64_t a1;
+ uint64_t a2;
+ uint64_t a3;
+ uint64_t a4;
+ uint64_t a5;
+ uint64_t a6;
+ uint64_t a7;
+ uint64_t s2;
+ uint64_t s3;
+ uint64_t s4;
+ uint64_t s5;
+ uint64_t s6;
+ uint64_t s7;
+ uint64_t s8;
+ uint64_t s9;
+ uint64_t s10;
+ uint64_t s11;
+ uint64_t t3;
+ uint64_t t4;
+ uint64_t t5;
+ uint64_t t6;
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
@@ -143,11 +211,12 @@ union ThreadContext {
using NativeThreadContext = user_regs;
#elif defined(ARCH_CPU_MIPS_FAMILY)
// No appropriate NativeThreadsContext type available for MIPS
+#elif defined(ARCH_CPU_RISCV_FAMILY)
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY || ARCH_CPU_ARM64
-#if !defined(ARCH_CPU_MIPS_FAMILY)
+#if !defined(ARCH_CPU_MIPS_FAMILY) && !defined(ARCH_CPU_RISCV_FAMILY)
#if defined(ARCH_CPU_32_BITS)
static_assert(sizeof(t32_t) == sizeof(NativeThreadContext), "Size mismatch");
#else // ARCH_CPU_64_BITS
@@ -218,6 +287,9 @@ union FloatContext {
} fpregs[32];
uint32_t fpcsr;
uint32_t fpu_id;
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ uint64_t f[32];
+ uint32_t fcsr;
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
@@ -252,6 +324,9 @@ union FloatContext {
double fpregs[32];
uint32_t fpcsr;
uint32_t fpu_id;
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ uint64_t f[32];
+ uint32_t fcsr;
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
@@ -280,6 +355,7 @@ union FloatContext {
static_assert(sizeof(f64) == sizeof(user_fpsimd_struct), "Size mismatch");
#elif defined(ARCH_CPU_MIPS_FAMILY)
// No appropriate floating point context native type for available MIPS.
+#elif defined(ARCH_CPU_RISCV_FAMILY)
#else
#error Port.
#endif // ARCH_CPU_X86
File diff suppressed because it is too large Load Diff
@@ -1,520 +0,0 @@
riscv64 support patch taken from Opensuse:
https://build.opensuse.org/package/show/openSUSE:Factory:RISCV/libqt5-qtwebengine?rev=110
Index: qtwebengine-everywhere-src-5.15.19/configure.pri
===================================================================
--- qtwebengine-everywhere-src-5.15.19.orig/configure.pri
+++ qtwebengine-everywhere-src-5.15.19/configure.pri
@@ -157,6 +157,7 @@ defineTest(qtConfTest_detectArch) {
contains(QT_ARCH, "arm")|contains(QT_ARCH, "arm64"): return(true)
contains(QT_ARCH, "mips"): return(true)
contains(QT_ARCH, "mips64"): return(true)
+ contains(QT_ARCH, "riscv64"): return(true)
qtLog("Architecture not supported.")
return(false)
}
Index: qtwebengine-everywhere-src-5.15.19/mkspecs/features/functions.prf
===================================================================
--- qtwebengine-everywhere-src-5.15.19.orig/mkspecs/features/functions.prf
+++ qtwebengine-everywhere-src-5.15.19/mkspecs/features/functions.prf
@@ -112,6 +112,7 @@ defineReplace(gnArch) {
contains(qtArch, "mips"): return(mipsel)
contains(qtArch, "mips64"): return(mips64el)
contains(qtArch, "mips64el"): return(mips64el)
+ contains(qtArch, "riscv64"): return(riscv64)
return(unknown)
}
Index: qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/base/process/launch_posix.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.19.orig/src/3rdparty/chromium/base/process/launch_posix.cc
+++ qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/base/process/launch_posix.cc
@@ -704,7 +704,7 @@ NOINLINE pid_t CloneAndLongjmpInChild(un
alignas(16) char stack_buf[PTHREAD_STACK_MIN];
#if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \
defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_S390_FAMILY) || \
- defined(ARCH_CPU_PPC64_FAMILY)
+ defined(ARCH_CPU_PPC64_FAMILY) || defined(ARCH_CPU_RISCV_FAMILY)
// The stack grows downward.
void* stack = stack_buf + sizeof(stack_buf);
#else
Index: qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/build/build_config.h
===================================================================
--- qtwebengine-everywhere-src-5.15.19.orig/src/3rdparty/chromium/build/build_config.h
+++ qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/build/build_config.h
@@ -193,6 +193,11 @@
#define ARCH_CPU_32_BITS 1
#define ARCH_CPU_BIG_ENDIAN 1
#endif
+#elif defined(__riscv) && __riscv_xlen == 64
+#define ARCH_CPU_RISCV_FAMILY 1
+#define ARCH_CPU_RISCV64 1
+#define ARCH_CPU_64_BITS 1
+#define ARCH_CPU_LITTLE_ENDIAN 1
#else
#error Please add support for your architecture in build/build_config.h
#endif
Index: qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn
===================================================================
--- qtwebengine-everywhere-src-5.15.19.orig/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn
+++ qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/build/toolchain/linux/BUILD.gn
@@ -290,3 +290,20 @@ gcc_toolchain("mips64") {
is_clang = false
}
}
+
+gcc_toolchain("riscv64") {
+ cc = "gcc"
+ cxx = "g++"
+
+ readelf = "readelf"
+ nm = "nm"
+ ar = "ar"
+ ld = cxx
+
+ toolchain_args = {
+ current_cpu = "riscv64"
+ current_os = "linux"
+ is_clang = false
+ }
+}
+
Index: qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/skia/BUILD.gn
===================================================================
--- qtwebengine-everywhere-src-5.15.19.orig/src/3rdparty/chromium/skia/BUILD.gn
+++ qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/skia/BUILD.gn
@@ -821,6 +821,8 @@ skia_source_set("skia_opts") {
sources = skia_opts.none_sources
} else if (current_cpu == "s390x") {
sources = skia_opts.none_sources
+ } else if (current_cpu == "riscv64") {
+ sources = skia_opts.none_sources
} else {
assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp")
}
Index: qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/third_party/angle/gni/angle.gni
===================================================================
--- qtwebengine-everywhere-src-5.15.19.orig/src/3rdparty/chromium/third_party/angle/gni/angle.gni
+++ qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/third_party/angle/gni/angle.gni
@@ -54,7 +54,7 @@ angle_data_dir = "angledata"
declare_args() {
if (current_cpu == "arm64" || current_cpu == "x64" ||
current_cpu == "mips64el" || current_cpu == "s390x" ||
- current_cpu == "ppc64") {
+ current_cpu == "ppc64" || current_cpu == "riscv64") {
angle_64bit_current_cpu = true
} else if (current_cpu == "arm" || current_cpu == "x86" ||
current_cpu == "mipsel" || current_cpu == "s390" ||
Index: qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/third_party/angle/include/platform/PlatformMethods.h
===================================================================
--- qtwebengine-everywhere-src-5.15.19.orig/src/3rdparty/chromium/third_party/angle/include/platform/PlatformMethods.h
+++ qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/third_party/angle/include/platform/PlatformMethods.h
@@ -9,6 +9,7 @@
#ifndef ANGLE_PLATFORMMETHODS_H
#define ANGLE_PLATFORMMETHODS_H
+#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <array>
Index: qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/asm/BUILD.gn
===================================================================
--- qtwebengine-everywhere-src-5.15.19.orig/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/asm/BUILD.gn
+++ qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/asm/BUILD.gn
@@ -38,6 +38,8 @@ if (current_cpu == "x86" || current_cpu
sources = [ "SaveRegisters_mips64.S" ]
} else if (current_cpu == "ppc64") {
sources = [ "SaveRegisters_ppc64.S" ]
+ } else if (current_cpu == "riscv64") {
+ sources = [ "SaveRegisters_riscv64.S" ]
}
if (current_cpu == "arm") {
Index: qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/asm/SaveRegisters_riscv64.S
===================================================================
--- /dev/null
+++ qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/third_party/blink/renderer/platform/heap/asm/SaveRegisters_riscv64.S
@@ -0,0 +1,45 @@
+/*
+ * typedef void (*PushAllRegistersCallback)(ThreadState*, intptr_t*);
+ * extern "C" void PushAllRegisters(ThreadState*, PushAllRegistersCallback)
+ */
+
+.type PushAllRegisters, %function
+.global PushAllRegisters
+.hidden PushAllRegisters
+PushAllRegisters:
+ /* Push all callee-saves registers to get them
+ * on the stack for conservative stack scanning.
+ * Reserve space for callee-saved registers and return address.
+ */
+ addi sp,sp,-112
+ /* Save the callee-saved registers and the return address. */
+ sd ra,0(sp)
+ sd s0,8(sp)
+ sd s1,16(sp)
+ sd s2,24(sp)
+ sd s3,32(sp)
+ sd s4,40(sp)
+ sd s5,48(sp)
+ sd s6,56(sp)
+ sd s7,64(sp)
+ sd s8,72(sp)
+ sd s9,80(sp)
+ sd s10,88(sp)
+ sd s11,96(sp)
+ /* Note: the callee-saved floating point registers do not need to be
+ * copied to the stack, because fp registers never hold heap pointers
+ * and so do not need to be kept visible to the garbage collector.
+ * Pass the first argument untouched in a0 and the
+ * stack pointer to the callback.
+ */
+ mv ra,a1
+ mv a1,sp
+ jalr ra
+ /* Restore return address, adjust stack and return.
+ * Note: the copied registers do not need to be reloaded here,
+ * because they were preserved by the called routine.
+ */
+ ld ra,0(sp)
+ addi sp,sp,112
+ ret
+.size PushAllRegisters, . - PushAllRegisters
Index: qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/third_party/boringssl/src/include/openssl/base.h
===================================================================
--- qtwebengine-everywhere-src-5.15.19.orig/src/3rdparty/chromium/third_party/boringssl/src/include/openssl/base.h
+++ qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/third_party/boringssl/src/include/openssl/base.h
@@ -105,6 +105,8 @@ extern "C" {
#elif defined(__mips__) && defined(__LP64__)
#define OPENSSL_64_BIT
#define OPENSSL_MIPS64
+#elif defined(__riscv) && __SIZEOF_POINTER__ == 8
+#define OPENSSL_64_BIT
#elif defined(__pnacl__)
#define OPENSSL_32_BIT
#define OPENSSL_PNACL
Index: qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/third_party/dav1d/config/linux/riscv64/config.h
===================================================================
--- /dev/null
+++ qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/third_party/dav1d/config/linux/riscv64/config.h
@@ -0,0 +1,38 @@
+/*
+ * Autogenerated by the Meson build system.
+ * Do not edit, your changes will be lost.
+ */
+
+#pragma once
+
+#define ARCH_AARCH64 0
+
+#define ARCH_ARM 0
+
+#define ARCH_PPC64LE 0
+
+#define ARCH_X86 0
+
+#define ARCH_X86_32 0
+
+#define ARCH_X86_64 0
+
+#define CONFIG_16BPC 1
+
+#define CONFIG_8BPC 1
+
+// #define CONFIG_LOG 1 -- Logging is controlled by Chromium
+
+#define ENDIANNESS_BIG 0
+
+#define HAVE_ASM 0
+
+#define HAVE_AS_FUNC 0
+
+#define HAVE_CLOCK_GETTIME 1
+
+#define HAVE_GETAUXVAL 1
+
+#define HAVE_POSIX_MEMALIGN 1
+
+#define HAVE_UNISTD_H 1
Index: qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h
===================================================================
--- qtwebengine-everywhere-src-5.15.19.orig/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h
+++ qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/third_party/lss/linux_syscall_support.h
@@ -88,7 +88,7 @@
*/
#if (defined(__i386__) || defined(__x86_64__) || defined(__ARM_ARCH_3__) || \
defined(__mips__) || defined(__PPC__) || defined(__ARM_EABI__) || \
- defined(__aarch64__) || defined(__s390__)) \
+ defined(__aarch64__) || defined(__s390__) || defined(__riscv)) \
&& (defined(__linux) || defined(__ANDROID__))
#ifndef SYS_CPLUSPLUS
@@ -301,7 +301,7 @@ struct kernel_old_sigaction {
} __attribute__((packed,aligned(4)));
#elif (defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI32)
#define kernel_old_sigaction kernel_sigaction
-#elif defined(__aarch64__)
+#elif defined(__aarch64__) || defined(__riscv)
// No kernel_old_sigaction defined for arm64.
#endif
@@ -341,7 +341,9 @@ struct kernel_sigaction {
void (*sa_sigaction_)(int, siginfo_t *, void *);
};
unsigned long sa_flags;
+#ifndef __riscv
void (*sa_restorer)(void);
+#endif
struct kernel_sigset_t sa_mask;
#endif
};
@@ -519,7 +521,7 @@ struct kernel_stat {
int st_blocks;
int st_pad4[14];
};
-#elif defined(__aarch64__)
+#elif defined(__aarch64__) || defined(__riscv)
struct kernel_stat {
unsigned long st_dev;
unsigned long st_ino;
@@ -1065,7 +1067,7 @@ struct kernel_statfs {
#define __NR_getrandom (__NR_SYSCALL_BASE + 384)
#endif
/* End of ARM 3/EABI definitions */
-#elif defined(__aarch64__)
+#elif defined(__aarch64__) || defined(__riscv)
#ifndef __NR_setxattr
#define __NR_setxattr 5
#endif
@@ -1880,7 +1882,7 @@ struct kernel_statfs {
#undef LSS_RETURN
#if (defined(__i386__) || defined(__x86_64__) || defined(__ARM_ARCH_3__) \
- || defined(__ARM_EABI__) || defined(__aarch64__) || defined(__s390__))
+ || defined(__ARM_EABI__) || defined(__aarch64__) || defined(__s390__) || defined(__riscv))
/* Failing system calls return a negative result in the range of
* -1..-4095. These are "errno" values with the sign inverted.
*/
@@ -3373,6 +3375,122 @@ struct kernel_statfs {
}
LSS_RETURN(int, __ret);
}
+ #elif defined(__riscv)
+ #undef LSS_REG
+ #define LSS_REG(r,a) register int64_t __r##r __asm__("a"#r) = (int64_t)a
+ #undef LSS_BODY
+ #define LSS_BODY(type,name,args...) \
+ register int64_t __res_a0 __asm__("a0"); \
+ register int64_t __a7 __asm__("a7") = __NR_##name; \
+ int64_t __res; \
+ __asm__ __volatile__ ("scall\n" \
+ : "=r"(__res_a0) \
+ : "r"(__a7) , ## args \
+ : "memory"); \
+ __res = __res_a0; \
+ LSS_RETURN(type, __res)
+ #undef _syscall0
+ #define _syscall0(type, name) \
+ type LSS_NAME(name)(void) { \
+ LSS_BODY(type, name); \
+ }
+ #undef _syscall1
+ #define _syscall1(type, name, type1, arg1) \
+ type LSS_NAME(name)(type1 arg1) { \
+ LSS_REG(0, arg1); LSS_BODY(type, name, "r"(__r0)); \
+ }
+ #undef _syscall2
+ #define _syscall2(type, name, type1, arg1, type2, arg2) \
+ type LSS_NAME(name)(type1 arg1, type2 arg2) { \
+ LSS_REG(0, arg1); LSS_REG(1, arg2); \
+ LSS_BODY(type, name, "r"(__r0), "r"(__r1)); \
+ }
+ #undef _syscall3
+ #define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \
+ type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3) { \
+ LSS_REG(0, arg1); LSS_REG(1, arg2); LSS_REG(2, arg3); \
+ LSS_BODY(type, name, "r"(__r0), "r"(__r1), "r"(__r2)); \
+ }
+ #undef _syscall4
+ #define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
+ type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \
+ LSS_REG(0, arg1); LSS_REG(1, arg2); LSS_REG(2, arg3); \
+ LSS_REG(3, arg4); \
+ LSS_BODY(type, name, "r"(__r0), "r"(__r1), "r"(__r2), "r"(__r3)); \
+ }
+ #undef _syscall5
+ #define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
+ type5,arg5) \
+ type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \
+ type5 arg5) { \
+ LSS_REG(0, arg1); LSS_REG(1, arg2); LSS_REG(2, arg3); \
+ LSS_REG(3, arg4); LSS_REG(4, arg5); \
+ LSS_BODY(type, name, "r"(__r0), "r"(__r1), "r"(__r2), "r"(__r3), \
+ "r"(__r4)); \
+ }
+ #undef _syscall6
+ #define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
+ type5,arg5,type6,arg6) \
+ type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \
+ type5 arg5, type6 arg6) { \
+ LSS_REG(0, arg1); LSS_REG(1, arg2); LSS_REG(2, arg3); \
+ LSS_REG(3, arg4); LSS_REG(4, arg5); LSS_REG(5, arg6); \
+ LSS_BODY(type, name, "r"(__r0), "r"(__r1), "r"(__r2), "r"(__r3), \
+ "r"(__r4), "r"(__r5)); \
+ }
+
+ LSS_INLINE int LSS_NAME(clone)(int (*fn)(void *), void *child_stack,
+ int flags, void *arg, int *parent_tidptr,
+ void *newtls, int *child_tidptr) {
+ int64_t __res;
+ {
+ register int64_t __res_a0 __asm__("a0");
+ register uint64_t __flags __asm__("a0") = flags;
+ register void *__stack __asm__("a1") = child_stack;
+ register void *__ptid __asm__("a2") = parent_tidptr;
+ register void *__tls __asm__("a3") = newtls;
+ register int *__ctid __asm__("a4") = child_tidptr;
+ __asm__ __volatile__(/* Push "arg" and "fn" onto the stack that will be
+ * used by the child.
+ */
+ "addi %2,%2,-16\n"
+ "sd %1, 0(%2)\n"
+ "sd %4, 8(%2)\n"
+
+ /* %a0 = syscall(%a0 = flags,
+ * %a1 = child_stack,
+ * %a2 = parent_tidptr,
+ * %a3 = newtls,
+ * %a4 = child_tidptr)
+ */
+ "li a7, %8\n"
+ "scall\n"
+
+ /* if (%a0 != 0)
+ * return %a0;
+ */
+ "bnez %0, 1f\n"
+
+ /* In the child, now. Call "fn(arg)".
+ */
+ "ld a1, 0(sp)\n"
+ "ld a0, 8(sp)\n"
+ "jalr a1\n"
+
+ /* Call _exit(%a0).
+ */
+ "li a7, %9\n"
+ "scall\n"
+ "1:\n"
+ : "=r" (__res_a0)
+ : "r"(fn), "r"(__stack), "r"(__flags), "r"(arg),
+ "r"(__ptid), "r"(__tls), "r"(__ctid),
+ "i"(__NR_clone), "i"(__NR_exit)
+ : "cc", "memory");
+ __res = __res_a0;
+ }
+ LSS_RETURN(int, __res);
+ }
#endif
#define __NR__exit __NR_exit
#define __NR__gettid __NR_gettid
@@ -4181,7 +4299,7 @@ struct kernel_statfs {
LSS_SC_BODY(4, int, 8, d, type, protocol, sv);
}
#endif
- #if defined(__ARM_EABI__) || defined (__aarch64__)
+ #if defined(__ARM_EABI__) || defined (__aarch64__) || defined(__riscv)
LSS_INLINE _syscall3(ssize_t, recvmsg, int, s, struct kernel_msghdr*, msg,
int, flags)
LSS_INLINE _syscall3(ssize_t, sendmsg, int, s, const struct kernel_msghdr*,
@@ -4503,7 +4621,7 @@ struct kernel_statfs {
// TODO: define this in an arch-independant way instead of inlining the clone
// syscall body.
-# if defined(__aarch64__)
+# if defined(__aarch64__) || defined(__riscv)
LSS_INLINE pid_t LSS_NAME(fork)(void) {
// No fork syscall on aarch64 - implement by means of the clone syscall.
// Note that this does not reset glibc's cached view of the PID/TID, so
Index: qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/third_party/swiftshader/third_party/llvm-10.0/BUILD.gn
===================================================================
--- qtwebengine-everywhere-src-5.15.19.orig/src/3rdparty/chromium/third_party/swiftshader/third_party/llvm-10.0/BUILD.gn
+++ qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/third_party/swiftshader/third_party/llvm-10.0/BUILD.gn
@@ -149,6 +149,7 @@ swiftshader_llvm_source_set("swiftshader
deps += [ ":swiftshader_llvm_ppc" ]
} else if (current_cpu == "x86" || current_cpu == "x64") {
deps += [ ":swiftshader_llvm_x86" ]
+ } else if (current_cpu == "riscv64") {
} else {
assert(false, "Unsupported current_cpu")
}
Index: qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/differ_block.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.19.orig/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/differ_block.cc
+++ qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/differ_block.cc
@@ -30,7 +30,7 @@ bool VectorDifference(const uint8_t* ima
static bool (*diff_proc)(const uint8_t*, const uint8_t*) = nullptr;
if (!diff_proc) {
-#if defined(WEBRTC_ARCH_ARM_FAMILY) || defined(WEBRTC_ARCH_MIPS_FAMILY)
+#if defined(WEBRTC_ARCH_ARM_FAMILY) || defined(WEBRTC_ARCH_MIPS_FAMILY) || defined(WEBRTC_ARCH_RISCV_FAMILY)
// For ARM and MIPS processors, always use C version.
// TODO(hclam): Implement a NEON version.
diff_proc = &VectorDifference_C;
Index: qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/third_party/webrtc/rtc_base/system/arch.h
===================================================================
--- qtwebengine-everywhere-src-5.15.19.orig/src/3rdparty/chromium/third_party/webrtc/rtc_base/system/arch.h
+++ qtwebengine-everywhere-src-5.15.19/src/3rdparty/chromium/third_party/webrtc/rtc_base/system/arch.h
@@ -50,6 +50,10 @@
#elif defined(__EMSCRIPTEN__)
#define WEBRTC_ARCH_32_BITS
#define WEBRTC_ARCH_LITTLE_ENDIAN
+#elif defined(__riscv) && __riscv_xlen == 64
+#define WEBRTC_ARCH_RISCV_FAMILY
+#define WEBRTC_ARCH_64_BITS
+#define WEBRTC_ARCH_LITTLE_ENDIAN
#else
#error Please add support for your architecture in rtc_base/system/arch.h
#endif
Index: qtwebengine-everywhere-src-5.15.19/src/3rdparty/gn/tools/gn/args.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.19.orig/src/3rdparty/gn/tools/gn/args.cc
+++ qtwebengine-everywhere-src-5.15.19/src/3rdparty/gn/tools/gn/args.cc
@@ -329,6 +329,7 @@ void Args::SetSystemVarsLocked(Scope* de
static const char kMips64[] = "mips64el";
static const char kS390X[] = "s390x";
static const char kPPC64[] = "ppc64";
+ static const char kRiscv64[] = "riscv64";
const char* arch = nullptr;
// Set the host CPU architecture based on the underlying OS, not
@@ -353,6 +354,8 @@ void Args::SetSystemVarsLocked(Scope* de
// This allows us to use the same toolchain as ppc64 BE
// and specific flags are included using the host_byteorder logic.
arch = kPPC64;
+ else if (os_arch == "riscv64")
+ arch = kRiscv64;
else
CHECK(false) << "OS architecture not handled. (" << os_arch << ")";
Index: qtwebengine-everywhere-src-5.15.19/src/3rdparty/gn/util/build_config.h
===================================================================
--- qtwebengine-everywhere-src-5.15.19.orig/src/3rdparty/gn/util/build_config.h
+++ qtwebengine-everywhere-src-5.15.19/src/3rdparty/gn/util/build_config.h
@@ -172,6 +172,16 @@
#define ARCH_CPU_32_BITS 1
#define ARCH_CPU_BIG_ENDIAN 1
#endif
+#elif defined(__riscv)
+#define ARCH_CPU_RISCV_FAMILY 1
+#if __riscv_xlen == 64
+#define ARCH_CPU_RISCV64 1
+#define ARCH_CPU_64_BITS 1
+#else
+#define ARCH_CPU_RISCV32 1
+#define ARCH_CPU_32_BITS 1
+#endif
+#define ARCH_CPU_LITTLE_ENDIAN 1
#else
#error Please add support for your architecture in build_config.h
#endif
File diff suppressed because it is too large Load Diff
@@ -1,497 +0,0 @@
From 6e554a30893150793c2638e3689cf208ffc8e375 Mon Sep 17 00:00:00 2001
From: Dale Curtis <dalecurtis@chromium.org>
Date: Sat, 2 Apr 2022 05:13:53 +0000
Subject: [PATCH] Roll src/third_party/ffmpeg/ 574c39cce..32b2d1d526 (1125
commits)
https://chromium.googlesource.com/chromium/third_party/ffmpeg.git/+log/574c39cce323..32b2d1d526
Created with:
roll-dep src/third_party/ffmpeg
Fixed: 1293918
Cq-Include-Trybots: luci.chromium.try:mac_chromium_asan_rel_ng,linux_chromium_asan_rel_ng,linux_chromium_chromeos_asan_rel_ng
Change-Id: I41945d0f963e3d1f65940067bac22f63b68e37d2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3565647
Auto-Submit: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#988253}
---
.../clear_key_cdm/ffmpeg_cdm_audio_decoder.cc | 29 ++++++++++---------
media/ffmpeg/ffmpeg_common.cc | 11 +++----
media/filters/audio_file_reader.cc | 9 +++---
media/filters/audio_file_reader_unittest.cc | 6 ++--
.../filters/audio_video_metadata_extractor.cc | 11 +++++--
.../filters/ffmpeg_aac_bitstream_converter.cc | 7 +++--
...ffmpeg_aac_bitstream_converter_unittest.cc | 2 +-
media/filters/ffmpeg_audio_decoder.cc | 13 +++++----
8 files changed, 51 insertions(+), 37 deletions(-)
diff --git a/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc b/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc
index e4fc3f460e2..9b1ad9f7675 100644
--- a/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc
+++ b/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc
@@ -74,7 +74,7 @@ void CdmAudioDecoderConfigToAVCodecContext(
codec_context->sample_fmt = AV_SAMPLE_FMT_NONE;
}
- codec_context->channels = config.channel_count;
+ codec_context->ch_layout.nb_channels = config.channel_count;
codec_context->sample_rate = config.samples_per_second;
if (config.extra_data) {
@@ -124,8 +124,8 @@ void CopySamples(cdm::AudioFormat cdm_format,
case cdm::kAudioFormatPlanarS16:
case cdm::kAudioFormatPlanarF32: {
const int decoded_size_per_channel =
- decoded_audio_size / av_frame.channels;
- for (int i = 0; i < av_frame.channels; ++i) {
+ decoded_audio_size / av_frame.ch_layout.nb_channels;
+ for (int i = 0; i < av_frame.ch_layout.nb_channels; ++i) {
memcpy(output_buffer, av_frame.extended_data[i],
decoded_size_per_channel);
output_buffer += decoded_size_per_channel;
@@ -185,13 +185,14 @@ bool FFmpegCdmAudioDecoder::Initialize(
// Success!
decoding_loop_.reset(new FFmpegDecodingLoop(codec_context_.get()));
samples_per_second_ = config.samples_per_second;
- bytes_per_frame_ = codec_context_->channels * config.bits_per_channel / 8;
+ bytes_per_frame_ =
+ codec_context_->ch_layout.nb_channels * config.bits_per_channel / 8;
output_timestamp_helper_.reset(
new AudioTimestampHelper(config.samples_per_second));
is_initialized_ = true;
// Store initial values to guard against midstream configuration changes.
- channels_ = codec_context_->channels;
+ channels_ = codec_context_->ch_layout.nb_channels;
av_sample_format_ = codec_context_->sample_fmt;
return true;
@@ -291,17 +292,18 @@ cdm::Status FFmpegCdmAudioDecoder::DecodeBuffer(
for (auto& frame : audio_frames) {
int decoded_audio_size = 0;
if (frame->sample_rate != samples_per_second_ ||
- frame->channels != channels_ || frame->format != av_sample_format_) {
+ frame->ch_layout.nb_channels != channels_ ||
+ frame->format != av_sample_format_) {
DLOG(ERROR) << "Unsupported midstream configuration change!"
<< " Sample Rate: " << frame->sample_rate << " vs "
- << samples_per_second_ << ", Channels: " << frame->channels
+ << samples_per_second_ << ", Channels: " << frame->ch_layout.nb_channels
<< " vs " << channels_ << ", Sample Format: " << frame->format
<< " vs " << av_sample_format_;
return cdm::kDecodeError;
}
decoded_audio_size = av_samples_get_buffer_size(
- nullptr, codec_context_->channels, frame->nb_samples,
+ nullptr, codec_context_->ch_layout.nb_channels, frame->nb_samples,
codec_context_->sample_fmt, 1);
if (!decoded_audio_size)
continue;
@@ -320,7 +323,7 @@ bool FFmpegCdmAudioDecoder::OnNewFrame(
size_t* total_size,
std::vector<std::unique_ptr<AVFrame, ScopedPtrAVFreeFrame>>* audio_frames,
AVFrame* frame) {
- *total_size += av_samples_get_buffer_size(nullptr, codec_context_->channels,
+ *total_size += av_samples_get_buffer_size(nullptr, codec_context_->ch_layout.nb_channels,
frame->nb_samples,
codec_context_->sample_fmt, 1);
audio_frames->emplace_back(av_frame_clone(frame));
diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc
index 87ca8969626..76f03d6608e 100644
--- a/media/ffmpeg/ffmpeg_common.cc
+++ b/media/ffmpeg/ffmpeg_common.cc
@@ -345,10 +345,11 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context,
codec_context->sample_fmt, codec_context->codec_id);
ChannelLayout channel_layout =
- codec_context->channels > 8
+ codec_context->ch_layout.nb_channels > 8
? CHANNEL_LAYOUT_DISCRETE
- : ChannelLayoutToChromeChannelLayout(codec_context->channel_layout,
- codec_context->channels);
+ : ChannelLayoutToChromeChannelLayout(
+ codec_context->ch_layout.u.mask,
+ codec_context->ch_layout.nb_channels);
int sample_rate = codec_context->sample_rate;
switch (codec) {
@@ -401,7 +402,7 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context,
extra_data, encryption_scheme, seek_preroll,
codec_context->delay);
if (channel_layout == CHANNEL_LAYOUT_DISCRETE)
- config->SetChannelsForDiscrete(codec_context->channels);
+ config->SetChannelsForDiscrete(codec_context->ch_layout.nb_channels);
#if BUILDFLAG(ENABLE_PLATFORM_AC3_EAC3_AUDIO)
// These are bitstream formats unknown to ffmpeg, so they don't have
@@ -470,7 +471,7 @@ void AudioDecoderConfigToAVCodecContext(const AudioDecoderConfig& config,
// TODO(scherkus): should we set |channel_layout|? I'm not sure if FFmpeg uses
// said information to decode.
- codec_context->channels = config.channels();
+ codec_context->ch_layout.nb_channels = config.channels();
codec_context->sample_rate = config.samples_per_second();
if (config.extra_data().empty()) {
diff --git a/media/filters/audio_file_reader.cc b/media/filters/audio_file_reader.cc
index 5f257bdfaa6..e1be5aa9a5b 100644
--- a/media/filters/audio_file_reader.cc
+++ b/media/filters/audio_file_reader.cc
@@ -113,14 +113,15 @@ bool AudioFileReader::OpenDecoder() {
// Verify the channel layout is supported by Chrome. Acts as a sanity check
// against invalid files. See http://crbug.com/171962
- if (ChannelLayoutToChromeChannelLayout(codec_context_->channel_layout,
- codec_context_->channels) ==
+ if (ChannelLayoutToChromeChannelLayout(
+ codec_context_->ch_layout.u.mask,
+ codec_context_->ch_layout.nb_channels) ==
CHANNEL_LAYOUT_UNSUPPORTED) {
return false;
}
// Store initial values to guard against midstream configuration changes.
- channels_ = codec_context_->channels;
+ channels_ = codec_context_->ch_layout.nb_channels;
audio_codec_ = CodecIDToAudioCodec(codec_context_->codec_id);
sample_rate_ = codec_context_->sample_rate;
av_sample_format_ = codec_context_->sample_fmt;
@@ -223,7 +224,7 @@ bool AudioFileReader::OnNewFrame(
if (frames_read < 0)
return false;
- const int channels = frame->channels;
+ const int channels = frame->ch_layout.nb_channels;
if (frame->sample_rate != sample_rate_ || channels != channels_ ||
frame->format != av_sample_format_) {
DLOG(ERROR) << "Unsupported midstream configuration change!"
diff --git a/media/filters/ffmpeg_aac_bitstream_converter.cc b/media/filters/ffmpeg_aac_bitstream_converter.cc
index 6f231c85729..ca5e5fb927d 100644
--- a/media/filters/ffmpeg_aac_bitstream_converter.cc
+++ b/media/filters/ffmpeg_aac_bitstream_converter.cc
@@ -195,14 +195,15 @@ bool FFmpegAACBitstreamConverter::ConvertPacket(AVPacket* packet) {
if (!header_generated_ || codec_ != stream_codec_parameters_->codec_id ||
audio_profile_ != stream_codec_parameters_->profile ||
sample_rate_index_ != sample_rate_index ||
- channel_configuration_ != stream_codec_parameters_->channels ||
+ channel_configuration_ !=
+ stream_codec_parameters_->ch_layout.nb_channels ||
frame_length_ != header_plus_packet_size) {
header_generated_ =
GenerateAdtsHeader(stream_codec_parameters_->codec_id,
0, // layer
stream_codec_parameters_->profile, sample_rate_index,
0, // private stream
- stream_codec_parameters_->channels,
+ stream_codec_parameters_->ch_layout.nb_channels,
0, // originality
0, // home
0, // copyrighted_stream
@@ -214,7 +215,7 @@ bool FFmpegAACBitstreamConverter::ConvertPacket(AVPacket* packet) {
codec_ = stream_codec_parameters_->codec_id;
audio_profile_ = stream_codec_parameters_->profile;
sample_rate_index_ = sample_rate_index;
- channel_configuration_ = stream_codec_parameters_->channels;
+ channel_configuration_ = stream_codec_parameters_->ch_layout.nb_channels;
frame_length_ = header_plus_packet_size;
}
diff --git a/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc b/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc
index 1fd4c5ccd7d..f59bcd8fdaf 100644
--- a/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc
+++ b/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc
@@ -34,7 +34,7 @@ class FFmpegAACBitstreamConverterTest : public testing::Test {
memset(&test_parameters_, 0, sizeof(AVCodecParameters));
test_parameters_.codec_id = AV_CODEC_ID_AAC;
test_parameters_.profile = FF_PROFILE_AAC_MAIN;
- test_parameters_.channels = 2;
+ test_parameters_.ch_layout.nb_channels = 2;
test_parameters_.extradata = extradata_header_;
test_parameters_.extradata_size = sizeof(extradata_header_);
}
diff --git a/media/filters/ffmpeg_audio_decoder.cc b/media/filters/ffmpeg_audio_decoder.cc
index 6a56c675f7d..4615fdeb3fb 100644
--- a/media/filters/ffmpeg_audio_decoder.cc
+++ b/media/filters/ffmpeg_audio_decoder.cc
@@ -28,7 +28,7 @@ namespace media {
// Return the number of channels from the data in |frame|.
static inline int DetermineChannels(AVFrame* frame) {
- return frame->channels;
+ return frame->ch_layout.nb_channels;
}
// Called by FFmpeg's allocation routine to allocate a buffer. Uses
@@ -231,7 +231,7 @@ bool FFmpegAudioDecoder::OnNewFrame(const DecoderBuffer& buffer,
// Translate unsupported into discrete layouts for discrete configurations;
// ffmpeg does not have a labeled discrete configuration internally.
ChannelLayout channel_layout = ChannelLayoutToChromeChannelLayout(
- codec_context_->channel_layout, codec_context_->channels);
+ codec_context_->ch_layout.u.mask, codec_context_->ch_layout.nb_channels);
if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED &&
config_.channel_layout() == CHANNEL_LAYOUT_DISCRETE) {
channel_layout = CHANNEL_LAYOUT_DISCRETE;
@@ -348,11 +348,11 @@ bool FFmpegAudioDecoder::ConfigureDecoder(const AudioDecoderConfig& config) {
// Success!
av_sample_format_ = codec_context_->sample_fmt;
- if (codec_context_->channels != config.channels()) {
+ if (codec_context_->ch_layout.nb_channels != config.channels()) {
MEDIA_LOG(ERROR, media_log_)
<< "Audio configuration specified " << config.channels()
<< " channels, but FFmpeg thinks the file contains "
- << codec_context_->channels << " channels";
+ << codec_context_->ch_layout.nb_channels << " channels";
ReleaseFFmpegResources();
state_ = DecoderState::kUninitialized;
return false;
@@ -403,7 +403,7 @@ int FFmpegAudioDecoder::GetAudioBuffer(struct AVCodecContext* s,
if (frame->nb_samples <= 0)
return AVERROR(EINVAL);
- if (s->channels != channels) {
+ if (s->ch_layout.nb_channels != channels) {
DLOG(ERROR) << "AVCodecContext and AVFrame disagree on channel count.";
return AVERROR(EINVAL);
}
@@ -436,7 +436,8 @@ int FFmpegAudioDecoder::GetAudioBuffer(struct AVCodecContext* s,
ChannelLayout channel_layout =
config_.channel_layout() == CHANNEL_LAYOUT_DISCRETE
? CHANNEL_LAYOUT_DISCRETE
- : ChannelLayoutToChromeChannelLayout(s->channel_layout, s->channels);
+ : ChannelLayoutToChromeChannelLayout(s->ch_layout.u.mask,
+ s->ch_layout.nb_channels);
if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED) {
DLOG(ERROR) << "Unsupported channel layout.";
commit 62274859104bd828373ae406aa9309e610449ac5
Author: Ted Meyer <tmathmeyer@chromium.org>
Date: Fri Mar 22 19:56:55 2024 +0000
Replace deprecated use of AVCodecContext::reordered_opaque
We can use the AV_CODEC_FLAG_COPY_OPAQUE flag on the codec context
now to trigger timestamp propagation.
Bug: 330573128
Change-Id: I6bc57241a35ab5283742aad8d42acb4dc5e85858
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5384308
Commit-Queue: Ted (Chromium) Meyer <tmathmeyer@chromium.org>
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1277051}
diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
index bd75477feeabb..8a658a58caac5 100644
--- a/media/filters/ffmpeg_video_decoder.cc
+++ b/media/filters/ffmpeg_video_decoder.cc
@@ -134,7 +134,7 @@ bool FFmpegVideoDecoder::IsCodecSupported(VideoCodec codec) {
}
FFmpegVideoDecoder::FFmpegVideoDecoder(MediaLog* media_log)
- : media_log_(media_log), state_(kUninitialized), decode_nalus_(false) {
+ : media_log_(media_log), state_(kUninitialized), decode_nalus_(false), timestamp_map_(128) {
DVLOG(1) << __func__;
thread_checker_.DetachFromThread();
}
@@ -363,8 +363,10 @@ bool FFmpegVideoDecoder::FFmpegDecode(const DecoderBuffer& buffer) {
DCHECK(packet.data);
DCHECK_GT(packet.size, 0);
- // Let FFmpeg handle presentation timestamp reordering.
- codec_context_->reordered_opaque = buffer.timestamp().InMicroseconds();
+ const int64_t timestamp = buffer.timestamp().InMicroseconds();
+ const TimestampId timestamp_id = timestamp_id_generator_.GenerateNextId();
+ timestamp_map_.Put(timestamp_id, timestamp);
+ packet.opaque = reinterpret_cast<void*>(timestamp_id.GetUnsafeValue());
}
FFmpegDecodingLoop::DecodeStatus decode_status = decoding_loop_->DecodePacket(
packet, base::BindRepeating(&FFmpegVideoDecoder::OnNewFrame,
@@ -423,8 +425,13 @@ bool FFmpegVideoDecoder::OnNewFrame(AVFrame* frame) {
scoped_refptr<VideoFrame> video_frame =
reinterpret_cast<VideoFrame*>(av_buffer_get_opaque(frame->buf[0]));
+ const auto ts_id = TimestampId(reinterpret_cast<size_t>(frame->opaque));
+ const auto ts_lookup = timestamp_map_.Get(ts_id);
+ if (ts_lookup == timestamp_map_.end()) {
+ return false;
+ }
video_frame->set_timestamp(
- base::TimeDelta::FromMicroseconds(frame->reordered_opaque));
+ base::TimeDelta::FromMicroseconds(std::get<1>(*ts_lookup)));
video_frame->metadata()->power_efficient = false;
output_cb_.Run(video_frame);
return true;
@@ -498,8 +505,10 @@ bool FFmpegVideoDecoder::ConfigureDecoder(const VideoDecoderConfig& config,
codec_context_->thread_count = GetFFmpegVideoDecoderThreadCount(config);
codec_context_->thread_type =
FF_THREAD_SLICE | (low_delay ? 0 : FF_THREAD_FRAME);
+
codec_context_->opaque = this;
codec_context_->get_buffer2 = GetVideoBufferImpl;
+ codec_context_->flags |= AV_CODEC_FLAG_COPY_OPAQUE;
if (base::FeatureList::IsEnabled(kFFmpegAllowLists)) {
// Note: FFmpeg will try to free this string, so we must duplicate it.
diff --git a/media/filters/ffmpeg_video_decoder.h b/media/filters/ffmpeg_video_decoder.h
index d02cb89c3ddf7..0a2de1c623fff 100644
--- a/media/filters/ffmpeg_video_decoder.h
+++ b/media/filters/ffmpeg_video_decoder.h
@@ -7,6 +7,8 @@
#include <list>
#include <memory>
+#include "base/containers/mru_cache.h"
+#include "base/util/type_safety/id_type.h"
#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
@@ -87,6 +89,20 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder {
// FFmpeg structures owned by this object.
std::unique_ptr<AVCodecContext, ScopedPtrAVFreeContext> codec_context_;
+ // The gist here is that timestamps need to be 64 bits to store microsecond
+ // precision. A 32 bit integer would overflow at ~35 minutes at this level of
+ // precision. We can't cast the timestamp to the void ptr object used by the
+ // opaque field in ffmpeg then, because it would lose data on a 32 bit build.
+ // However, we don't actually have 2^31 timestamped frames in a single
+ // playback, so it's fine to use the 32 bit value as a key in a map which
+ // contains the actual timestamps. Additionally, we've in the past set 128
+ // outstanding frames for re-ordering as a limit for cross-thread decoding
+ // tasks, so we'll do that here too with the LRU cache.
+ using TimestampId = util::IdType<int64_t, size_t, 0>;
+
+ TimestampId::Generator timestamp_id_generator_;
+ base::MRUCache<TimestampId, int64_t> timestamp_map_;
+
VideoDecoderConfig config_;
scoped_refptr<FrameBufferPool> frame_pool_;
diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc
index 3331581a6fee6..69539fd6594ec 100644
--- a/media/ffmpeg/ffmpeg_common.cc
+++ b/media/ffmpeg/ffmpeg_common.cc
@@ -404,7 +404,9 @@ bool AVCodecContextToAudioDecoderConfig(const AVCodecContext* codec_context,
#if BUILDFLAG(USE_PROPRIETARY_CODECS)
// TODO(dalecurtis): Just use the profile from the codec context if ffmpeg
// ever starts supporting xHE-AAC.
- if (codec == kCodecAAC && codec_context->profile == FF_PROFILE_UNKNOWN) {
+ constexpr uint8_t kXHEAAc = 41;
+ if (codec == kCodecAAC && codec_context->profile == FF_PROFILE_UNKNOWN ||
+ codec_context->profile == kXHEAAc) {
// Errors aren't fatal here, so just drop any MediaLog messages.
NullMediaLog media_log;
mp4::AAC aac_parser;
diff --git a/media/ffmpeg/ffmpeg_regression_tests.cc b/media/ffmpeg/ffmpeg_regression_tests.cc
index 05dcb1cd62c75..866f446698947 100644
--- a/media/ffmpeg/ffmpeg_regression_tests.cc
+++ b/media/ffmpeg/ffmpeg_regression_tests.cc
@@ -90,16 +90,16 @@ FFMPEG_TEST_CASE(Cr62127,
PIPELINE_ERROR_DECODE,
PIPELINE_ERROR_DECODE);
FFMPEG_TEST_CASE(Cr93620, "security/93620.ogg", PIPELINE_OK, PIPELINE_OK);
-FFMPEG_TEST_CASE(Cr100492,
- "security/100492.webm",
- DECODER_ERROR_NOT_SUPPORTED,
- DECODER_ERROR_NOT_SUPPORTED);
+FFMPEG_TEST_CASE(Cr100492, "security/100492.webm", PIPELINE_OK, PIPELINE_OK);
FFMPEG_TEST_CASE(Cr100543, "security/100543.webm", PIPELINE_OK, PIPELINE_OK);
FFMPEG_TEST_CASE(Cr101458,
"security/101458.webm",
PIPELINE_ERROR_DECODE,
PIPELINE_ERROR_DECODE);
-FFMPEG_TEST_CASE(Cr108416, "security/108416.webm", PIPELINE_OK, PIPELINE_OK);
+FFMPEG_TEST_CASE(Cr108416,
+ "security/108416.webm",
+ PIPELINE_ERROR_DECODE,
+ PIPELINE_ERROR_DECODE);
FFMPEG_TEST_CASE(Cr110849,
"security/110849.mkv",
DEMUXER_ERROR_COULD_NOT_OPEN,
@@ -154,7 +154,10 @@ FFMPEG_TEST_CASE(Cr234630b,
"security/234630b.mov",
DEMUXER_ERROR_NO_SUPPORTED_STREAMS,
DEMUXER_ERROR_NO_SUPPORTED_STREAMS);
-FFMPEG_TEST_CASE(Cr242786, "security/242786.webm", PIPELINE_OK, PIPELINE_OK);
+FFMPEG_TEST_CASE(Cr242786,
+ "security/242786.webm",
+ PIPELINE_OK,
+ PIPELINE_ERROR_DECODE);
// Test for out-of-bounds access with slightly corrupt file (detection logic
// thinks it's a MONO file, but actually contains STEREO audio).
FFMPEG_TEST_CASE(Cr275590,
@@ -372,8 +375,8 @@ FFMPEG_TEST_CASE(WEBM_2,
DEMUXER_ERROR_NO_SUPPORTED_STREAMS);
FFMPEG_TEST_CASE(WEBM_4,
"security/out.webm.68798.1929",
- DECODER_ERROR_NOT_SUPPORTED,
- DECODER_ERROR_NOT_SUPPORTED);
+ PIPELINE_OK,
+ PIPELINE_OK);
FFMPEG_TEST_CASE(WEBM_5, "frame_size_change.webm", PIPELINE_OK, PIPELINE_OK);
// General MKV test cases.
diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
index 8a658a58caac5..9d6ed8aeb5c48 100644
--- a/media/filters/ffmpeg_video_decoder.cc
+++ b/media/filters/ffmpeg_video_decoder.cc
@@ -213,7 +213,6 @@ int FFmpegVideoDecoder::GetVideoBuffer(struct AVCodecContext* codec_context,
frame->width = coded_size.width();
frame->height = coded_size.height();
frame->format = codec_context->pix_fmt;
- frame->reordered_opaque = codec_context->reordered_opaque;
// Now create an AVBufferRef for the data just allocated. It will own the
// reference to the VideoFrame object.
diff --git a/media/filters/audio_file_reader.cc b/media/filters/audio_file_reader.cc
index e1be5aa9a5b13..951c003956fb5 100644
--- a/media/filters/audio_file_reader.cc
+++ b/media/filters/audio_file_reader.cc
@@ -243,10 +243,10 @@ bool AudioFileReader::OnNewFrame(
// silence from being output. In the case where we are also discarding some
// portion of the packet (as indicated by a negative pts), we further want to
// adjust the duration downward by however much exists before zero.
- if (audio_codec_ == kCodecAAC && frame->pkt_duration) {
+ if (audio_codec_ == kCodecAAC && frame->duration) {
const base::TimeDelta pkt_duration = ConvertFromTimeBase(
glue_->format_context()->streams[stream_index_]->time_base,
- frame->pkt_duration + std::min(static_cast<int64_t>(0), frame->pts));
+ frame->duration + std::min(static_cast<int64_t>(0), frame->pts));
const base::TimeDelta frame_duration = base::TimeDelta::FromSecondsD(
frames_read / static_cast<double>(sample_rate_));
diff --git a/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc b/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
index c6446c2..805b95b 100644
--- a/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
+++ b/third_party/webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc
@@ -114,7 +114,6 @@ int H264DecoderImpl::AVGetBuffer2(AVCodecContext* context,
int total_size = y_size + 2 * uv_size;
av_frame->format = context->pix_fmt;
- av_frame->reordered_opaque = context->reordered_opaque;
// Set |av_frame| members as required by FFmpeg.
av_frame->data[kYPlaneIndex] = frame_buffer->MutableDataY();
@@ -273,8 +272,6 @@ int32_t H264DecoderImpl::Decode(const EncodedImage& input_image,
return WEBRTC_VIDEO_CODEC_ERROR;
}
packet.size = static_cast<int>(input_image.size());
- int64_t frame_timestamp_us = input_image.ntp_time_ms_ * 1000; // ms -> μs
- av_context_->reordered_opaque = frame_timestamp_us;
int result = avcodec_send_packet(av_context_.get(), &packet);
if (result < 0) {
@@ -290,10 +287,6 @@ int32_t H264DecoderImpl::Decode(const EncodedImage& input_image,
return WEBRTC_VIDEO_CODEC_ERROR;
}
- // We don't expect reordering. Decoded frame tamestamp should match
- // the input one.
- RTC_DCHECK_EQ(av_frame_->reordered_opaque, frame_timestamp_us);
-
absl::optional<uint8_t> qp;
// TODO(sakal): Maybe it is possible to get QP directly from FFmpeg.
h264_bitstream_parser_.ParseBitstream(input_image.data(), input_image.size());
@@ -1,13 +0,0 @@
diff --git a/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp b/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp
index 7260365b2c6..b5a6aae3596 100644
--- a/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp
+++ b/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp
@@ -8,6 +8,8 @@
#include "include/utils/SkParse.h"
+#include <iterator>
+
static constexpr const char* gColorNames[] = {
"aliceblue",
"antiquewhite",
@@ -1,302 +0,0 @@
From 9236b21c883360482bd2c06929bfdecbc47f186c Mon Sep 17 00:00:00 2001
From: Allan Sandfeld Jensen <allan.jensen@qt.io>
Date: Mon, 16 Nov 2020 13:16:13 +0100
Subject: Fix build with system ICU 68
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes: QTBUG-88116
Change-Id: I935babf51c2670fad7cc7950a2fe07eb2829c4cb
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
---
chromium/base/i18n/string_compare.cc | 4 ++--
chromium/base/i18n/time_formatting.cc | 2 +-
.../components/autofill/core/common/autofill_regexes.cc | 8 ++++----
.../spellcheck/renderer/spellcheck_worditerator.cc | 2 +-
.../url_formatter/spoof_checks/idn_spoof_checker.cc | 4 ++--
.../url_formatter/spoof_checks/skeleton_generator.cc | 2 +-
chromium/services/service_manager/zygote/zygote_linux.cc | 2 +-
.../blink/renderer/platform/text/locale_icu.cc | 4 ++--
.../renderer/platform/text/text_break_iterator_icu.cc | 16 ++++++++--------
.../blink/renderer/platform/text/unicode_utilities.cc | 2 +-
.../blink/renderer/platform/wtf/text/text_codec_icu.cc | 2 +-
chromium/ui/base/l10n/formatter.cc | 6 +++---
12 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/src/3rdparty/chromium/base/i18n/string_compare.cc b/src/3rdparty/chromium/base/i18n/string_compare.cc
index 6cd59b98f49..a5fa502b53f 100644
--- a/src/3rdparty/chromium/base/i18n/string_compare.cc
+++ b/src/3rdparty/chromium/base/i18n/string_compare.cc
@@ -18,8 +18,8 @@ UCollationResult CompareString16WithCollator(const icu::Collator& collator,
StringPiece16 rhs) {
UErrorCode error = U_ZERO_ERROR;
UCollationResult result = collator.compare(
- icu::UnicodeString(FALSE, lhs.data(), static_cast<int>(lhs.length())),
- icu::UnicodeString(FALSE, rhs.data(), static_cast<int>(rhs.length())),
+ icu::UnicodeString(false, lhs.data(), static_cast<int>(lhs.length())),
+ icu::UnicodeString(false, rhs.data(), static_cast<int>(rhs.length())),
error);
DCHECK(U_SUCCESS(error));
return result;
diff --git a/src/3rdparty/chromium/base/i18n/time_formatting.cc b/src/3rdparty/chromium/base/i18n/time_formatting.cc
index 1a6c1389ba0..106dd0e5b47 100644
--- a/src/3rdparty/chromium/base/i18n/time_formatting.cc
+++ b/src/3rdparty/chromium/base/i18n/time_formatting.cc
@@ -236,7 +236,7 @@ bool TimeDurationFormatWithSeconds(const TimeDelta time,
icu::FieldPosition ignore(icu::FieldPosition::DONT_CARE);
measure_format.formatMeasures(measures, 3, formatted, ignore, status);
*out = i18n::UnicodeStringToString16(formatted);
- return U_SUCCESS(status) == TRUE;
+ return U_SUCCESS(status) == true;
}
string16 DateIntervalFormat(const Time& begin_time,
diff --git a/src/3rdparty/chromium/components/autofill/core/common/autofill_regexes.cc b/src/3rdparty/chromium/components/autofill/core/common/autofill_regexes.cc
index b141cb2d0f6..a8a688d50c7 100644
--- a/src/3rdparty/chromium/components/autofill/core/common/autofill_regexes.cc
+++ b/src/3rdparty/chromium/components/autofill/core/common/autofill_regexes.cc
@@ -43,7 +43,7 @@ class AutofillRegexes {
icu::RegexMatcher* AutofillRegexes::GetMatcher(const base::string16& pattern) {
auto it = matchers_.find(pattern);
if (it == matchers_.end()) {
- const icu::UnicodeString icu_pattern(FALSE, pattern.data(),
+ const icu::UnicodeString icu_pattern(false, pattern.data(),
pattern.length());
UErrorCode status = U_ZERO_ERROR;
@@ -70,20 +70,20 @@ bool MatchesPattern(const base::string16& input,
base::AutoLock lock(*g_lock);
icu::RegexMatcher* matcher = g_autofill_regexes->GetMatcher(pattern);
- icu::UnicodeString icu_input(FALSE, input.data(), input.length());
+ icu::UnicodeString icu_input(false, input.data(), input.length());
matcher->reset(icu_input);
UErrorCode status = U_ZERO_ERROR;
UBool matched = matcher->find(0, status);
DCHECK(U_SUCCESS(status));
- if (matched == TRUE && match) {
+ if (matched == true && match) {
icu::UnicodeString match_unicode = matcher->group(0, status);
DCHECK(U_SUCCESS(status));
*match = base::i18n::UnicodeStringToString16(match_unicode);
}
- return matched == TRUE;
+ return matched == true;
}
} // namespace autofill
diff --git a/src/3rdparty/chromium/components/spellcheck/renderer/spellcheck_worditerator.cc b/src/3rdparty/chromium/components/spellcheck/renderer/spellcheck_worditerator.cc
index 8fe8a6df381..e3a65580c08 100644
--- a/src/3rdparty/chromium/components/spellcheck/renderer/spellcheck_worditerator.cc
+++ b/src/3rdparty/chromium/components/spellcheck/renderer/spellcheck_worditerator.cc
@@ -424,7 +424,7 @@ bool SpellcheckWordIterator::Normalize(size_t input_start,
// spellchecker and we need manual normalization as well. The normalized
// text does not have to be NUL-terminated since its characters are copied to
// string16, which adds a NUL character when we need.
- icu::UnicodeString input(FALSE, &text_[input_start],
+ icu::UnicodeString input(false, &text_[input_start],
base::checked_cast<int32_t>(input_length));
UErrorCode status = U_ZERO_ERROR;
icu::UnicodeString output;
diff --git a/src/3rdparty/chromium/components/url_formatter/spoof_checks/idn_spoof_checker.cc b/src/3rdparty/chromium/components/url_formatter/spoof_checks/idn_spoof_checker.cc
index 1964793fd3e..c4e01026c38 100644
--- a/src/3rdparty/chromium/components/url_formatter/spoof_checks/idn_spoof_checker.cc
+++ b/src/3rdparty/chromium/components/url_formatter/spoof_checks/idn_spoof_checker.cc
@@ -347,7 +347,7 @@ bool IDNSpoofChecker::SafeToDisplayAsUnicode(
if (U_FAILURE(status) || (result & USPOOF_ALL_CHECKS))
return false;
- icu::UnicodeString label_string(FALSE /* isTerminated */, label.data(),
+ icu::UnicodeString label_string(false /* isTerminated */, label.data(),
base::checked_cast<int32_t>(label.size()));
// A punycode label with 'xn--' prefix is not subject to the URL
@@ -677,7 +677,7 @@ bool IDNSpoofChecker::IsWholeScriptConfusableAllowedForTLD(
base::StringPiece tld,
base::StringPiece16 tld_unicode) {
icu::UnicodeString tld_string(
- FALSE /* isTerminated */, tld_unicode.data(),
+ false /* isTerminated */, tld_unicode.data(),
base::checked_cast<int32_t>(tld_unicode.size()));
// Allow if the TLD contains any letter from the script, in which case it's
// likely to be a TLD in that script.
diff --git a/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc b/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc
index 41485914007..b8c1c2f547a 100644
--- a/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc
+++ b/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc
@@ -117,7 +117,7 @@ SkeletonGenerator::~SkeletonGenerator() = default;
Skeletons SkeletonGenerator::GetSkeletons(base::StringPiece16 hostname) {
Skeletons skeletons;
size_t hostname_length = hostname.length() - (hostname.back() == '.' ? 1 : 0);
- icu::UnicodeString host(FALSE, hostname.data(), hostname_length);
+ icu::UnicodeString host(false, hostname.data(), hostname_length);
// If input has any characters outside Latin-Greek-Cyrillic and [0-9._-],
// there is no point in getting rid of diacritics because combining marks
// attached to non-LGC characters are already blocked.
diff --git a/src/3rdparty/chromium/services/service_manager/zygote/zygote_linux.cc b/src/3rdparty/chromium/services/service_manager/zygote/zygote_linux.cc
index aa601ab28d7..920438e5b50 100644
--- a/src/3rdparty/chromium/services/service_manager/zygote/zygote_linux.cc
+++ b/src/3rdparty/chromium/services/service_manager/zygote/zygote_linux.cc
@@ -564,7 +564,7 @@ base::ProcessId Zygote::ReadArgsAndFork(base::PickleIterator iter,
if (!iter.ReadString16(&timezone_id))
return -1;
icu::TimeZone::adoptDefault(icu::TimeZone::createTimeZone(
- icu::UnicodeString(FALSE, timezone_id.data(), timezone_id.length())));
+ icu::UnicodeString(false, timezone_id.data(), timezone_id.length())));
if (!iter.ReadInt(&numfds))
return -1;
diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/locale_icu.cc b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/locale_icu.cc
index abff1b1d809..57f1286d4e4 100644
--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/locale_icu.cc
+++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/locale_icu.cc
@@ -169,12 +169,12 @@ static String GetDateFormatPattern(const UDateFormat* date_format) {
return g_empty_string;
UErrorCode status = U_ZERO_ERROR;
- int32_t length = udat_toPattern(date_format, TRUE, nullptr, 0, &status);
+ int32_t length = udat_toPattern(date_format, true, nullptr, 0, &status);
if (status != U_BUFFER_OVERFLOW_ERROR || !length)
return g_empty_string;
StringBuffer<UChar> buffer(length);
status = U_ZERO_ERROR;
- udat_toPattern(date_format, TRUE, buffer.Characters(), length, &status);
+ udat_toPattern(date_format, true, buffer.Characters(), length, &status);
if (U_FAILURE(status))
return g_empty_string;
return String::Adopt(buffer);
diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc
index a257cd75ccf..898d0c47bb1 100644
--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc
+++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc
@@ -311,13 +311,13 @@ static inline bool TextInChunkOrOutOfRange(UText* text,
text->chunkOffset = offset <= std::numeric_limits<int32_t>::max()
? static_cast<int32_t>(offset)
: 0;
- is_accessible = TRUE;
+ is_accessible = true;
return true;
}
if (native_index >= native_length &&
text->chunkNativeLimit == native_length) {
text->chunkOffset = text->chunkLength;
- is_accessible = FALSE;
+ is_accessible = false;
return true;
}
} else {
@@ -330,12 +330,12 @@ static inline bool TextInChunkOrOutOfRange(UText* text,
text->chunkOffset = offset <= std::numeric_limits<int32_t>::max()
? static_cast<int32_t>(offset)
: 0;
- is_accessible = TRUE;
+ is_accessible = true;
return true;
}
if (native_index <= 0 && !text->chunkNativeStart) {
text->chunkOffset = 0;
- is_accessible = FALSE;
+ is_accessible = false;
return true;
}
}
@@ -346,7 +346,7 @@ static UBool TextLatin1Access(UText* text,
int64_t native_index,
UBool forward) {
if (!text->context)
- return FALSE;
+ return false;
int64_t native_length = TextNativeLength(text);
UBool is_accessible;
if (TextInChunkOrOutOfRange(text, native_index, native_length, forward,
@@ -370,7 +370,7 @@ static UBool TextLatin1Access(UText* text,
DCHECK_EQ(new_context, kPriorContext);
TextLatin1SwitchToPriorContext(text, native_index, native_length, forward);
}
- return TRUE;
+ return true;
}
static const struct UTextFuncs kTextLatin1Funcs = {
@@ -510,7 +510,7 @@ static void TextUTF16SwitchToPriorContext(UText* text,
static UBool TextUTF16Access(UText* text, int64_t native_index, UBool forward) {
if (!text->context)
- return FALSE;
+ return false;
int64_t native_length = TextNativeLength(text);
UBool is_accessible;
if (TextInChunkOrOutOfRange(text, native_index, native_length, forward,
@@ -532,7 +532,7 @@ static UBool TextUTF16Access(UText* text, int64_t native_index, UBool forward) {
DCHECK_EQ(new_context, kPriorContext);
TextUTF16SwitchToPriorContext(text, native_index, native_length, forward);
}
- return TRUE;
+ return true;
}
static const struct UTextFuncs kTextUTF16Funcs = {
diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/unicode_utilities.cc b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/unicode_utilities.cc
index 2cefd5390b6..b8c4515dc13 100644
--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/unicode_utilities.cc
+++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/unicode_utilities.cc
@@ -300,7 +300,7 @@ void NormalizeCharactersIntoNFCForm(const UChar* characters,
DCHECK(U_SUCCESS(status));
int32_t input_length = static_cast<int32_t>(length);
// copy-on-write.
- icu::UnicodeString normalized(FALSE, characters, input_length);
+ icu::UnicodeString normalized(false, characters, input_length);
// In the vast majority of cases, input is already NFC. Run a quick check
// to avoid normalizing the entire input unnecessarily.
int32_t normalized_prefix_length =
diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc b/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc
index 810d1cd9181..9074b640fff 100644
--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc
+++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc
@@ -326,7 +326,7 @@ void TextCodecICU::CreateICUConverter() const {
DLOG_IF(ERROR, err == U_AMBIGUOUS_ALIAS_WARNING)
<< "ICU ambiguous alias warning for encoding: " << encoding_.GetName();
if (converter_icu_)
- ucnv_setFallback(converter_icu_, TRUE);
+ ucnv_setFallback(converter_icu_, true);
}
int TextCodecICU::DecodeToBuffer(UChar* target,
diff --git a/src/3rdparty/chromium/ui/base/l10n/formatter.cc b/src/3rdparty/chromium/ui/base/l10n/formatter.cc
index 486a3a029cb..d7a41724628 100644
--- a/src/3rdparty/chromium/ui/base/l10n/formatter.cc
+++ b/src/3rdparty/chromium/ui/base/l10n/formatter.cc
@@ -232,7 +232,7 @@ void Formatter::Format(Unit unit,
int value,
icu::UnicodeString* formatted_string) const {
DCHECK(simple_format_[unit]);
- DCHECK(formatted_string->isEmpty() == TRUE);
+ DCHECK(formatted_string->isEmpty() == true);
UErrorCode error = U_ZERO_ERROR;
FormatNumberInPlural(*simple_format_[unit],
value, formatted_string, &error);
@@ -248,7 +248,7 @@ void Formatter::Format(TwoUnits units,
<< "Detailed() not implemented for your (format, length) combination!";
DCHECK(detailed_format_[units][1])
<< "Detailed() not implemented for your (format, length) combination!";
- DCHECK(formatted_string->isEmpty() == TRUE);
+ DCHECK(formatted_string->isEmpty() == true);
UErrorCode error = U_ZERO_ERROR;
FormatNumberInPlural(*detailed_format_[units][0], value_1,
formatted_string, &error);
@@ -281,7 +281,7 @@ std::unique_ptr<icu::MessageFormat> Formatter::InitFormat(
base::string16 pattern = l10n_util::GetStringUTF16(pluralities.id);
UErrorCode error = U_ZERO_ERROR;
std::unique_ptr<icu::MessageFormat> format(new icu::MessageFormat(
- icu::UnicodeString(FALSE, pattern.data(), pattern.length()), error));
+ icu::UnicodeString(false, pattern.data(), pattern.length()), error));
DCHECK(U_SUCCESS(error));
if (format.get())
return format;
--
cgit v1.2.1
@@ -1,99 +0,0 @@
diff --git a/src/3rdparty/chromium/build/config/compiler/BUILD.gn b/src/3rdparty/chromium/build/config/compiler/BUILD.gn
index b511a58c5a8..abd78a74ead 100644
--- a/src/3rdparty/chromium/build/config/compiler/BUILD.gn
+++ b/src/3rdparty/chromium/build/config/compiler/BUILD.gn
@@ -566,7 +566,7 @@ config("compiler") {
# Override Chromium's default for projects that wish to stay on C++11.
cflags_cc += [ "-std=${standard_prefix}++11" ]
} else {
- cflags_cc += [ "-std=${standard_prefix}++14" ]
+ cflags_cc += [ "-std=${standard_prefix}++17" ]
}
} else if (!is_win && !is_nacl) {
if (target_os == "android") {
diff --git a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h
index f03ba1e4ab4..b1495f7ae74 100644
--- a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h
+++ b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h
@@ -195,7 +195,7 @@ NumPartitionPagesPerSuperPage() {
//
// __STDCPP_DEFAULT_NEW_ALIGNMENT__ is C++17. As such, it is not defined on all
// platforms, as Chrome's requirement is C++14 as of 2020.
-#if defined(__STDCPP_DEFAULT_NEW_ALIGNMENT__)
+#if 0
static constexpr size_t kAlignment =
std::max(alignof(std::max_align_t), __STDCPP_DEFAULT_NEW_ALIGNMENT__);
#else
diff --git a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h b/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h
index 76e627d27a3..942435f44a0 100644
--- a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h
+++ b/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h
@@ -12,6 +12,7 @@
#define COMMON_VIDEO_H264_SPS_PARSER_H_
#include "absl/types/optional.h"
+#include <cstdint>
namespace rtc {
class BitBuffer;
diff --git a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/pps_parser.h b/src/3rdparty/chromium/third_party/webrtc/common_video/h264/pps_parser.h
index d6c31b06887..d8852dfd186 100644
--- a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/pps_parser.h
+++ b/src/3rdparty/chromium/third_party/webrtc/common_video/h264/pps_parser.h
@@ -12,6 +12,7 @@
#define COMMON_VIDEO_H264_PPS_PARSER_H_
#include "absl/types/optional.h"
+#include <cstdint>
namespace rtc {
class BitBuffer;
diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h b/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h
index 3b9971abae1..d4458038527 100644
--- a/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h
+++ b/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h
@@ -13,6 +13,7 @@
#include <array>
#include <vector>
+#include <memory>
#include "absl/types/optional.h"
#include "api/array_view.h"
diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h b/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h
index 345e45ce127..e686e5d691a 100644
--- a/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h
+++ b/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h
@@ -12,6 +12,7 @@
#define MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
#include <limits>
+#include <cstdint>
#include "absl/types/optional.h"
diff --git a/src/3rdparty/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc b/src/3rdparty/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc
index 8fcc799b795..bc69ddcf18c 100644
--- a/src/3rdparty/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc
+++ b/src/3rdparty/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc
@@ -15,6 +15,7 @@
#include "third_party/blink/renderer/core/page/scrolling/text_fragment_anchor_metrics.h"
#include "third_party/blink/renderer/core/page/scrolling/text_fragment_finder.h"
#include "third_party/blink/renderer/platform/text/text_boundaries.h"
+#include "absl/base/attributes.h"
namespace blink {
diff --git a/src/3rdparty/chromium/third_party/abseil-cpp/absl/base/options.h b/src/3rdparty/chromium/third_party/abseil-cpp/absl/base/options.h
index df506f0fae6..1de105fed4a 100644
--- a/src/3rdparty/chromium/third_party/abseil-cpp/absl/base/options.h
+++ b/src/3rdparty/chromium/third_party/abseil-cpp/absl/base/options.h
@@ -180,7 +180,7 @@
// absl::variant is a typedef of std::variant, use the feature macro
// ABSL_USES_STD_VARIANT.
-#define ABSL_OPTION_USE_STD_VARIANT 2
+#define ABSL_OPTION_USE_STD_VARIANT 0
// ABSL_OPTION_USE_INLINE_NAMESPACE
@@ -1,42 +0,0 @@
From d9d9e606cb34b1b4ac0f44de132b1eb10763f1f6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20Br=C3=BCning?= <michael.bruning@qt.io>
Date: Tue, 23 Feb 2021 16:34:39 +0100
Subject: [PATCH] FIXUP: [Backport] CVE-2021-21149: Stack overflow in Data
Transfer
Const qualifier removed by another patch upstream had to be removed
as well.
Change-Id: I4823080661b815884c49ad9881e9958c1ba65251
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
---
src/3rdparty/chromium/ui/gfx/x/connection.cc | 2 +-
src/3rdparty/chromium/ui/gfx/x/connection.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/3rdparty/chromium/ui/gfx/x/connection.cc b/src/3rdparty/chromium/ui/gfx/x/connection.cc
index 0afbac2c605..8152f4e06be 100644
--- a/src/3rdparty/chromium/ui/gfx/x/connection.cc
+++ b/src/3rdparty/chromium/ui/gfx/x/connection.cc
@@ -423,7 +423,7 @@ Event Connection::WaitForNextEvent() {
return Event();
}
-bool Connection::HasPendingResponses() const {
+bool Connection::HasPendingResponses() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
return HasNextEvent() || HasNextResponse();
}
diff --git a/src/3rdparty/chromium/ui/gfx/x/connection.h b/src/3rdparty/chromium/ui/gfx/x/connection.h
index 73a306a2ca1..0e3bbb66e53 100644
--- a/src/3rdparty/chromium/ui/gfx/x/connection.h
+++ b/src/3rdparty/chromium/ui/gfx/x/connection.h
@@ -124,7 +124,7 @@ class COMPONENT_EXPORT(X11) Connection : public XProto,
Event WaitForNextEvent();
// Are there any events, errors, or replies already buffered?
- bool HasPendingResponses() const;
+ bool HasPendingResponses();
// Dispatch any buffered events, errors, or replies.
void Dispatch(Delegate* delegate);
@@ -1,337 +0,0 @@
Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
Date: 2021-11-26
Initial Package Version: From git 5.15 branch.
Upstream Status: Anything for gcc-11 and glibc-2.34 not used upstream.
Origin: upstream via gentoo, Douglas, fedora, self.
Description: Allows this to build and work on BLFS-10.1
Updated on 2021-05-04: add gentoo patch for gcc-11.
Updated on 2021-06-18: remove fix for graphcycles.cc which is now upstream
Updated on 2021-08-13: add fixes to compile and let browsers using it work on glibc-2.34
(apply the upstream_fixes-2 patch BEFORE applying this).
Updated on 2021-11-22: fixes for qtwebengine-5.15.7.
First, a patch from gentoo to avoid the build from a git version requiring
git, although the .git directories are still required.
generate_gni.sh: update_readme() runs git at the end of process, prevent it.
Thanks-to: Georgy Yakovlev <gyakovlev@gentoo.org>
--- a/src/3rdparty/chromium/third_party/libvpx/generate_gni.sh 2021-02-07 12:51:49.438514897 +0100
+++ b/src/3rdparty/chromium/third_party/libvpx/generate_gni.sh 2021-02-21 16:23:38.375724515 +0100
@@ -519,8 +519,3 @@
gn format --in-place $BASE_DIR/BUILD.gn
gn format --in-place $BASE_DIR/libvpx_srcs.gni
-
-cd $BASE_DIR/$LIBVPX_SRC_DIR
-update_readme
-
-cd $BASE_DIR
Second used to be a patch from fedora, via Arch, to make some web pages
render when glibc-2.33 is used. That was chromium bug 1164975 which has
been fixed differently and backported to qtwebengine-5.15.6.
Third, a patch from Douglas R. Reno (renodr at linuxfromscratch dot org):
When building qtwebengine where libxml2 has been built before ICU has been
installed, a build failure will occur because QtWebEngine will attempt to use
it's internal version of libxml2, which *was not* patched against API changes
in ICU-68.1+. These changes involved removing the TRUE and FALSE macros, and
the official documentation states that developers should use 'true' and 'false'
instead, of course making sure that 'stdbool.h' is included so that the compiler
can actually find those boolean values. Since Chromium's internal version of ICU
is older than ours, it's not a problem when building with the internal version
of ICU. Users who have installed ICU before libxml2 are exempt from running into
this issue.
diff -Naurp qtwebengine-everywhere-opensource-src-5.15.2.orig/src/3rdparty/chromium/third_party/libxml/src/encoding.c qtwebengine-everywhere-opensource-src-5.15.2/src/3rdparty/chromium/third_party/libxml/src/encoding.c
--- qtwebengine-everywhere-opensource-src-5.15.2.orig/src/3rdparty/chromium/third_party/libxml/src/encoding.c 2020-11-06 19:22:36.000000000 -0600
+++ qtwebengine-everywhere-opensource-src-5.15.2/src/3rdparty/chromium/third_party/libxml/src/encoding.c 2020-12-08 19:39:00.607894718 -0600
@@ -44,7 +44,7 @@
#endif
#include <libxml/globals.h>
#include <libxml/xmlerror.h>
-
+#include <stdbool.h>
#include "buf.h"
#include "enc.h"
@@ -1893,7 +1893,7 @@ xmlUconvWrapper(uconv_t *cd, int toUnico
*inlen = ucv_in - (const char*) in;
*outlen = ucv_out - (char *) out;
if (U_SUCCESS(err)) {
- /* reset pivot buf if this is the last call for input (flush==TRUE) */
+ /* reset pivot buf if this is the last call for input (flush==true) */
if (flush)
cd->pivot_source = cd->pivot_target = cd->pivot_buf;
return 0;
@@ -1958,7 +1958,7 @@ xmlEncOutputChunk(xmlCharEncodingHandler
#ifdef LIBXML_ICU_ENABLED
else if (handler->uconv_out != NULL) {
ret = xmlUconvWrapper(handler->uconv_out, 0, out, outlen, in, inlen,
- TRUE);
+ true);
}
#endif /* LIBXML_ICU_ENABLED */
else {
Fourth, patch from gentoo to allow it to build with gcc-11 where some
less-used headers such as <limits> have been removed from the C++
standard library headers which used to include them, and must now be
included where needed. [https://gcc.gnu.org/gcc-11/porting_to.html]
diff --git a/src/3rdparty/chromium/third_party/angle/src/libANGLE/HandleAllocator.cpp b/src/3rdparty/chromium/third_party/angle/src/libANGLE/HandleAllocator.cpp
index 013f1dfb2..3ce63c192 100644
--- a/src/3rdparty/chromium/third_party/angle/src/libANGLE/HandleAllocator.cpp
+++ b/src/3rdparty/chromium/third_party/angle/src/libANGLE/HandleAllocator.cpp
@@ -9,6 +9,7 @@
#include "libANGLE/HandleAllocator.h"
+#include <limits>
#include <algorithm>
#include <functional>
diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.cc b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.cc
index fd651958f..1e8d0606c 100644
--- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.cc
+++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.cc
@@ -14,9 +14,9 @@
* limitations under the License.
*/
+#include <limits>
#include "src/trace_processor/containers/string_pool.h"
-#include <limits>
#include "perfetto/base/logging.h"
#include "perfetto/ext/base/utils.h"
diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc
index 00496b335..0dccfeb8a 100644
--- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc
+++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include <limits>
#include "src/trace_processor/db/column.h"
#include "src/trace_processor/db/compare.h"
diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/types/variadic.cc b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/types/variadic.cc
index 837bfeba9..cdd56817d 100644
--- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/types/variadic.cc
+++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/types/variadic.cc
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include <limits>
#include "src/trace_processor/types/variadic.h"
namespace perfetto {
diff --git a/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_atk_hyperlink.cc b/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_atk_hyperlink.cc
index be91def6b..73f202356 100644
--- a/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_atk_hyperlink.cc
+++ b/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_atk_hyperlink.cc
@@ -245,7 +245,7 @@ static void AXPlatformAtkHyperlinkInit(AXPlatformAtkHyperlink* self, gpointer) {
}
GType ax_platform_atk_hyperlink_get_type() {
- static volatile gsize type_volatile = 0;
+ static gsize type_volatile = 0;
AXPlatformNodeAuraLinux::EnsureGTypeInit();
diff --git a/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_node_auralinux.cc b/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_node_auralinux.cc
index 04125c6fd..6c64e5d8e 100644
--- a/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_node_auralinux.cc
+++ b/src/3rdparty/chromium/ui/accessibility/platform/ax_platform_node_auralinux.cc
@@ -2274,7 +2274,7 @@ void ClassInit(gpointer class_pointer, gpointer /* class_data */) {
GType GetType() {
AXPlatformNodeAuraLinux::EnsureGTypeInit();
- static volatile gsize type_volatile = 0;
+ static gsize type_volatile = 0;
if (g_once_init_enter(&type_volatile)) {
static const GTypeInfo type_info = {
sizeof(AXPlatformNodeAuraLinuxClass), // class_size
diff --git a/src/3rdparty/chromium/ui/gtk/gtk_key_bindings_handler.cc b/src/3rdparty/chromium/ui/gtk/gtk_key_bindings_handler.cc
index c663a2074..38a342484 100644
--- a/src/3rdparty/chromium/ui/gtk/gtk_key_bindings_handler.cc
+++ b/src/3rdparty/chromium/ui/gtk/gtk_key_bindings_handler.cc
@@ -141,7 +141,7 @@ void GtkKeyBindingsHandler::HandlerClassInit(HandlerClass* klass) {
}
GType GtkKeyBindingsHandler::HandlerGetType() {
- static volatile gsize type_id_volatile = 0;
+ static gsize type_id_volatile = 0;
if (g_once_init_enter(&type_id_volatile)) {
GType type_id = g_type_register_static_simple(
GTK_TYPE_TEXT_VIEW, g_intern_static_string("GtkKeyBindingsHandler"),
--- a/src/3rdparty/chromium/components/bookmarks/browser/bookmark_expanded_state_tracker.cc
+++ b/src/3rdparty/chromium/components/bookmarks/browser/bookmark_expanded_state_tracker.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <cstddef>
#include "components/bookmarks/browser/bookmark_expanded_state_tracker.h"
#include <stdint.h>
diff --git a/src/3rdparty/chromium/components/bookmarks/browser/base_bookmark_model_observer.cc b/src/3rdparty/chromium/components/bookmarks/browser/base_bookmark_model_observer.cc
index 657a3c96b..ad641a082 100644
--- a/src/3rdparty/chromium/components/bookmarks/browser/base_bookmark_model_observer.cc
+++ b/src/3rdparty/chromium/components/bookmarks/browser/base_bookmark_model_observer.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <cstddef>
+
#include "components/bookmarks/browser/base_bookmark_model_observer.h"
namespace bookmarks {
Fifth, upstream abseil fixes
https://github.com/abseil/abseil-cpp/commit/a9831f1cbf93fb18dd951453635f488037454ce9.diff
Upstream abseil fix for glibc-2.34, ignoring the change to CMake/AbseilHelpers.cmake
which alters code creating a pkgconfig file - that is absent from the chromium copy
of abseil.
Rediffed to apply to top level with -p1.
diff -Naur a/src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc b/src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc
--- a/src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc 2021-04-01 12:19:23.000000000 +0100
+++ b/src/3rdparty/chromium/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc 2021-08-11 19:26:02.264520116 +0100
@@ -135,7 +135,8 @@
#else
const size_t page_mask = sysconf(_SC_PAGESIZE) - 1;
#endif
- size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask;
+ size_t stack_size =
+ (std::max<size_t>(SIGSTKSZ, 65536) + page_mask) & ~page_mask;
#if defined(ABSL_HAVE_ADDRESS_SANITIZER) || \
defined(ABSL_HAVE_MEMORY_SANITIZER) || defined(ABSL_HAVE_THREAD_SANITIZER)
// Account for sanitizer instrumentation requiring additional stack space.
diff -Naur a/src/3rdparty/chromium/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h b/src/3rdparty/chromium/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h
--- a/src/3rdparty/chromium/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h 2021-04-01 12:19:23.000000000 +0100
+++ b/src/3rdparty/chromium/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h 2021-08-11 19:26:02.264520116 +0100
@@ -108,6 +108,14 @@
StringConvertResult FormatConvertImpl(string_view v,
FormatConversionSpecImpl conv,
FormatSinkImpl* sink);
+#if defined(ABSL_HAVE_STD_STRING_VIEW) && !defined(ABSL_USES_STD_STRING_VIEW)
+inline StringConvertResult FormatConvertImpl(std::string_view v,
+ FormatConversionSpecImpl conv,
+ FormatSinkImpl* sink) {
+ return FormatConvertImpl(absl::string_view(v.data(), v.size()), conv, sink);
+}
+#endif // ABSL_HAVE_STD_STRING_VIEW && !ABSL_USES_STD_STRING_VIEW
+
ArgConvertResult<FormatConversionCharSetUnion(
FormatConversionCharSetInternal::s, FormatConversionCharSetInternal::p)>
FormatConvertImpl(const char* v, const FormatConversionSpecImpl conv,
diff -Naur a/src/3rdparty/chromium/third_party/abseil-cpp/absl/strings/internal/str_format/convert_test.cc b/src/3rdparty/chromium/third_party/abseil-cpp/absl/strings/internal/str_format/convert_test.cc
--- a/src/3rdparty/chromium/third_party/abseil-cpp/absl/strings/internal/str_format/convert_test.cc 2021-04-01 12:19:23.000000000 +0100
+++ b/src/3rdparty/chromium/third_party/abseil-cpp/absl/strings/internal/str_format/convert_test.cc 2021-08-11 19:26:02.264520116 +0100
@@ -215,6 +215,9 @@
TestStringConvert(static_cast<const char*>("hello"));
TestStringConvert(std::string("hello"));
TestStringConvert(string_view("hello"));
+#if defined(ABSL_HAVE_STD_STRING_VIEW)
+ TestStringConvert(std::string_view("hello"));
+#endif // ABSL_HAVE_STD_STRING_VIEW
}
TEST_F(FormatConvertTest, NullString) {
Sixth: a patch to compile breakpad on glibc-2.34, found at fedora
The breakpad part of
https://src.fedoraproject.org/rpms/qt5-qtwebengine/raw/rawhide/f/qtwebengine-everywhere-opensource-src-5.15.5-SIGSTKSZ.patch
(abseil already fixed)
diff -Naur a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
--- a/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc 2021-04-01 12:19:23.000000000 +0100
+++ b/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc 2021-08-12 00:43:40.100863695 +0100
@@ -138,7 +138,7 @@
// SIGSTKSZ may be too small to prevent the signal handlers from overrunning
// the alternative stack. Ensure that the size of the alternative stack is
// large enough.
- static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ);
+ static const unsigned kSigStackSize = std::max<unsigned>(16384, SIGSTKSZ);
// Only set an alternative stack if there isn't already one, or if the current
// one is too small.
Seventh: a patch from fedora to handle time64 syscalls
Fixed up to apply to 5.15.7 (parts were upstream but in a slightly different
order). For the first hunk I commented the replaced line instead of deleting
it, as a reminder to myself that I was not at all sure this was a correct fix.
But it seems to work in my initial test build, so I'm not going to rediff.
diff -ur a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2021-11-21 05:26:12.779893741 +0000
+++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2021-11-21 05:48:06.855720781 +0000
@@ -158,7 +158,16 @@
return Allow();
#endif
- if (SyscallSets::IsClockApi(sysno)) {
+// if (SyscallSets::IsClockApi(sysno)) {
+ if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep
+#if defined(__NR_clock_gettime64)
+ || sysno == __NR_clock_gettime64
+#endif
+#if defined(__NR_clock_nanosleep_time64)
+ || sysno == __NR_clock_nanosleep_time64
+#endif
+ ) {
+
return RestrictClockID();
}
diff -up qtwebengine-everywhere-opensource-src-5.15.5/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h.sandbox-time64-syscalls qtwebengine-everywhere-opensource-src-5.15.5/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h
--- qtwebengine-everywhere-opensource-src-5.15.5/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h.sandbox-time64-syscalls 2021-06-24 10:36:45.694826524 -0500
+++ qtwebengine-everywhere-opensource-src-5.15.5/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h 2021-06-24 10:37:50.383852263 -0500
@@ -1441,6 +1441,14 @@
#define __NR_io_pgetevents (__NR_SYSCALL_BASE+399)
#endif
+#if !defined(__NR_clock_gettime64)
+#define __NR_clock_gettime64 (__NR_SYSCALL_BASE+403)
+#endif
+
+#if !defined(__NR_clock_nanosleep_time64)
+#define __NR_clock_nanosleep_time64 (__NR_SYSCALL_BASE+407)
+#endif
+
// ARM private syscalls.
#if !defined(__ARM_NR_BASE)
#define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0xF0000)
diff -up qtwebengine-everywhere-opensource-src-5.15.5/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h.sandbox-time64-syscalls qtwebengine-everywhere-opensource-src-5.15.5/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h
--- qtwebengine-everywhere-opensource-src-5.15.5/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h.sandbox-time64-syscalls 2021-05-28 07:05:45.000000000 -0500
+++ qtwebengine-everywhere-opensource-src-5.15.5/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h 2021-06-24 10:36:45.695826525 -0500
@@ -1433,4 +1433,12 @@
#define __NR_memfd_create (__NR_Linux + 354)
#endif
+#if !defined(__NR_clock_gettime64)
+#define __NR_clock_gettime64 (__NR_Linux + 403)
+#endif
+
+#if !defined(__NR_clock_nanosleep_time64)
+#define __NR_clock_nanosleep_time64 (__NR_Linux + 407)
+#endif
+
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_MIPS_LINUX_SYSCALLS_H_
@@ -1,12 +0,0 @@
diff -up qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/libxml/src/encoding.c.TRUE qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/libxml/src/encoding.c
--- qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/libxml/src/encoding.c.TRUE 2021-05-28 07:05:45.000000000 -0500
+++ qtwebengine-everywhere-src-5.15.5/src/3rdparty/chromium/third_party/libxml/src/encoding.c 2021-06-24 09:44:41.592468805 -0500
@@ -2004,7 +2004,7 @@ xmlEncOutputChunk(xmlCharEncodingHandler
#ifdef LIBXML_ICU_ENABLED
else if (handler->uconv_out != NULL) {
ret = xmlUconvWrapper(handler->uconv_out, 0, out, outlen, in, inlen,
- TRUE);
+ 1);
}
#endif /* LIBXML_ICU_ENABLED */
else {
@@ -1,334 +0,0 @@
diff --git a/third_party/libxml/src/encoding.c b/third_party/libxml/src/encoding.c
index c34aca4..47be560 100644
--- a/src/3rdparty/chromium/third_party/libxml/src/encoding.c
+++ b/src/3rdparty/chromium/third_party/libxml/src/encoding.c
@@ -1858,7 +1858,7 @@
* @outlen: the length of @out
* @in: a pointer to an array of input bytes
* @inlen: the length of @in
- * @flush: if true, indicates end of input
+ * @flush: if 1, indicates end of input
*
* Returns 0 if success, or
* -1 by lack of space, or
@@ -1898,7 +1898,7 @@
*inlen = ucv_in - (const char*) in;
*outlen = ucv_out - (char *) out;
if (U_SUCCESS(err)) {
- /* reset pivot buf if this is the last call for input (flush==TRUE) */
+ /* reset pivot buf if this is the last call for input (flush==1) */
if (flush)
cd->pivot_source = cd->pivot_target = cd->pivot_buf;
return 0;
@@ -2004,7 +2004,7 @@
#ifdef LIBXML_ICU_ENABLED
else if (handler->uconv_out != NULL) {
ret = xmlUconvWrapper(handler->uconv_out, 0, out, outlen, in, inlen,
- TRUE);
+ 1);
}
#endif /* LIBXML_ICU_ENABLED */
else {
From 9236b21c883360482bd2c06929bfdecbc47f186c Mon Sep 17 00:00:00 2001
From: Allan Sandfeld Jensen <allan.jensen@qt.io>
Date: Mon, 16 Nov 2020 13:16:13 +0100
Subject: Fix build with system ICU 68
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes: QTBUG-88116
Change-Id: I935babf51c2670fad7cc7950a2fe07eb2829c4cb
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
---
chromium/base/i18n/string_compare.cc | 4 ++--
chromium/base/i18n/time_formatting.cc | 2 +-
.../components/autofill/core/common/autofill_regexes.cc | 8 ++++----
.../spellcheck/renderer/spellcheck_worditerator.cc | 2 +-
.../url_formatter/spoof_checks/idn_spoof_checker.cc | 4 ++--
.../url_formatter/spoof_checks/skeleton_generator.cc | 2 +-
chromium/services/service_manager/zygote/zygote_linux.cc | 2 +-
.../blink/renderer/platform/text/locale_icu.cc | 4 ++--
.../renderer/platform/text/text_break_iterator_icu.cc | 16 ++++++++--------
.../blink/renderer/platform/text/unicode_utilities.cc | 2 +-
.../blink/renderer/platform/wtf/text/text_codec_icu.cc | 2 +-
chromium/ui/base/l10n/formatter.cc | 6 +++---
12 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/src/3rdparty/chromium/base/i18n/string_compare.cc b/src/3rdparty/chromium/base/i18n/string_compare.cc
index 6cd59b98f49..a5fa502b53f 100644
--- a/src/3rdparty/chromium/base/i18n/string_compare.cc
+++ b/src/3rdparty/chromium/base/i18n/string_compare.cc
@@ -18,8 +18,8 @@ UCollationResult CompareString16WithCollator(const icu::Collator& collator,
StringPiece16 rhs) {
UErrorCode error = U_ZERO_ERROR;
UCollationResult result = collator.compare(
- icu::UnicodeString(FALSE, lhs.data(), static_cast<int>(lhs.length())),
- icu::UnicodeString(FALSE, rhs.data(), static_cast<int>(rhs.length())),
+ icu::UnicodeString(false, lhs.data(), static_cast<int>(lhs.length())),
+ icu::UnicodeString(false, rhs.data(), static_cast<int>(rhs.length())),
error);
DCHECK(U_SUCCESS(error));
return result;
diff --git a/src/3rdparty/chromium/base/i18n/time_formatting.cc b/src/3rdparty/chromium/base/i18n/time_formatting.cc
index 1a6c1389ba0..106dd0e5b47 100644
--- a/src/3rdparty/chromium/base/i18n/time_formatting.cc
+++ b/src/3rdparty/chromium/base/i18n/time_formatting.cc
@@ -236,7 +236,7 @@ bool TimeDurationFormatWithSeconds(const TimeDelta time,
icu::FieldPosition ignore(icu::FieldPosition::DONT_CARE);
measure_format.formatMeasures(measures, 3, formatted, ignore, status);
*out = i18n::UnicodeStringToString16(formatted);
- return U_SUCCESS(status) == TRUE;
+ return U_SUCCESS(status) == true;
}
string16 DateIntervalFormat(const Time& begin_time,
diff --git a/src/3rdparty/chromium/components/autofill/core/common/autofill_regexes.cc b/src/3rdparty/chromium/components/autofill/core/common/autofill_regexes.cc
index b141cb2d0f6..a8a688d50c7 100644
--- a/src/3rdparty/chromium/components/autofill/core/common/autofill_regexes.cc
+++ b/src/3rdparty/chromium/components/autofill/core/common/autofill_regexes.cc
@@ -43,7 +43,7 @@ class AutofillRegexes {
icu::RegexMatcher* AutofillRegexes::GetMatcher(const base::string16& pattern) {
auto it = matchers_.find(pattern);
if (it == matchers_.end()) {
- const icu::UnicodeString icu_pattern(FALSE, pattern.data(),
+ const icu::UnicodeString icu_pattern(false, pattern.data(),
pattern.length());
UErrorCode status = U_ZERO_ERROR;
@@ -70,20 +70,20 @@ bool MatchesPattern(const base::string16& input,
base::AutoLock lock(*g_lock);
icu::RegexMatcher* matcher = g_autofill_regexes->GetMatcher(pattern);
- icu::UnicodeString icu_input(FALSE, input.data(), input.length());
+ icu::UnicodeString icu_input(false, input.data(), input.length());
matcher->reset(icu_input);
UErrorCode status = U_ZERO_ERROR;
UBool matched = matcher->find(0, status);
DCHECK(U_SUCCESS(status));
- if (matched == TRUE && match) {
+ if (matched == true && match) {
icu::UnicodeString match_unicode = matcher->group(0, status);
DCHECK(U_SUCCESS(status));
*match = base::i18n::UnicodeStringToString16(match_unicode);
}
- return matched == TRUE;
+ return matched == true;
}
} // namespace autofill
diff --git a/src/3rdparty/chromium/components/spellcheck/renderer/spellcheck_worditerator.cc b/src/3rdparty/chromium/components/spellcheck/renderer/spellcheck_worditerator.cc
index 8fe8a6df381..e3a65580c08 100644
--- a/src/3rdparty/chromium/components/spellcheck/renderer/spellcheck_worditerator.cc
+++ b/src/3rdparty/chromium/components/spellcheck/renderer/spellcheck_worditerator.cc
@@ -424,7 +424,7 @@ bool SpellcheckWordIterator::Normalize(size_t input_start,
// spellchecker and we need manual normalization as well. The normalized
// text does not have to be NUL-terminated since its characters are copied to
// string16, which adds a NUL character when we need.
- icu::UnicodeString input(FALSE, &text_[input_start],
+ icu::UnicodeString input(false, &text_[input_start],
base::checked_cast<int32_t>(input_length));
UErrorCode status = U_ZERO_ERROR;
icu::UnicodeString output;
diff --git a/src/3rdparty/chromium/components/url_formatter/spoof_checks/idn_spoof_checker.cc b/src/3rdparty/chromium/components/url_formatter/spoof_checks/idn_spoof_checker.cc
index 1964793fd3e..c4e01026c38 100644
--- a/src/3rdparty/chromium/components/url_formatter/spoof_checks/idn_spoof_checker.cc
+++ b/src/3rdparty/chromium/components/url_formatter/spoof_checks/idn_spoof_checker.cc
@@ -347,7 +347,7 @@ bool IDNSpoofChecker::SafeToDisplayAsUnicode(
if (U_FAILURE(status) || (result & USPOOF_ALL_CHECKS))
return false;
- icu::UnicodeString label_string(FALSE /* isTerminated */, label.data(),
+ icu::UnicodeString label_string(false /* isTerminated */, label.data(),
base::checked_cast<int32_t>(label.size()));
// A punycode label with 'xn--' prefix is not subject to the URL
@@ -677,7 +677,7 @@ bool IDNSpoofChecker::IsWholeScriptConfusableAllowedForTLD(
base::StringPiece tld,
base::StringPiece16 tld_unicode) {
icu::UnicodeString tld_string(
- FALSE /* isTerminated */, tld_unicode.data(),
+ false /* isTerminated */, tld_unicode.data(),
base::checked_cast<int32_t>(tld_unicode.size()));
// Allow if the TLD contains any letter from the script, in which case it's
// likely to be a TLD in that script.
diff --git a/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc b/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc
index 41485914007..b8c1c2f547a 100644
--- a/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc
+++ b/src/3rdparty/chromium/components/url_formatter/spoof_checks/skeleton_generator.cc
@@ -117,7 +117,7 @@ SkeletonGenerator::~SkeletonGenerator() = default;
Skeletons SkeletonGenerator::GetSkeletons(base::StringPiece16 hostname) {
Skeletons skeletons;
size_t hostname_length = hostname.length() - (hostname.back() == '.' ? 1 : 0);
- icu::UnicodeString host(FALSE, hostname.data(), hostname_length);
+ icu::UnicodeString host(false, hostname.data(), hostname_length);
// If input has any characters outside Latin-Greek-Cyrillic and [0-9._-],
// there is no point in getting rid of diacritics because combining marks
// attached to non-LGC characters are already blocked.
diff --git a/src/3rdparty/chromium/services/service_manager/zygote/zygote_linux.cc b/src/3rdparty/chromium/services/service_manager/zygote/zygote_linux.cc
index aa601ab28d7..920438e5b50 100644
--- a/src/3rdparty/chromium/services/service_manager/zygote/zygote_linux.cc
+++ b/src/3rdparty/chromium/services/service_manager/zygote/zygote_linux.cc
@@ -564,7 +564,7 @@ base::ProcessId Zygote::ReadArgsAndFork(base::PickleIterator iter,
if (!iter.ReadString16(&timezone_id))
return -1;
icu::TimeZone::adoptDefault(icu::TimeZone::createTimeZone(
- icu::UnicodeString(FALSE, timezone_id.data(), timezone_id.length())));
+ icu::UnicodeString(false, timezone_id.data(), timezone_id.length())));
if (!iter.ReadInt(&numfds))
return -1;
diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/locale_icu.cc b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/locale_icu.cc
index abff1b1d809..57f1286d4e4 100644
--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/locale_icu.cc
+++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/locale_icu.cc
@@ -169,12 +169,12 @@ static String GetDateFormatPattern(const UDateFormat* date_format) {
return g_empty_string;
UErrorCode status = U_ZERO_ERROR;
- int32_t length = udat_toPattern(date_format, TRUE, nullptr, 0, &status);
+ int32_t length = udat_toPattern(date_format, true, nullptr, 0, &status);
if (status != U_BUFFER_OVERFLOW_ERROR || !length)
return g_empty_string;
StringBuffer<UChar> buffer(length);
status = U_ZERO_ERROR;
- udat_toPattern(date_format, TRUE, buffer.Characters(), length, &status);
+ udat_toPattern(date_format, true, buffer.Characters(), length, &status);
if (U_FAILURE(status))
return g_empty_string;
return String::Adopt(buffer);
diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc
index a257cd75ccf..898d0c47bb1 100644
--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc
+++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/text_break_iterator_icu.cc
@@ -311,13 +311,13 @@ static inline bool TextInChunkOrOutOfRange(UText* text,
text->chunkOffset = offset <= std::numeric_limits<int32_t>::max()
? static_cast<int32_t>(offset)
: 0;
- is_accessible = TRUE;
+ is_accessible = true;
return true;
}
if (native_index >= native_length &&
text->chunkNativeLimit == native_length) {
text->chunkOffset = text->chunkLength;
- is_accessible = FALSE;
+ is_accessible = false;
return true;
}
} else {
@@ -330,12 +330,12 @@ static inline bool TextInChunkOrOutOfRange(UText* text,
text->chunkOffset = offset <= std::numeric_limits<int32_t>::max()
? static_cast<int32_t>(offset)
: 0;
- is_accessible = TRUE;
+ is_accessible = true;
return true;
}
if (native_index <= 0 && !text->chunkNativeStart) {
text->chunkOffset = 0;
- is_accessible = FALSE;
+ is_accessible = false;
return true;
}
}
@@ -346,7 +346,7 @@ static UBool TextLatin1Access(UText* text,
int64_t native_index,
UBool forward) {
if (!text->context)
- return FALSE;
+ return false;
int64_t native_length = TextNativeLength(text);
UBool is_accessible;
if (TextInChunkOrOutOfRange(text, native_index, native_length, forward,
@@ -370,7 +370,7 @@ static UBool TextLatin1Access(UText* text,
DCHECK_EQ(new_context, kPriorContext);
TextLatin1SwitchToPriorContext(text, native_index, native_length, forward);
}
- return TRUE;
+ return true;
}
static const struct UTextFuncs kTextLatin1Funcs = {
@@ -510,7 +510,7 @@ static void TextUTF16SwitchToPriorContext(UText* text,
static UBool TextUTF16Access(UText* text, int64_t native_index, UBool forward) {
if (!text->context)
- return FALSE;
+ return false;
int64_t native_length = TextNativeLength(text);
UBool is_accessible;
if (TextInChunkOrOutOfRange(text, native_index, native_length, forward,
@@ -532,7 +532,7 @@ static UBool TextUTF16Access(UText* text, int64_t native_index, UBool forward) {
DCHECK_EQ(new_context, kPriorContext);
TextUTF16SwitchToPriorContext(text, native_index, native_length, forward);
}
- return TRUE;
+ return true;
}
static const struct UTextFuncs kTextUTF16Funcs = {
diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/unicode_utilities.cc b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/unicode_utilities.cc
index 2cefd5390b6..b8c4515dc13 100644
--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/text/unicode_utilities.cc
+++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/text/unicode_utilities.cc
@@ -300,7 +300,7 @@ void NormalizeCharactersIntoNFCForm(const UChar* characters,
DCHECK(U_SUCCESS(status));
int32_t input_length = static_cast<int32_t>(length);
// copy-on-write.
- icu::UnicodeString normalized(FALSE, characters, input_length);
+ icu::UnicodeString normalized(false, characters, input_length);
// In the vast majority of cases, input is already NFC. Run a quick check
// to avoid normalizing the entire input unnecessarily.
int32_t normalized_prefix_length =
diff --git a/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc b/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc
index 810d1cd9181..9074b640fff 100644
--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc
+++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/text/text_codec_icu.cc
@@ -326,7 +326,7 @@ void TextCodecICU::CreateICUConverter() const {
DLOG_IF(ERROR, err == U_AMBIGUOUS_ALIAS_WARNING)
<< "ICU ambiguous alias warning for encoding: " << encoding_.GetName();
if (converter_icu_)
- ucnv_setFallback(converter_icu_, TRUE);
+ ucnv_setFallback(converter_icu_, true);
}
int TextCodecICU::DecodeToBuffer(UChar* target,
diff --git a/src/3rdparty/chromium/ui/base/l10n/formatter.cc b/src/3rdparty/chromium/ui/base/l10n/formatter.cc
index 486a3a029cb..d7a41724628 100644
--- a/src/3rdparty/chromium/ui/base/l10n/formatter.cc
+++ b/src/3rdparty/chromium/ui/base/l10n/formatter.cc
@@ -232,7 +232,7 @@ void Formatter::Format(Unit unit,
int value,
icu::UnicodeString* formatted_string) const {
DCHECK(simple_format_[unit]);
- DCHECK(formatted_string->isEmpty() == TRUE);
+ DCHECK(formatted_string->isEmpty() == true);
UErrorCode error = U_ZERO_ERROR;
FormatNumberInPlural(*simple_format_[unit],
value, formatted_string, &error);
@@ -248,7 +248,7 @@ void Formatter::Format(TwoUnits units,
<< "Detailed() not implemented for your (format, length) combination!";
DCHECK(detailed_format_[units][1])
<< "Detailed() not implemented for your (format, length) combination!";
- DCHECK(formatted_string->isEmpty() == TRUE);
+ DCHECK(formatted_string->isEmpty() == true);
UErrorCode error = U_ZERO_ERROR;
FormatNumberInPlural(*detailed_format_[units][0], value_1,
formatted_string, &error);
@@ -281,7 +281,7 @@ std::unique_ptr<icu::MessageFormat> Formatter::InitFormat(
base::string16 pattern = l10n_util::GetStringUTF16(pluralities.id);
UErrorCode error = U_ZERO_ERROR;
std::unique_ptr<icu::MessageFormat> format(new icu::MessageFormat(
- icu::UnicodeString(FALSE, pattern.data(), pattern.length()), error));
+ icu::UnicodeString(false, pattern.data(), pattern.length()), error));
DCHECK(U_SUCCESS(error));
if (format.get())
return format;
--
cgit v1.2.1
+8 -29
View File
@@ -11,12 +11,8 @@
<Summary>Provides support for web applications using the Chromium browser project</Summary>
<Description>Provides support for web applications using the Chromium browser project</Description>
<License>LGPLv2.1-linking-exception</License>
<!-- <Archive sha1sum="f8c9dcda1fda735e404f1f1fd16426a073bf4016" type="tarxz">https://sourceforge.net/projects/pisilinux/files/source/qtwebengine-everywhere-opensource-src-5.15.10.tar.xz/download</Archive> -->
<Archive sha1sum="a2fcfa6493ef3a56757f52501c405d1d65be4dfe" type="tarxz">https://source.pisilinux.org/qtwebengine-everywhere-src-5.15.19.tar.xz</Archive>
<AdditionalFiles>
<!-- <AdditionalFile target="qtwebengine-5.15.7-build_fixes-1.patch" permission="0644">qtwebengine-5.15.7-build_fixes-1.patch</AdditionalFile> -->
<!-- <AdditionalFile target="qtwebengine-everywhere-src-5.15.5-TRUE.patch" permission="0644">qtwebengine-everywhere-src-5.15.5-TRUE.patch</AdditionalFile> -->
</AdditionalFiles>
<Archive sha1sum="cf1884fc1c43fe49e2c560b026f2674e4d902480" type="targz">https://github.com/qt/qtwebengine/archive/refs/tags/v5.15.19-vxworks-lts.tar.gz</Archive>
<Archive sha1sum="e6547475742c6a65373786ec09138bf8e3f6ec7a" type="targz">https://github.com/qt/qtwebengine-chromium/archive/refs/heads/87-based.tar.gz</Archive>
<BuildDependencies>
<Dependency versionFrom="5.15.16">qt5-base-devel</Dependency>
<Dependency versionFrom="5.15.16">qt5-declarative-devel</Dependency>
@@ -88,29 +84,12 @@
<Dependency>mit-kerberos-devel</Dependency>
</BuildDependencies>
<Patches>
<Patch level="1">007-gcc12-includes.patch</Patch>
<Patch level="1">fedora/qtwebengine-opensource-src-5.12.4-fix-extractcflag.patch</Patch>
<Patch level="1">fedora/qtwebengine-opensource-src-5.9.0-no-neon.patch</Patch>
<Patch level="1">fedora/qtwebengine-SIOCGSTAMP.patch</Patch>
<Patch level="1">fedora/qtwebengine-5.15.0-QT_DEPRECATED_VERSION.patch</Patch>
<Patch level="1">fedora/chromium-angle-nullptr.patch</Patch>
<Patch level="1">fedora/chromium-hunspell-nullptr.patch</Patch>
<!--Patch level="1">fedora/qtwebengine-everywhere-5.15.8-libpipewire-0.3.patch</Patch-->
<Patch level="1">fedora/qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch</Patch>
<Patch level="1">fedora/qtwebengine-skia-missing-includes.patch</Patch>
<Patch level="1">fedora/qtwebengine-fix-build.patch</Patch>
<Patch level="1">fedora/qt5-qtwebengine-c99.patch</Patch>
<Patch level="1">fedora/qtwebengine-ffmpeg5.patch</Patch>
<Patch level="1">fedora/qt5-qtwebengine-ffmpeg7.patch</Patch>
<Patch level="1">fedora/qtwebengine-5.15.13_p20240322-ninja1.12.patch</Patch>
<Patch level="1">fedora/fix_build_pdf_extension_util.patch</Patch>
<Patch level="1">fedora/qtwebengine-icu75.patch</Patch>
<Patch level="1">fedora/v8.patch</Patch>
<Patch level="1">fedora/riscv.patch</Patch>
<Patch level="1">fedora/riscv-breakpad.patch</Patch>
<Patch level="1">fedora/riscv-crashpad.patch</Patch>
<Patch level="1">fedora/riscv-sandbox.patch</Patch>
<Patch level="1">arch/0000-qt5-webengine-pipewire-0.3@chromium.patch</Patch>
<Patch level="1">arch/0001-qt5-webengine-icu-75@chromium.patch</Patch>
<Patch level="1">arch/0002-qt5-webengine-ninja-1.12@chromium.patch</Patch>
<Patch level="1">arch/0003a-qt5-webengine-gcc-15@chromium.patch</Patch>
<Patch level="1">arch/0005-python3.12-six@chromium.patch</Patch>
<Patch level="1">arch/0006-qt5-webengine-icu-78@chromium.patch</Patch>
</Patches>
</Source>