Compare commits

...
Sign in to create a new pull request.

420 commits

Author SHA1 Message Date
Than Ngo
8afd224270 - Update to 144.0.7559.59
* CVE-2026-0899: Out of bounds memory access in V8
  * CVE-2026-0900: Inappropriate implementation in V8
  * CVE-2026-0901: Inappropriate implementation in Blink
  * CVE-2026-0902: Inappropriate implementation in V8
  * CVE-2026-0903: Insufficient validation of untrusted input in Downloads
  * CVE-2026-0904: Incorrect security UI in Digital Credentials
  * CVE-2026-0905: Insufficient policy enforcement in Network
  * CVE-2026-0906: Incorrect security UI
  * CVE-2026-0907: Incorrect security UI in Split View
  * CVE-2026-0908: Use after free in ANGLE
2026-01-14 11:03:27 +01:00
Than Ngo
9d700ef13f Fix typo 2026-01-07 15:50:15 +01:00
Than Ngo
9fa42d3890 - Update tp 143.0.7499.192
* High CVE-2026-0628: Insufficient policy enforcement in WebView tag
- Fix rhbz#2425338, Enable control flow integrity support for x86_64/aarch64
- Enable build for epel10.1
2026-01-07 15:49:11 +01:00
Than Ngo
5d3124cac2 Update to 143.0.7499.169 2025-12-20 10:24:21 +01:00
Than Ngo
cbf2808293 - Update to 143.0.7499.146
* High CVE-2025-14765: Use after free in WebGPU
  * High CVE-2025-14766: Out of bounds read and write in V8
- Force dark mode when auto dark mode web content is on
- Remove omnibox-next-Improve-cutout-mouse-handling-for-Wayla patch, as it's merged
2025-12-17 11:30:05 +01:00
Hoshino Lina
fa84178555 Move core BRs out of GTK4 section & add missing ones
These BRs are required by Chromium proper, even when built without any toolkits
(e.g. as CEF).

Add a few missing ones (wayland-devel, xkbcommon, pangocairo) and move others
out of the GTK4 conditional, since they aren't actually related to GTK4, they
just happened to be pulled in by gtk3-devel.
2025-12-13 14:55:06 +09:00
Than Ngo
d0c2893c13 Enable gtk3 for el9 as it still has old gtk4 version 2025-12-12 11:58:21 +01:00
Than Ngo
9cf22f9f1c Add BR for gtk4 2025-12-12 09:43:04 +01:00
Than Ngo
9334d87d2c Enable gtk4 by default 2025-12-11 23:14:37 +01:00
Than Ngo
6196c57429 - Update to 143.0.7499.109
* High: Under coordination
  * Medium CVE-2025-14372: Use after free in Password Manager
  * Medium CVE-2025-14373: Inappropriate implementation in Toolbar
- Workaround problem of auto dark mode inverting images and making them unreadable
2025-12-11 10:08:45 +01:00
LuK1337
538383ec00
Backport Wayland Omnibox bug fix from upstream 2025-12-09 18:28:09 +01:00
Than Ngo
fe4b649258 Fix build error caused by python-3.9 on EL9 2025-12-04 18:25:39 +01:00
Than Ngo
c285730bf0 Fix build error caused by old rustc on el9 2025-12-04 14:39:50 +01:00
Than Ngo
42d5249d17 apply swiftshader-llvm-16.0 patch 2025-12-04 09:57:38 +01:00
Yaakov Selkowitz
a0dda14ce4 Update flatpak patches from flathub 2025-12-04 00:59:02 -05:00
Than Ngo
ffdc3cb055 Update to 143.0.7499.40
* High CVE-2025-13630: Type Confusion in V8
  * High CVE-2025-13631: Inappropriate implementation in Google Updater
  * High CVE-2025-13632: Inappropriate implementation in DevTools
  * High CVE-2025-13633: Use after free in Digital Credentials
  * Medium CVE-2025-13634: Inappropriate implementation in Downloads
  * Medium CVE-2025-13720: Bad cast in Loader
  * Medium CVE-2025-13721: Race in v8
  * Low CVE-2025-13635: Inappropriate implementation in Downloads
  * Low CVE-2025-13636: Inappropriate implementation in Split View
  * Low CVE-2025-13637: Inappropriate implementation in Downloads
  * Low CVE-2025-13638: Use after free in Media Stream
  * Low CVE-2025-13639: Inappropriate implementation in WebRTC
  * Low CVE-2025-13640: Inappropriate implementation in Passwords
- Drop workaround darkmode-image-policy.patch
- Fix build error due to Unresolved dependencies
- Fix swiftshader to compile with llvm-16.0
- Refresh python-3.9-ftbfs patch for el9
- Refresh ppc64le patches
- Refresh chromium.conf
2025-12-03 19:49:16 +01:00
LuK1337
21c645393d
Backport one more Wayland DnD bug fix from upstream 2025-12-01 09:07:42 +01:00
Than Ngo
c33bc72873 Set gtk version to 3 by default 2025-11-25 17:55:14 +01:00
Than Ngo
c2f0304e51 - Enable system libcxx
- Fix link error when building with system libcxx
- Apply memory-allocator-dcheck-assert-fix for aarch64
2025-11-24 09:28:20 +01:00
LuK1337
5bf1f40832
Backport Wayland DnD bug fix from upstream 2025-11-20 23:43:08 +01:00
Than Ngo
f73dbc6fc4 Fix typos in chromium.conf 2025-11-19 16:16:12 +01:00
Than Ngo
dcc67153dc Fix some typos 2025-11-19 16:12:46 +01:00
Than Ngo
be4261aa12 - Update to 142.0.7444.175
* High CVE-2025-13223: Type Confusion in V8
  * High CVE-2025-13224: Type Confusion in V8
2025-11-18 16:51:14 +01:00
LuK1337
6cdfef9f89
Disable LensOverlay feature by default
Google Lens does not work in chromium provided by Fedora, it displays
the following error message when attempting to use it:
  Something went wrong
  Couldn't load this panel, try again
2025-11-15 11:18:32 +01:00
Than Ngo
6f66ead77d Fix FTBFS caused by rust-1.88 on EL9 2025-11-14 21:11:22 +01:00
Mamoru TASAKA
ed7df45b80 Rebuild for ffmpeg 8 again 2025-11-14 08:10:40 +09:00
Than Ngo
cd7bcb965c Fix FTBFS - epel9 has new rust-1.88, dropp chromium-134-rust-libadler2.patch 2025-11-13 17:20:14 +01:00
Than Ngo
50983cda3a - Update to 142.0.7444.162
* High CVE-2025-13042: Inappropriate implementation in V8
2025-11-12 12:04:30 +01:00
Dominik 'Rathann' Mierzejewski
e5504d6b93 Rebuilt for FFmpeg 8 2025-11-11 17:19:38 +01:00
Than Ngo
05db1f4ea9 - Update to 142.0.7444.134
* High CVE-2025-12725: Out of bounds write in WebGPU
  * High CVE-2025-12726: Inappropriate implementation in Views
  * High CVE-2025-12727: Inappropriate implementation in V8
  * Medium CVE-2025-12728: Inappropriate implementation in Omnibox
  * Medium CVE-2025-12729: Inappropriate implementation in Omnibox
2025-11-06 11:00:11 +01:00
Than Ngo
3c9f3b84d3 Merge #59 reduce nvidia power consumption during video accel 2025-11-06 08:36:11 +00:00
Dominik 'Rathann' Mierzejewski
1385ef1e2d Rebuilt for FFmpeg 8 2025-11-05 14:30:45 +01:00
Luan Vitor Simião oliveira
aacc24ed2b
reduce nvidia power consumption during video accel
environment variable added on latest driver 580.105.08, this halves
power consumption with no performance regression
2025-11-04 21:46:56 -03:00
Than Ngo
1abce2e2df Add CVEs in changelog
* High CVE-2025-12428: Type Confusion in V8
    * High CVE-2025-12429: Inappropriate implementation in V8
    * High CVE-2025-12430: Object lifecycle issue in Media
    * High CVE-2025-12431: Inappropriate implementation in Extensions
    * High CVE-2025-12432: Race in V8
    * High CVE-2025-12433: Inappropriate implementation in V8
    * High CVE-2025-12036: Inappropriate implementation in V8
    * Medium CVE-2025-12434: Race in Storage
    * Medium CVE-2025-12435: Incorrect security UI in Omnibox
    * Medium CVE-2025-12436: Policy bypass in Extensions
    * Medium CVE-2025-12437: Use after free in PageInfo
    * Medium CVE-2025-12438: Use after free in Ozone
    * Medium CVE-2025-12439: Inappropriate implementation in App-Bound Encryption
    * Low CVE-2025-12440: Inappropriate implementation in Autofill
    * Medium CVE-2025-12441: Out of bounds read in V8
    * Medium CVE-2025-12443: Out of bounds read in WebXR
    * Low CVE-2025-12444: Incorrect security UI in Fullscreen UI
    * Low CVE-2025-12445: Policy bypass in Extensions
    * Low CVE-2025-12446: Incorrect security UI in SplitView
    * Low CVE-2025-12447: Incorrect security UI in Omnibox
2025-11-04 13:37:09 +01:00
Than Ngo
aa25e963da Update spec file for the FTBFS on EL9 2025-11-03 09:21:06 +01:00
Than Ngo
7b1d533db7 Fixed FTBFS due to old ffmpeg-5.x on EL9 2025-11-03 09:15:55 +01:00
Than Ngo
51dc9ee3be - Update to 142.0.7444.59
* Refreshed ppc64le patches
  * Refreshed system-brotli patch
  * Refreshed clang++-unknown-argument patch
  * Refreshed split-threshold-for-reg-with-hint patch
  * Fixed some FTBFS caused by missing header files
  * Fixed FTBFS caused by old rust compiler
  * Fixed FTBFS caused by new glibc-2.42 in Rawhide
  * Fixed FTBFS caused by old python-3.9.x in EL8/9
  * Dropped obsoleted chromium-141-el9-ffmpeg-5.x-duration.patch for old ffmpeg on EL9
2025-10-30 07:27:50 +01:00
Than Ngo
6256ec076f - Update to 141.0.7390.122
* High CVE-2025-12036 chromium: Inappropriate implementation in V8
2025-10-22 14:23:40 +02:00
Than Ngo
f6f64eb9da - Update 141.0.7390.107
* High CVE-2025-11756: Use after free in Safe Browsing
2025-10-15 12:53:25 +02:00
Than Ngo
2f230cdc4c Update to 141.0.7390.76 2025-10-13 11:18:55 +02:00
Than Ngo
ea47c56394 - Update to 141.0.7390.65
* High CVE-2025-11458: Heap buffer overflow in Sync
  * High CVE-2025-11460: Use after free in Storage
  * Medium CVE-2025-11211: Out of bounds read in WebCodecs
- remove 0001-Change-use-of-removed-intrinsic.patch as it is included in
  141.0.7390.65
2025-10-08 10:36:28 +02:00
Than Ngo
f1cef39bfc remove enable-native-gpu-memory-buffers by default as it causes glitches
by some hardware
2025-10-06 16:01:02 +02:00
Tom Stellard
b3e849fa1a Fix build with clang-22 2025-10-05 06:22:08 +00:00
Luan Vitor Simião oliveira
d3cec61143 add autodetection of wayland
chromium is already selecting wayland when available, add autodetection so x11 flags don't get applied to wayland sessions
2025-10-02 16:34:54 -03:00
Luan Vitor Simião oliveira
9d7ff6b066 remove vulkan features
they the chromium window to show up invisible and are also no longer necessary for hw accel on wayland.
2025-10-02 16:34:54 -03:00
Luan Vitor Simião oliveira
7f737be5cc let chromium handle angle backend selection 2025-10-02 16:34:54 -03:00
Luan Vitor Simião oliveira
f7287aae3d reduced video feature flag duplication 2025-10-02 16:34:54 -03:00
Luan Vitor Simião oliveira
cf4437bd94 explicit angle no longer needed on cr 139+ on nvidia 2025-10-02 16:34:54 -03:00
Luan Vitor Simião oliveira
7cf1f0d343 reorder feature flag to allow for wayland only options 2025-10-02 16:34:54 -03:00
Than Ngo
98bb985bc9 - Update to 141.0.7390.54
* High CVE-2025-11205: Heap buffer overflow in WebGPU
  * High CVE-2025-11206: Heap buffer overflow in Video
  * Medium CVE-2025-11207: Side-channel information leakage in Storage
  * Medium CVE-2025-11208: Inappropriate implementation in Media
  * Medium CVE-2025-11209: Inappropriate implementation in Omnibox
  * Medium CVE-2025-11210: Side-channel information leakage in Tab
  * Medium CVE-2025-11211: Out of bounds read in Media
  * Medium CVE-2025-11212: Inappropriate implementation in Media
  * Medium CVE-2025-11213: Inappropriate implementation in Omnibox
  * Medium CVE-2025-11215: Off by one error in V8
  * Low CVE-2025-11216: Inappropriate implementation in Storage
  * Low CVE-2025-11219: Use after free in V8
- Refreshed ppc64le patches
- Fixed issue with incorrect display of the links on startpage in Darkmode
- Fixed FTBFS - error: no member named 'bPsnrY' in 'Source_Picture_s'
- Fixed, DebugInfo packages aren't being produced
- Refreshed rust-clanglib patch
- Fixed FTBFS due to old ffmpeg on Epel9
- Fixed FTBFS - error: invalid application of 'sizeof' to an incomplete type 'blink::CSSStyleSheet'
- Fixed FTBFS due to missing header files
2025-10-02 08:40:29 +02:00
Than Ngo
cc250835bd Fix rhbz#2398151, chromium FTBFS on EL9 with error: undefined symbol: __rust_no_alloc_shim_is_unstable 2025-09-26 13:56:25 +02:00
Luan Vitor Simião oliveira
941124f3dc remove native-gpu-memory-buffers flag from nvidia section
this was causing glitches when using ozone wayland
also doesn't look required anymore
2025-09-25 17:51:04 -03:00
Than Ngo
e5418b70b4 - Update to 140.0.7339.207
* CVE-2025-10890: Side-channel information leakage in V8
  * CVE-2025-10891: Integer overflow in V8
  * CVE-2025-10892: Integer overflow in V8
2025-09-24 12:00:41 +02:00
Than Ngo
44e91a81db Add __rust_alloc_error_handler_should_panic_v2 to fix the build error:
undefined symbol: __rust_no_alloc_shim_is_unstab
2025-09-22 14:44:44 +02:00
Than Ngo
bd323e3c50 Fix FTBFS on F44 - undefined symbol: __rust_no_alloc_shim_is_unstable 2025-09-21 16:11:26 +02:00
Than Ngo
d1eb059adc - Update to 140.0.7339.185
* CVE-2025-10585: Type Confusion in V8
  * CVE-2025-10500: Use after free in Dawn
  * CVE-2025-10501: Use after free in WebRTC
  * CVE-2025-10502: Heap buffer overflow in ANGLE
  * Fix rendering issue on epel9
2025-09-18 08:27:27 +02:00
Than Ngo
bf178e4a11 - Update to 140.0.7339.127
* CVE-2025-10200: Use after free in Serviceworker
  * CVE-2025-10201: Inappropriate implementation in Mojo
2025-09-11 12:50:43 +02:00
Than Ngo
0df67c8438 Workaround for build error due to old ffmpeg 5.x on el9 2025-09-05 03:14:25 +02:00
Than Ngo
751b92fa96 Fix FTBFS: undefined symbol: __rust_no_alloc_shim_is_unstable on epel 2025-09-04 15:52:56 +02:00
Than Ngo
1d84b0f57e Drop ffmpeg-5.x-reordered_opaque patch as it's merged in upstream 2025-09-04 12:15:28 +02:00
Than Ngo
894e38b319 - rebase swiftshader-fix-build to fix build error on ppc64le
- drop Include-cstddef-to-fix-build fix-ppc64-rust_png-build-error
2025-09-04 07:04:06 +02:00
Than Ngo
bd191847cd Fix file list 2025-09-04 06:08:16 +02:00
Than Ngo
348af3c1a3 rebase clang++-unknown-argument patch 2025-09-03 16:17:01 +02:00
Than Ngo
227ba3dee4 - Update to 140.0.7339.80
* CVE-2025-9864: Use after free in V8
  * CVE-2025-9865: Inappropriate implementation in Toolbar
  * CVE-2025-9866: Inappropriate implementation in Extensions
  * CVE-2025-9867: Inappropriate implementation in Downloads
2025-09-03 12:39:44 +02:00
Than Ngo
27a55d3303 - Update to 139.0.7258.154
* CVE-2025-9478: Use after free in ANGLE
2025-08-28 12:45:04 +02:00
Than Ngo
ca5e61c71c - Updated to 139.0.7258.138
* CVE-2025-9132: Out of bounds write in V8
2025-08-22 14:23:28 +02:00
Dominik Mierzejewski
a23570200e Drop unused nasm build dependency
see https://fedoraproject.org/wiki/Changes/DeprecateYASM
2025-08-20 22:44:43 +02:00
Than Ngo
9a0191f60e Fix rhbz#2387446, FTBFS with rust-1.89.0 2025-08-14 10:04:53 +02:00
Than Ngo
bdab54f047 - Updated to 139.0.7258.127
* CVE-2025-8879: Heap buffer overflow in libaom
  * CVE-2025-8880: Race in V8
  * CVE-2025-8901: Out of bounds write in ANGLE
  * CVE-2025-8881: Inappropriate implementation in File Picker
  * CVE-2025-8882: Use after free in Aura
2025-08-13 12:07:03 +02:00
Than Ngo
853abbb662 - Updated to 139.0.7258.66
* CVE-2025-8576: Use after free in Extensions
  * CVE-2025-8578: Use after free in Cast
  * CVE-2025-8579: Inappropriate implementation in Gemini Live in Chrome
  * CVE-2025-8580: Inappropriate implementation in Filesystems
  * CVE-2025-8581: Inappropriate implementation in Extensions
  * CVE-2025-8582: Insufficient validation of untrusted input in DOM
  * CVE-2025-8583: Inappropriate implementation in Permissions
2025-08-05 23:30:32 +02:00
Tom Stellard
81b49fd649 Backport fix for build failure with clang-21 2025-08-04 23:05:03 +00:00
Than Ngo
c438ab8fe6 - Update to 138.0.7204.183
* CVE-2025-8292: Use after free in Media Stream
2025-07-31 09:36:43 +02:00
Luan Oliveira
ae6fa6df3d Update chromium.conf - rename vaapi flags
some vaapi flags were renamed to accelerated video in chromium 131
2025-07-25 15:10:02 +00:00
Fedora Release Engineering
1c3963b175 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-23 18:17:32 +00:00
Than Ngo
bba3529104 - Update to 138.0.7204.168
* CVE-2025-8010: Type Confusion in V8
  * CVE-2025-8011: Type Confusion in V8
2025-07-23 13:18:58 +02:00
Luan Oliveira
3f3a74de58 fix localizations on chromium-browser.desktop
https://specifications.freedesktop.org/desktop-entry-spec/latest/localized-keys.html
fix RHBZ#2361244
2025-07-22 12:54:37 +00:00
Than Ngo
f3139ecb55 - Update to 138.0.7204.157
* CVE-2025-7656: Integer overflow in V8
  * CVE-2025-7657: Use after free in WebRTC
  * CVE-2025-6558: Incorrect validation of untrusted input in ANGLE and GPU
2025-07-16 11:50:20 +02:00
Tom Stellard
51301170d4 More cleanups for the rust-clanglib patch
This is probably deadcode already but simplify the condition and make
sure it's comparing with an integer and not a string.
2025-07-11 22:39:59 +00:00
Tom Stellard
19700ea3b0 Update rust-clanglib patch for clang 21 2025-07-11 14:23:56 +00:00
Than Ngo
fe4935a440 Update to 138.0.7204.100 2025-07-09 12:04:58 +02:00
Than Ngo
82fc399990 Fix typo in changelog 2025-07-03 12:07:43 +02:00
Than Ngo
cb92bca934 - Update to 138.0.7204.92
* High CVE-2025-6554: Type Confusion in V8
2025-07-03 11:43:10 +02:00
Than Ngo
4174ac0359 Fix FTBFS due to old ffmpeg version on EL9 2025-06-25 18:27:36 +02:00
Than Ngo
30e01f66d0 - FTBFS, Refreshed chromium-clang++-unknown-argument.patch
- FTBFS, Refreshed memory-allocator-dcheck-assert-fix.patch
2025-06-25 09:11:52 +02:00
Than Ngo
99ff6b4d85 - Update to 138.0.7204.49
* CVE-2025-6555: Use after free in Animation
  * CVE-2025-6556: Insufficient policy enforcement in Loader
  * CVE-2025-6557: Insufficient data validation in DevTools
2025-06-24 23:43:49 +02:00
Than Ngo
f55a174b7c - Update to 137.0.7151.119
* CVE-2025-6191: Integer overflow in V8
  * CVE-2025-6192: Use after free in Profiler
2025-06-18 10:27:03 +02:00
Than Ngo
f1498d7d81 - Update to 137.0.7151.103
* CVE-2025-5958: Use after free in Media
  * CVE-2025-5959: Type Confusion in V8
- Provide correct version for bundle librarires
- Fix rhbz#2368923, Chromium crash
2025-06-11 09:37:30 +02:00
Than Ngo
dee384f446 - refreshed ppc64le patches
- cleanup fedora/epel conditions
2025-06-04 12:07:15 +02:00
Than Ngo
ffc0f668ec Fix FTBFS on EL9 due to libadler 2025-06-03 22:41:23 +02:00
Than Ngo
24bb6db927 Fix FTBFS with rust-1.86 in EPEL10 2025-06-03 17:00:22 +02:00
Than Ngo
4aa5878994 - Update to 137.0.7151.68
* CVE-2025-5419: Out of bounds read and write in V8
  * CVE-2025-5068: Use after free in Blink
2025-06-03 11:38:54 +02:00
Than Ngo
9175afe7bf Fix FTBFS on ppc64le 2025-05-29 11:17:57 +02:00
Than Ngo
b1015a3ed4 - Fix condition for clang++-unsupported-argument
- Remove useless chromium-133-rust-crc32fast.patch
2025-05-28 16:43:00 +02:00
Than Ngo
0441c746f0 - Remove old patches for clang18 as epel-8/9/10 and fedora already have clang >=19.x
- Fix FTBFS caused by an unknown argument (clang < 20.x)
2025-05-28 11:58:10 +02:00
Than Ngo
b7e0f6070b - Update to 137.0.7151.55
* CVE-2025-5063: Use after free in Compositing
  * CVE-2025-5280: Out of bounds write in V8
  * CVE-2025-5064: Inappropriate implementation in Background Fetch API
  * CVE-2025-5065: Inappropriate implementation in FileSystemAccess API
  * CVE-2025-5066: Inappropriate implementation in Messages
  * CVE-2025-5281: Inappropriate implementation in BFCache
  * CVE-2025-5283: Use after free in libvpx
  * CVE-2025-5067: Inappropriate implementation in Tab Strip
- Fix FTBFS caused by simdutf and pdfium-png_decoder
- Remove chromium-135-gperf.patch and chromium-135-add-cfi-suppressions-for-pipewire-functions.patch, merged by upstream
- Refresh ppc64le patches
- Enable system simdutf for F43
2025-05-27 23:18:23 +02:00
Jitka Plesnikova
7f177695da Rebuilt for flac 1.5.0 2025-05-27 17:04:57 +02:00
Than Ngo
e5d715b3d6 in f43, system simdutf is incompatible and causes FTBFS. 2025-05-17 17:15:07 +02:00
Than Ngo
c183b6d100 * Fix FTBFS - ld.lld: error: unable to find library -latomic
Add BR gcc-toolset-14-libatomic-devel for clang-19.x on el9 to fix FTBFS

  ld.lld: error: unable to find library -latomic

* Fix condition for el8 build due to old clang/rust
2025-05-16 23:46:39 +02:00
Than Ngo
48bbe02d1d Fix another Typo 2025-05-15 13:29:31 +02:00
Than Ngo
c88c58dc11 Enable system simdutf for Fedora build 2025-05-15 13:28:03 +02:00
Than Ngo
e89a0949b3 Fix typo 2025-05-15 11:48:45 +02:00
Than Ngo
90322e2621 Enable system simdutf for Fedora 2025-05-15 11:46:44 +02:00
Than Ngo
aeb3513d14 - Update to 136.0.7103.113
* CVE-2025-4664: Insufficient policy enforcement in Loader
  * CVE-2025-4609: Incorrect handle provided in unspecified circumstances in Mojo
2025-05-15 10:43:20 +02:00
Than Ngo
73838bc519 Fix Error loading V8 startup snapshot file 2025-05-14 11:55:12 +02:00
Than Ngo
2275a819c8 Fix FTBFS caused by bindgen-cli-0.71, rust-1.79.0 on EL9 2025-05-08 15:07:53 +02:00
Than Ngo
e86d6fcf7b Fix incorrect clang_base_path which caused FTBFS in EL10. 2025-05-07 19:50:24 +02:00
Than Ngo
4242c89546 - Update to 136.0.7103.92
* CVE-2025-4372: Use after free in WebAudio
2025-05-07 07:34:36 +02:00
Than Ngo
84194df9f5 Update chromium-latest.py 2025-05-02 11:29:06 +02:00
Than Ngo
c4b52ce102 Workaround for clang crash due to old clang-18.x on x86_64 el9/fedora40 2025-04-30 18:01:40 +02:00
Than Ngo
a5cbb02c74 Disable warning-suppression-mappings as it causes FTBFS on el/f40/f41 due to old llvm 2025-04-30 11:01:06 +02:00
Than Ngo
30ebe15eb3 - Update to 136.0.7103.59
* CVE-2025-4096: Heap buffer overflow in HTML
  * CVE-2025-4050: Out of bounds memory access in DevTools
  * CVE-2025-4051: Insufficient data validation in DevTools
  * CVE-2025-4052: Inappropriate implementation in DevTools
2025-04-30 00:18:49 +02:00
Than Ngo
c710b35d38 - Update to 136.0.7103.48
* Refresh ppc64le patches
  * Drop bundle esbuild
  * Drop bundle nodejs
  * Refresh system-brotli, unsupport-clang-flags patches
  * Disable NodeJS version check
  * Fixed ftbfs, skrifa build error due to old rustc
  * Drop chromium-133-pipewire-cast patch, merged by upstream
  * Drop chromium-135-print-review-fail patch, merged by upstream
  * Disable warning-suppression-mappings as it causes FTBFS on el9/f40 due to old llvm
2025-04-29 18:52:43 +02:00
Than Ngo
97dc450dcf updated hash file 2025-04-23 10:53:44 +02:00
Than Ngo
be538748f3 Update to 135.0.7049.114 2025-04-23 10:50:57 +02:00
Than Ngo
b6a4674a71 Updated chromium-135.0.7049.95-clean.tar.xz.hashes 2025-04-17 09:06:01 +02:00
Than Ngo
c1fd0feaf2 - Update to 135.0.7049.95
* CVE-2025-3619: Heap buffer overflow in Codecs
  * CVE-2025-3620: Use after free in USB
2025-04-16 17:24:37 +02:00
Than Ngo
09bc163b2e Backport upstream, fix Print preview almost fails and prevents printing 2025-04-14 10:41:17 +02:00
Than Ngo
f3b7db492c Prevent FTBFS due to changes in gperf 3.2 generated code in F43. 2025-04-12 15:11:17 +02:00
Than Ngo
051dbef9c1 Refreshed flatpak patches 2025-04-12 13:17:37 +02:00
Than Ngo
e10023df54 rust-1.86 is landed in fedora 2025-04-10 09:13:13 +02:00
Than Ngo
0d97617485 - Update to 135.0.7049.84
* CVE-2025-3066: Use after free in Site Isolation
2025-04-09 10:55:12 +02:00
Than Ngo
1e076f59fd Fix FTBFS with rust-1.86 that replaces adler with adler2 on f43, 2025-04-04 15:13:15 +02:00
Than Ngo
98aabf1afa ...
gen/third_party/skia/experimental/rust_png/ffi/FFI.rs.cc:919:59: error: no member named 'unique_ptr' in namespace 'std'
  919 | ::rust::Box<::rust_png::ResultOfReader> new_reader(::std::unique_ptr<::rust_png::ReadTrait> input) noexcept {
..

Fix build error on el10, ppc64le
2025-04-03 12:17:18 +02:00
Than Ngo
45cd37cf1c Fixed build error on el9 due to old nodejs 2025-04-02 13:01:44 +02:00
Jan Grulich
6e28cb22e9 Add CFI suppressions for inline PipeWire functions 2025-04-02 07:52:09 +02:00
Than Ngo
cd9fd6fe3e Update to 135.0.7049.52 2025-04-02 00:10:38 +02:00
Than Ngo
722e743582 Removed llvm Workaround as it's fixed in llvm-20.1.1-1 in f-42/rawhide 2025-03-31 16:27:54 +02:00
Than Ngo
042548a7a4 Update to 135.0.7049.41 2025-03-29 12:02:32 +01:00
Than Ngo
9366c8cc10 Add BR on esbuild for el10 on ppc64le 2025-03-24 14:55:45 +01:00
Than Ngo
44be6f8d7d - Update to 134.0.6998.165
- Fixed rhbz#2354377 - Enable ppc64le support for el10
2025-03-24 11:02:43 +01:00
Than Ngo
107e3b9b1c - Update to 134.0.6998.117
* Critical CVE-2025-2476: Use after free in Lens
2025-03-20 09:24:31 +01:00
Than Ngo
f66692205e built with -mllvm -ppc-global-merge=0 on ppc64le as workaround for
regression in llvm20
2025-03-19 13:38:58 +01:00
Than Ngo
6c629ab5e9 Fixed rhbz#2352698, rebuild for noopenh264 2.6.0 2025-03-17 14:38:32 +01:00
Than Ngo
1df6a6e0fe Fixed build error with new pipewire in f41 2025-03-17 09:54:08 +01:00
Than Ngo
135bb928dc Fixed build errors on ppc64le 2025-03-14 17:35:11 +01:00
Fabio Valentini
1ba25f1731
Rebuild for noopenh264 2.6.0 2025-03-13 18:46:14 +01:00
Than Ngo
34fff1ea7f - Fixed build error with clang20 in f42 and rawhide
- Fixed build error when using ccache
2025-03-12 10:01:48 +01:00
Than Ngo
5f903864c5 - Update to 134.0.6998.88
* High CVE-2025-1920: Type Confusion in V8
  * High CVE-2025-2135: Type Confusion in V8
  * High CVE-TBD: Out of bounds write in GPU
  * Medium CVE-2025-2136: Use after free in Inspector
  * Medium CVE-2025-2137: Out of bounds read in V8
2025-03-11 09:51:45 +01:00
Than Ngo
b287e3cae6 - Update to 134.0.6998.35
* CVE-2025-1914: Out of bounds read in V8
  * CVE-2025-1915: Improper Limitation of a Pathname to a Restricted Directory in DevTools
  * CVE-2025-1916: Use after free in Profiles
  * CVE-2025-1917: Inappropriate Implementation in Browser UI
  * CVE-2025-1918: Out of bounds read in PDFium
  * CVE-2025-1919: Out of bounds read in Media
  * CVE-2025-1921: Inappropriate Implementation in Media Stream
  * CVE-2025-1922: Inappropriate Implementation in Selection
  * CVE-2025-1923: Inappropriate Implementation in Permission Prompts
2025-03-05 15:37:32 +01:00
Than Ngo
fc20aaa3d9 Update to 133.0.6943.141 2025-02-26 09:58:26 +01:00
Yaakov Selkowitz
efbbbe1413 Fix clang_base_path for flatpak builds
llvm is no longer in the runtimes now that mesa is an extension, so it is
rebuilt in /app for flatpaks.  Therefore, its location must be detected
dynamically.  bindgen must also respect it rather than assuming llvm is in
its own prefix.
2025-02-21 14:46:11 -05:00
Than Ngo
6d40ea788b - Update to 133.0.6943.126
* CVE-2025-0999: Heap buffer overflow in V8
  * CVE-2025-1426: Heap buffer overflow in GPU
  * CVE-2025-1006: Use after free in Network
2025-02-19 10:37:01 +01:00
Than Ngo
022a981330 - Cleanup
- Added ffmpegremove option to remove the bundle ffmpeg source when building with system ffmpeg
2025-02-17 16:00:37 +01:00
Yaakov Selkowitz
2485f12f14 Update flatpak patches 2025-02-16 12:13:12 -05:00
Than Ngo
9c1fece1b4 Update URL for PowerPC64 LE support 2025-02-14 14:41:02 +01:00
Than Ngo
25f20e5f9b Fix, opus and some another audio formats stop playing 2025-02-14 14:38:56 +01:00
Than Ngo
5364688acd Set clang_base_path correctly for f42 and later 2025-02-13 21:48:14 +01:00
Than Ngo
e124f2b634 Refreshed patches for chromium flatpak build 2025-02-13 17:36:14 +01:00
Than Ngo
a05771b757 - Update to 133.0.6943.98
* CVE-2025-0995: Use after free in V8
  * CVE-2025-0996: Inappropriate implementation in Browser UI
  * CVE-2025-0997: Use after free in Navigation
  * CVE-2025-0998: Out of bounds memory access in V
2025-02-13 12:23:57 +01:00
Than Ngo
ed617fb212 Fix build error with new pipewire in f43 2025-02-12 20:35:07 +01:00
Than Ngo
dd44f0abc6 Set clang_base_path correctly for f43 and later 2025-02-11 20:50:45 +01:00
Than Ngo
94d242b6a5 Fix build error on el 8/9 - use of unstable library feature stdarch_arm_crc32 2025-02-11 00:30:29 +01:00
Than Ngo
07ebb27a11 Fix build error due to old clang18 in el 8/9 and f40 2025-02-10 14:30:40 +01:00
Than Ngo
36e349916c - Fix youtube stop working
- Fix build errors
- Remove build_remoting, build_clear_key_cdm, policy_templates
2025-02-09 23:48:31 +01:00
Than Ngo
21faf47e5d - Update to 133.0.6943.53
* CVE-2025-0444: Use after free in Skia
  * CVE-2025-0445: Use after free in V8
  * CVE-2025-0451: Inappropriate implementation in Extensions API
2025-02-05 18:17:03 +01:00
Than Ngo
f15fef4fb5 - Updated to 132.0.6834.159
* Medium CVE-2025-0762: Use after free in DevTools
2025-01-29 12:14:21 +01:00
Than Ngo
0c209b92ae Merge #46 Fix flatpak build 2025-01-27 16:13:25 +00:00
Than Ngo
f30bbc29ca - Update to 132.0.6834.110
* High CVE-2025-0611: Object corruption in V8
  * High CVE-2025-0612: Out of bounds memory access in V8
- Drop el8 workaround
2025-01-23 13:01:33 +01:00
Yaakov Selkowitz
b73d675e71 Fix flatpak build
This adds patches from Flathub to use the Flatpak sandbox (as the GUID
sandbox is not compatible with Flatpak's own), removes dependencies on host
services, and uses automatic detection of dependency locations (since
dependencies are not necessarily found in /app even when building therein,
as the buildroot is still in /usr).
2025-01-20 22:21:44 +00:00
Than Ngo
1e146bce28 Fix build error on el8 aarch64 2025-01-16 14:51:07 +01:00
Fedora Release Engineering
718cc037e4 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-16 13:42:42 +00:00
Than Ngo
e4a217a53b Fix build error on el8 aarch64 2025-01-16 09:13:39 +01:00
Than Ngo
7c5eaaf02c Fix build error on el9 aarch64 2025-01-15 23:17:13 +01:00
Than Ngo
4027de0281 Fix build error on el9 aarch64 2025-01-15 20:48:10 +01:00
Than Ngo
0c1b3b7a89 Fix build errors on f40 2025-01-15 20:25:57 +01:00
Than Ngo
d45c9f075a Fix build errors on EL9 2025-01-15 13:43:01 +01:00
Than Ngo
35c8f2ca20 - Update to 132.0.6834.83
* High CVE-2025-0434: Out of bounds memory access in V8
  * High CVE-2025-0435: Inappropriate implementation in Navigation
  * High CVE-2025-0436: Integer overflow in Skia
  * High CVE-2025-0437: Out of bounds read in Metrics
  * High CVE-2025-0438: Stack buffer overflow in Tracing
  * Medium CVE-2025-0439: Race in Frames
  * Medium CVE-2025-0440: Inappropriate implementation in Fullscreen
  * Medium CVE-2025-0441: Inappropriate implementation in Fenced
  * Medium CVE-2025-0442: Inappropriate implementation in Payments
  * Medium CVE-2025-0443: Insufficient data validation in Extensions
  * Low CVE-2025-0446: Inappropriate implementation in Extensions
  * Low CVE-2025-0447: Inappropriate implementation in Navigation
  * Low CVE-2025-0448: Inappropriate implementation in Compositing
- Refreshed ppc64 patches
- Enabled libtiff for fedora > 41
- Removed useless patches
- Fixed some build errors on EL8
2025-01-15 09:58:11 +01:00
Than Ngo
49962a66b9 - Update to 131.0.6778.264
* High CVE-2025-0291: Type Confusion in V8
2025-01-08 11:05:03 +01:00
Than Ngo
fcd074b9c3 - Update to 131.0.6778.204
* High CVE-2024-12692: Type Confusion in V8
  * High CVE-2024-12693: Out of bounds memory access in V8
  * High CVE-2024-12694: Use after free in Compositing
  * High CVE-2024-12695: Out of bounds write in V8
2024-12-19 10:58:32 +01:00
Than Ngo
1d58e3042d - Update to 131.0.6778.139
* High CVE-2024-12381: Type Confusion in V8
  * High CVE-2024-12382: Use after free in Translate
2024-12-11 13:23:20 +01:00
Than Ngo
3585ae088c Enable Vulkan for intel graphic driver by default 2024-12-04 17:20:45 +01:00
Than Ngo
3ed80b6d8f - Update to 131.0.6778.108
* High CVE-2024-12053: Type Confusion in V8
- removed a workaround for build error on el8
2024-12-04 10:38:17 +01:00
Than Ngo
cc4c497ae7 Revert decommit pooled pages by default patch (fix random crash) 2024-11-23 20:30:27 +01:00
Than Ngo
b9075d0e1f Enable qt-ui 2024-11-23 12:33:22 +01:00
Than Ngo
f8685925e2 Update clean_ffmpeg.sh 2024-11-22 19:45:28 +01:00
Than Ngo
a73b96ac79 Refresh libavcodec-parser.patch 2024-11-22 14:59:29 +01:00
Than Ngo
6b110a34db Refresh libavcodec-parser.patch 2024-11-22 10:43:05 +01:00
Than Ngo
be88674812 Fix build error on el8 2024-11-22 09:51:52 +01:00
Than Ngo
5236752714 Disable PA_MUSTTAIL to fix build faiure on ppc64le 2024-11-20 19:53:07 +01:00
Than Ngo
e975118e0a - Update to 131.0.6778.85
* High CVE-2024-11395: Type Confusion in V8
  * High CVE-2024-11110: Inappropriate implementation in Blink
  * Medium CVE-2024-11111: Inappropriate implementation in Autofill
  * Medium CVE-2024-11112: Use after free in Media
  * Medium CVE-2024-11113: Use after free in Accessibility
  * Medium CVE-2024-11114: Inappropriate implementation in Views
  * Medium CVE-2024-11115: Insufficient policy enforcement in Navigation
  * Medium CVE-2024-11116: Inappropriate implementation in Paint
  * Low CVE-2024-11117: Inappropriate implementation in FileSystem
- Add get_chromium_from_git.sh
- Disable custom_libcxx
- Refresh patches
2024-11-20 11:18:18 +01:00
Than Ngo
922a09c390 Fix Build requirement on java-openjdk-headless 2024-11-13 15:46:03 +01:00
Than Ngo
2cde5e5df1 Fix changelog 2024-11-10 14:37:14 +01:00
Than Ngo
da89ab8ed2 - Update to 130.0.6723.116
* High CVE-2024-10826: Use after free in Family Experience
  * High CVE-2024-10827: Use after free in Serial
2024-11-10 14:18:02 +01:00
Than Ngo
6bcefe467a - Update to 130.0.6723.91
* Critical CVE-2024-10487: Out of bounds write in Dawn
  * High CVE-2024-10488: Use after free in WebRTC
2024-11-10 13:53:19 +01:00
Than Ngo
d2e4cc4a9b - Update to 130.0.6723.91
* Critical CVE-2024-10487: Out of bounds write in Dawn
  * High CVE-2024-10488: Use after free in WebRTC
2024-11-02 11:57:19 +01:00
Than Ngo
f73c0983b4 - update to 130.0.6723.69
* High CVE-2024-10229: Inappropriate implementation in Extensions
  * High CVE-2024-10230: Type Confusion in V8
  * High CVE-2024-10231: Type Confusion in V8# Bitte geben Sie eine Commit-Beschreibung für Ihre Änderungen ein. Zeilen,
2024-10-26 13:14:22 +02:00
Than Ngo
611aa08482 fix typo 2024-10-23 17:07:10 +02:00
Than Ngo
79dea59fdf fixed a condition for epel10 2024-10-23 17:05:20 +02:00
Than Ngo
eec6ad9bad Add missing pthread stack size for ppc64 (openpower-patches) 2024-10-21 11:37:03 +02:00
Than Ngo
c675db4ac0 fix build error on ppc64le 2024-10-17 19:36:48 +02:00
Than Ngo
cfb5842982 - update to 130.0.6723.58
* High CVE-2024-9954: Use after free in AI
  * Medium CVE-2024-9955: Use after free in Web Authentication
  * Medium CVE-2024-9956: Inappropriate implementation in Web Authentication
  * Medium CVE-2024-9957: Use after free in UI
  * Medium CVE-2024-9958: Inappropriate implementation in PictureInPicture
  * Medium CVE-2024-9959: Use after free in DevTools
  * Medium CVE-2024-9960: Use after free in Dawn
  * Medium CVE-2024-9961: Use after free in Parcel Tracking
  * Medium CVE-2024-9962: Inappropriate implementation in Permissions
  * Medium CVE-2024-9963: Insufficient data validation in Downloads
  * Low CVE-2024-9964: Inappropriate implementation in Payments
  * Low CVE-2024-9965: Insufficient data validation in DevTools
  * Low CVE-2024-9966: Inappropriate implementation in Navigations
- enable noopenh264 support for epel >8
2024-10-17 09:30:07 +02:00
Than Ngo
975468507c * Wed Oct 09 2024 Than Ngo <than@redhat.com> - 129.0.6668.100-1
- update to 129.0.6668.100
  * CVE-2024-9602: Type Confusion in V8
  * CVE-2024-9603: Type Confusion in V8
2024-10-09 21:11:20 +02:00
Than Ngo
f13f23629d - update to 129.0.6668.89
* High CVE -2024-7025: Integer overflow in Layout
  * High CVE-2024-9369: Insufficient data validation in Mojo
  * High CVE-2024-9370: Inappropriate implementation in V8
2024-10-02 18:55:51 +02:00
Than Ngo
a54abdb392 add clang-19 support 2024-09-30 11:18:13 +02:00
Dominik 'Rathann' Mierzejewski
a8bd0425b9 Rebuilt for FFmpeg 7 2024-09-27 17:49:22 +02:00
Than Ngo
87841bbac7 - update to 129.0.6668.70
* High CVE-2024-9120: Use after free in Dawn
  * High CVE-2024-9121: Inappropriate implementation in V8
  * High CVE-2024-9122: Type Confusion in V8
  * High CVE-2024-9123: Integer overflow in Skia
2024-09-25 10:39:38 +02:00
Than Ngo
620aa89055 add BR on gcc-toolset-13-libatomic-devel for el 8/9 2024-09-19 12:58:24 +02:00
Than Ngo
cb09b6d3ba clean up 2024-09-19 11:32:25 +02:00
Than Ngo
89b96d8a84 fixed typo (enable headless_shell) 2024-09-18 20:50:54 +02:00
Than Ngo
ddd8291088 workaround for build error due to old atk version on el8 2024-09-18 20:37:15 +02:00
Than Ngo
6fd5938766 - update to 129.0.6668.58
* High CVE-2024-8904: Type Confusion in V8
  * Medium CVE-2024-8905: Inappropriate implementation in V8
  * Medium CVE-2024-8906: Incorrect security UI in Downloads
  * Medium CVE-2024-8907: Insufficient data validation in Omnibox
  * Low CVE-2024-8908: Inappropriate implementation in Autofill
  * Low CVE-2024-8909: Inappropriate implementation in UI
2024-09-18 01:28:16 +02:00
Than Ngo
a00f39b974 set correct rust_bindgen_root for el8 2024-09-11 13:18:33 +02:00
Than Ngo
c3dc494bbb - update to 128.0.6613.137
* High CVE-2024-8636: Heap buffer overflow in Skia
  * High CVE-2024-8637: Use after free in Media Router
  * High CVE-2024-8638: Type Confusion in V8
  * High CVE-2024-8639: Use after free in Autofill
2024-09-11 08:53:31 +02:00
Than Ngo
97da4a0b9f - removed workaround for missing bindgen-cli on el8
- removed partition-alloc-4k-detect.patch
2024-09-10 12:19:37 +02:00
Than Ngo
e54d1538ea enable bundlelibopenjpeg2 as workaround for old openjpeg on epel
error: use of undeclared identifier 'opj_decoder_set_strict_mode'
2024-09-06 20:44:09 +02:00
Than Ngo
ada748216c removed patch for 64kpage support on aarch64, merged by upstream 2024-09-06 20:23:23 +02:00
Than Ngo
7187ed89f5 workaround for build error on epel and fedora39 2024-09-06 17:51:40 +02:00
Than Ngo
24a34d44c8 - fix build error and disable build warnings on ppc64le
- drop obsolete patches
2024-09-06 12:47:01 +02:00
Than Ngo
07b19404a1 update to 128.0.6613.119 2024-09-05 19:23:29 +02:00
Than Ngo
ba85b2fdff - update to 127.0.6533.99
* Critical CVE-2024-7532: Out of bounds memory access in ANGLE
  * High CVE-2024-7533: Use after free in Sharing
  * High CVE-2024-7550: Type Confusion in V8
  * High CVE-2024-7534: Heap buffer overflow in Layout
  * High CVE-2024-7535: Inappropriate implementation in V8
  * High CVE-2024-7536: Use after free in WebAudio
2024-08-07 10:21:18 +02:00
Than Ngo
cba05eac94 - fix rhbz#2294773 - Allow enabling vulkan on ozone wayland for AMD vaapi
- add ppc64le patch to fix runtime assertion trap on ppc64el systems
- refresh ppc64le patch to work around broken 64k allocator code on arm64
2024-08-06 17:59:18 +02:00
Than Ngo
7a9444bd5f - remove old patch that seems to be the cause of a crash
when the user set user.max_user_namespaces to 0
2024-08-01 11:29:45 +02:00
Than Ngo
dd7b387573 - update to 127.0.6533.88
- refreshed ppc64le patches
- workaround for build error on aarch64 F41
2024-07-31 10:30:27 +02:00
Than Ngo
6f1e1e3f62 recreated source 2024-07-28 14:07:43 +02:00
Than Ngo
d31a033826 add missing files for el8 on aarch64 2024-07-28 11:57:43 +02:00
Than Ngo
dc769b5526 remove old patch for el8 2024-07-27 11:39:29 +02:00
Than Ngo
3396c12c11 workaround for missing bindgen on el8 2024-07-27 00:25:01 +02:00
Than Ngo
1363667847 refresh ppc64le patches 2024-07-26 23:27:14 +02:00
Than Ngo
3817a34ec5 Run without accessing the network 2024-07-26 20:51:40 +02:00
Than Ngo
e8d387a9db Fix File format not recognized 2024-07-26 19:49:37 +02:00
Than Ngo
66480303b2 drop unsupported rpm macro el8 2024-07-26 18:59:07 +02:00
Than Ngo
1e6dd8bb56 enable bundleicu as workaround for build error 2024-07-26 18:31:46 +02:00
Than Ngo
56046b9dcc cleanup bundle libs 2024-07-26 18:00:24 +02:00
Than Ngo
172edf5cd4 - refresh patches for aarch64
- add workaround for build error on aarch64 (highway)
- update chromium-latest.py (removing unused sttuffs)
- add bindgen for el8 build
- add upstream patch to fix build dep in crabbyavif
2024-07-26 17:13:08 +02:00
Than Ngo
3008fac76f refresh source, remove unused stuffs 2024-07-26 08:22:44 +02:00
Than Ngo
5b27efc518 - update to 127.0.6533.72
* CVE-2024-6988: Use after free in Downloads
       * CVE-2024-6989: Use after free in Loader
       * CVE-2024-6991: Use after free in Dawn
       * CVE-2024-6992: Out of bounds memory access in ANGLE
       * CVE-2024-6993: Inappropriate implementation in Canvas
       * CVE-2024-6994: Heap buffer overflow in Layout
       * CVE-2024-6995: Inappropriate implementation in Fullscreen
       * CVE-2024-6996: Race in Frames
       * CVE-2024-6997: Use after free in Tabs
       * CVE-2024-6998: Use after free in User Education
       * CVE-2024-6999: Inappropriate implementation in FedCM
       * CVE-2024-7000: Use after free in CSS. Reported by Anonymous
       * CVE-2024-7001: Inappropriate implementation in HTML
       * CVE-2024-7003: Inappropriate implementation in FedCM
       * CVE-2024-7004: Insufficient validation of untrusted input in Safe Browsing
       * CVE-2024-7005: Insufficient validation of untrusted input in Safe
- remove unsupported use_gold, use_goma
- enable bootstrap for epel as gn is old (need to update gn on epel)
- enable bundleicu and bundledav1d (need to update icu and dav1d)
- apply upstream patches to fix build issues with ninja-1.21.1 (fedora >39)
- pipewire is old on el8, new version is required, disable it temporary
2024-07-24 23:45:03 +02:00
Than Ngo
d69c30e61b - upload chromium-127.0.6533.72 source
- update chromium-latest.py to remove useless stuff (saving 800MB)
2024-07-24 23:32:11 +02:00
Than Ngo
cbb6b50391 adapt scripts for new ffmpeg 2024-07-24 22:18:44 +02:00
Than Ngo
a9002f8e77 backport patch to fix unlogged assert on startup (ppc64le) 2024-07-22 12:41:24 +02:00
Than Ngo
dd3936a5fb fix error: undefined symbol: llvm::MCAsmInfoXCOFF::MCAsmInfoXCOFF() 2024-07-21 11:30:02 +02:00
Than Ngo
1553bbdf81 update powerpc patches 2024-07-20 14:18:35 +02:00
Than Ngo
afdd9bead5 drop duplicate patch 2024-07-20 13:08:56 +02:00
Than Ngo
8ac50753d5 drop old patch 2024-07-20 13:01:47 +02:00
Than Ngo
42ab71af40 cleanup patches and specfile 2024-07-20 13:00:34 +02:00
Than Ngo
f4cfc9c758 drop el7 stuff 2024-07-20 12:04:14 +02:00
Than Ngo
0613d4b2fe drop el7 stuff 2024-07-20 12:02:46 +02:00
Than Ngo
a8386adfcf drop obsoleted patches as we have new clang-17.0.6 and rust-1.75 in el8/9 2024-07-20 11:51:33 +02:00
Than Ngo
db13fed161 there is new libva in el9.4 which supports AV1 VAAPI video encode,
drop chromium-122-revert-av1enc-el9.patch
2024-07-20 11:43:56 +02:00
Than Ngo
640731430a fix typo 2024-07-20 11:38:04 +02:00
Than Ngo
19a0fb38ce drop chromium support for el7 2024-07-20 11:35:33 +02:00
Than Ngo
ebe9f27e23 there is new website for ppc64 patches, update url 2024-07-19 11:20:28 +02:00
Than Ngo
2cd28e4a58 disable is_cfi flag on ppc64le as it is not supported.
https://bugzilla.redhat.com/show_bug.cgi?id=2298822
2024-07-19 11:12:09 +02:00
Than Ngo
8326e719e5 fixed condition for is_cfi/use_thin_lto on aarch64/ppc64le 2024-07-18 20:57:20 +02:00
Than Ngo
8d635cb4c4 - update to 126.0.6478.182
* High CVE-2024-6772: Inappropriate implementation in V8
  * High CVE-2024-6773: Type Confusion in V8
  * High CVE-2024-6774: Use after free in Screen Capture
  * High CVE-2024-6775: Use after free in Media Stream
  * High CVE-2024-6776: Use after free in Audio
  * High CVE-2024-6777: Use after free in Navigation
  * High CVE-2024-6778: Race in DevTools
  * High CVE-2024-6779: Out of bounds memory access in V8
2024-07-17 10:49:21 +02:00
Than Ngo
c5bf1b53c6 made qt5-ui and qt6-ui as subpackage 2024-07-13 00:01:00 +02:00
Than Ngo
3e5a07d280 drop qt5 ui i n rawhide 2024-07-12 16:25:45 +02:00
Than Ngo
b58288b7fb fixed rhbz#2293202, chromium Wayland UI regression 2024-07-07 11:19:11 +02:00
Than Ngo
65e54b2933 - update to 126.0.6478.126
* High CVE-2024-6290: Use after free in Dawn
  * High CVE-2024-6291: Use after free in Swiftshader
  * High CVE-2024-6292: Use after free in Dawn
  * High CVE-2024-6293: Use after free in Dawn
2024-06-25 11:21:00 +02:00
Than Ngo
369b6ab570 - update to 126.0.6478.114
* High CVE-2024-6100: Type Confusion in V8
  * High CVE-2024-6101: Inappropriate implementation in WebAssembly
  * High CVE-2024-6102: Out of bounds memory access in Dawn
  * High CVE-2024-6103: Use after free in Dawn
2024-06-19 09:24:54 +02:00
Than Ngo
8479637a3e fix build error on el7 and el8 - fatal error: sys/ifunc.h file not found 2024-06-12 19:20:44 +02:00
Than Ngo
dddcecbfc5 Fix Unknown command line argument '-split-threshold-for-reg-with-hint=0'
on fedora < 40
2024-06-12 15:30:37 +02:00
Than Ngo
53321af48c - update to 126.0.6478.55
* High CVE-2024-5830: Type Confusion in V8
  * High CVE-2024-5831: Use after free in Dawn
  * High CVE-2024-5832: Use after free in Dawn
  * High CVE-2024-5833: Type Confusion in V8
  * High CVE-2024-5834: Inappropriate implementation in Dawn
  * High CVE-2024-5835: Heap buffer overflow in Tab Groups
  * High CVE-2024-5836: Inappropriate Implementation in DevTools
  * High CVE-2024-5837: Type Confusion in V8
  * High CVE-2024-5838: Type Confusion in V8
  * Medium CVE-2024-5839: Inappropriate Implementation in Memory Allocator
  * Medium CVE-2024-5840: Policy Bypass in CORS
  * Medium CVE-2024-5841: Use after free in V8
  * Medium CVE-2024-5842: Use after free in Browser UI
  * Medium CVE-2024-5843: Inappropriate implementation in Downloads
  * Medium CVE-2024-5844: Heap buffer overflow in Tab Strip
  * Medium CVE-2024-5845: Use after free in Audio
  * Medium CVE-2024-5846: Use after free in PDFium
  * Medium CVE-2024-5847: Use after free in PDFium
- refreshed patches
- dropped a workaround for a bug in new llvm on f40/rawhide (ppc64le)
- tweaked system build flags
2024-06-12 11:59:36 +02:00
Than Ngo
a807056bef rename builddir to chromebuilddir 2024-06-07 12:09:24 +02:00
Than Ngo
92a731d246 enable system libicu for fedora 2024-06-01 10:07:54 +02:00
Than Ngo
e85102b10a add correct name compiler-rt on el7 2024-05-31 12:50:11 +02:00
Than Ngo
d8daa47044 - update to 125.0.6422.141
* High CVE-2024-5493: Heap buffer overflow in WebRTC
  * High CVE-2024-5494: Use after free in Dawn
  * High CVE-2024-5495: Use after free in Dawn
  * High CVE-2024-5496: Use after free in Media Session
  * High CVE-2024-5497: Out of bounds memory access in Keyboard Inputs
  * High CVE-2024-5498: Use after free in Presentation API
  * High CVE-2024-5499: Out of bounds write in Streams API
- fixed rhbz#2264332 - Chromium is unable to send/receive video on MS Teams
- cleanup chromium.conf
2024-05-31 11:13:13 +02:00
Than Ngo
9dc48d8486 clean openh264 from proprietary stuffs 2024-05-30 17:06:37 +02:00
Than Ngo
16fc415c9d build against noopenh264 for fedora >=40 2024-05-30 10:58:09 +02:00
Than Ngo
ae50b2ee0b fix typo 2024-05-28 07:30:04 +02:00
Than Ngo
3a9f738b6f Workaround for build error on pp64le 2024-05-28 00:24:30 +02:00
Than Ngo
578390f407 - update to 125.0.6422.112
* High CVE-2024-5274: Type Confusion in V8
2024-05-26 20:58:20 +02:00
Than Ngo
3ea7f80282 - fix bz#2282246, update to 125.0.6422.76
* High CVE-2024-5157: Use after free in Scheduling
  * High CVE-2024-5158: Type Confusion in V8
  * High CVE-2024-5159: Heap buffer overflow in ANGLE
  * High CVE-2024-5160: Heap buffer overflow in Dawn
- cleanup
2024-05-22 08:33:42 +02:00
Than Ngo
1a12f7ee44 - remove unneeded BRs
- workarounds for el7 build
2024-05-20 14:41:33 +02:00
Than Ngo
565986e75b fix typo 2024-05-19 07:32:44 +02:00
Than Ngo
8a533d07a9 fix build errors on el7 2024-05-19 07:31:11 +02:00
Than Ngo
dd8134ca1f - update to 125.0.6422.60
* High CVE-2024-4947: Type Confusion in V8
  * High CVE-2024-4948: Use after free in Dawn
  * Medium CVE-2024-4949: Use after free in V8
  * Low CVE-2024-4950: Inappropriate implementation in Downloads
2024-05-16 01:03:37 +02:00
Than Ngo
3f72327dd3 refresh patches 2024-05-15 13:43:52 +02:00
Than Ngo
765ac9dc58 - refreshed patches
- rebased clean source
2024-05-14 11:10:12 +02:00
Than Ngo
009c75b138 include libavcodec/itut35.h in clean_ffmpeg.sh 2024-05-14 10:07:10 +02:00
Than Ngo
17e4e3aabb update to 125.0.6422.41 2024-05-13 12:30:56 +02:00
Than Ngo
38d5bc3486 include headless_command_resources.pak for head_shell 2024-05-12 00:02:01 +02:00
Than Ngo
aadea9e7ee - update to 124.0.6367.201
* High CVE-2024-4671: Use after free in Visuals
2024-05-10 10:47:35 +02:00
Than Ngo
476d3d642c Add correct path for Qt6Gui header and libs 2024-05-08 20:29:33 +02:00
Than Ngo
a85a4df5dc - update to 124.0.6367.155
* High CVE-2024-4558: Use after free in ANGLE
  * High CVE-2024-4559: Heap buffer overflow in WebAudio
- refreshed patches
2024-05-08 11:33:25 +02:00
Than Ngo
72c9eceb63 fix error: use of undeclared identifier 'kEmptyCacheIndexBits' 2024-05-05 13:31:06 +02:00
Than Ngo
47bd203e8d - fixed build errors on el8
- refreshed clean_ffmpeg.sh
- added missing files for bundle ffmpeg
2024-05-05 12:09:06 +02:00
Than Ngo
8a2aa618d1 drop unneeded ppc64 patch 2024-05-01 15:15:19 +02:00
Than Ngo
6d35301532 drop unneeded patches 2024-05-01 13:34:07 +02:00
Than Ngo
37db6b60fe - update to 124.0.6367.118
* High CVE-2024-4331: Use after free in Picture In Picture
  * High CVE-2024-4368: Use after free in Dawn
- use system highway
2024-05-01 13:28:16 +02:00
Than Ngo
f09d3f6cf3 - update to 124.0.6367.91
- fixed bz#2277228 - chromium wrapper causes library issues (symbol lookup error)
- use system dav1d
- drop patches which are needed for bundled libdav1d.
2024-04-30 00:05:28 +02:00
Than Ngo
007d8d62a1 - update to 124.0.6367.78
* Critical CVE-2024-4058: Type Confusion in ANGLE
  * High CVE-2024-4059: Out of bounds read in V8 API
  * High CVE-2024-4060: Use after free in Dawn
2024-04-24 20:19:32 +02:00
Than Ngo
cd1739f113 refresh ppc64 patches 2024-04-22 20:29:56 +02:00
Than Ngo
74ce1623ca fix waylang regression
refresh ppc64 patch
2024-04-21 00:10:21 +02:00
Than Ngo
0f67208b8a enable use_qt 2024-04-20 15:13:24 +02:00
Than Ngo
3f8e3da9d7 refreshed ppc64 patches 2024-04-19 21:27:37 +02:00
Than Ngo
12d233916f refresh arm64-memory_tagging patch 2024-04-18 15:15:24 +02:00
Than Ngo
b3d20435cb build error: unknown architectural extension on aarch64 (epel and < f39) 2024-04-18 14:53:04 +02:00
Than Ngo
7101e72314 fix build failure on rhel8 regarding to old python version 3.6x 2024-04-17 20:04:09 +02:00
Than Ngo
5a65c0c541 update to 124.0.6367.60 2024-04-17 16:19:03 +02:00
Than Ngo
8419eb780c - update to 123.0.6312.122
* High CVE-2024-3157: Out of bounds write in Compositing
  * High CVE-2024-3516: Heap buffer overflow in ANGLE
  * High CVE-2024-3515: Use after free in Dawn
2024-04-11 17:53:49 +02:00
Than Ngo
d2529493d8 - update to 123.0.6312.105
* High CVE-2024-3156: Inappropriate implementation in V8
  * High CVE-2024-3158: Use after free in Bookmarks
  * High CVE-2024-3159: Out of bounds memory access in V8
2024-04-03 11:42:41 +02:00
Than Ngo
aeeaa52f2a add missing fix-clang-selection.patch 2024-03-27 11:10:46 +01:00
Than Ngo
e64265a9dd - update to 123.0.6312.86
* Critical CVE-2024-2883: Use after free in ANGLE
  * High CVE-2024-2885: Use after free in Daw
  * High CVE-2024-2886: Use after free in WebCodecs
  * High CVE-2024-2887: Type Confusion in WebAssembly
2024-03-27 11:08:27 +01:00
Than Ngo
79a6f286c3 don't download binary blob 2024-03-24 12:56:51 +01:00
Than Ngo
6604d20d78 fixed bz#2271183 - disable screen ai service 2024-03-23 22:01:47 +01:00
Than Ngo
aaa8532a46 added upstream patch to fix build error: static assertion failed due to requirement... 2024-03-23 16:37:40 +01:00
Than Ngo
429d7d2944 - fixed bz#2269768 - enable build ppc64le package for F40
- fixed bz#2270321 - VAAPI flags in chromium.conf are out of date
2024-03-23 09:08:45 +01:00
Than Ngo
53b8360ec4 fixed bz#2270321 - VAAPI flags in chromium.conf are out of date 2024-03-21 15:22:15 +01:00
Than Ngo
1ee06aa55f - update to 123.0.6312.58
* High CVE-2024-2625: Object lifecycle issue in V8
     * Medium CVE-2024-2626: Out of bounds read in Swiftshader
     * Medium CVE-2024-2627: Use after free in Canvas
     * Medium CVE-2024-2628: Inappropriate implementation in Downloads
     * Medium CVE-2024-2629: Incorrect security UI in iOS
     * Medium CVE-2024-2630: Inappropriate implementation in iOS
     * Low CVE-2024-2631: Inappropriate implementation in iOS
2024-03-20 09:41:27 +01:00
Than Ngo
11f6e46ef2 - upstream security release 122.0.6261.128
* High CVE-2024-2400: Use after free in Performance Manager
2024-03-13 09:52:27 +01:00
Than Ngo
aacff36fa7 enable ppc64le build 2024-03-12 18:12:02 +01:00
Than Ngo
a5fbe20b02 fixed build failure with clang 18 2024-03-06 14:55:37 +01:00
Than Ngo
342e76d742 - upstream security release 122.0.6261.111
* High CVE-2024-2173: Out of bounds memory access in V8
   * High CVE-2024-2174: Inappropriate implementation in V8
   * High CVE-2024-2176: Use after free in FedCM
2024-03-06 09:57:45 +01:00
Than Ngo
247d6cd063 - upstream security release 122.0.6261.94
* High : Type Confusion in V8
- fixed bz#2265957, added correct platform in chromium use agent
2024-02-28 11:49:52 +01:00
Łukasz Wojniłowicz
2b0a759a9f Make building of chromedriver optional
It lowers patching effort when this spec is used as a base for
ungoogled-chromium. chromedriver is not the desired outcome then so it
would be disabled by a simple boolean variable.
2024-02-27 18:38:02 +00:00
Jiri Vanek
bb183235c9 Rebuilt for java-21-openjdk as system jdk
https://fedoraproject.org/wiki/Changes/Java21
2024-02-27 14:51:55 +01:00
Than Ngo
ed7a0e21e4 add correct platform in user-agent 2024-02-26 15:35:33 +01:00
Than Ngo
08a22e283e fixed many build failures on el7 2024-02-25 21:49:39 +01:00
Than Ngo
24c28b9af1 upload sources 2024-02-23 16:46:42 +01:00
Than Ngo
55c38ba66d - update to 122.0.6261.69
- fix build error on el8
- bz#2265039, built with -fwrapv for improved memory safety
- bz#2265043, built with -ftrivial-auto-var-init=zero for improved security and preditability
2024-02-23 14:31:58 +01:00
Than Ngo
6a1fa5b914 disable memory tagging for epel7 and epel8 on aarch64 due to old glibc 2024-02-22 20:28:07 +01:00
Than Ngo
54c359daae add fedora start in first_run_tabs 2024-02-22 17:47:38 +01:00
Than Ngo
a058070a7f fixed compiler error with clang16 on epel 8/9 and fedora38 2024-02-22 08:44:31 +01:00
Than Ngo
b464554589 fix static assertion in NodeUuidEquality 2024-02-21 12:52:43 +01:00
Than Ngo
09195bfaaa - update to 122.0.6261.57
* High CVE-2024-1669: Out of bounds memory access in Blink
   * High CVE-2024-1670: Use after free in Mojo
   * Medium CVE-2024-1671: Inappropriate implementation in Site Isolation
   * Medium CVE-2024-1672: Inappropriate implementation in Content Security Policy
   * Medium CVE-2024-1673: Use after free in Accessibility
   * Medium CVE-2024-1674: Inappropriate implementation in Navigation
   * Medium CVE-2024-1675: Insufficient policy enforcement in Download
   * Low CVE-2024-1676: Inappropriate implementation in Navigation.
2024-02-21 12:43:02 +01:00
Than Ngo
24122bd060 - update to 121.0.6167.184
- reduce the size of relocations
2024-02-14 11:13:28 +01:00
Than Ngo
bad6ee85c4 fixed the fedora/rhel condition 2024-02-09 00:06:24 +01:00
Than Ngo
75f898fba4 - fixed build failure with system libxml in rawhide
- fixed build failure with system libevent on epel7
2024-02-08 21:59:16 +01:00
Than Ngo
09312b077c bundle snappy (linker error) 2024-02-08 08:44:44 +01:00
Than Ngo
cf29e798d9 bundle woff2 due to linker errors 2024-02-07 14:57:15 +01:00
Than Ngo
452a75c80c bundle harfbuzz on epel9 due to old version 2024-02-07 14:38:35 +01:00
Than Ngo
79154724ef bundle jsoncpp due to build errors 2024-02-07 12:46:28 +01:00
Than Ngo
0f29cdea3d bundle brotli for f38 and epel9 due to old version 2024-02-07 12:29:58 +01:00
Than Ngo
b6171e8b50 - update to 121.0.6167.160
* High CVE-2024-1284: Use after free in Mojo
  * High CVE-2024-1283: Heap buffer overflow in Skia
2024-02-07 10:50:07 +01:00
Than Ngo
7ea7262aa8 - fix ftbfs on epel7
- requires new rust with enable profiler_builtin on epel7
2024-02-03 07:31:56 +01:00
Than Ngo
2a72fc8d8c Support for 64K pages on Linux/AArch64 2024-02-01 17:40:40 +01:00
Than Ngo
acf6c96bb7 - update to 121.0.6167.139
* High CVE-2024-1060: Use after free in Canvas
  * High CVE-2024-1059: Use after free in WebRTC
  * High CVE-2024-1077: Use after free in Network
2024-01-31 21:35:42 +01:00
Than Ngo
3af34f4d57 enable use_qt 2024-01-26 11:52:17 +01:00
Than Ngo
bfcfb3a3aa - update to 121.0.6167.85
* High CVE-2024-0807: Use after free in WebAudio
  * High CVE-2024-0812: Inappropriate implementation in Accessibility
  * High CVE-2024-0808: Integer underflow in WebUI
  * Medium CVE-2024-0810: Insufficient policy enforcement in DevTools
  * Medium CVE-2024-0814: Incorrect security UI in Payments
  * Medium CVE-2024-0813: Use after free in Reading Mode
  * Medium CVE-2024-0806: Use after free in Passwords
  * Medium CVE-2024-0805: Inappropriate implementation in Downloads
  * Medium CVE-2024-0804: Insufficient policy enforcement in iOS Security UI
  * Low CVE-2024-0811: Inappropriate implementation in Extensions API
  * Low CVE-2024-0809: Inappropriate implementation in Autofill
2024-01-24 08:55:35 +01:00
Than Ngo
63a44cd6c6 added Workaround for clang bug
error: defaulting this default constructor would delete it after its first declaration
2024-01-23 15:20:08 +01:00
Than Ngo
1bc897ee19 update to 121.0.6167.71 2024-01-23 14:43:22 +01:00
Fedora Release Engineering
e2786032fe Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-23 01:35:00 +00:00
Than Ngo
252ab8415c - update to 120.0.6099.224
* High CVE-2024-0517: Out of bounds write in V8
  * High CVE-2024-0518: Type Confusion in V8
  * High CVE-2024-0519: Out of bounds memory access in V8
2024-01-16 23:31:34 +01:00
Than Ngo
bc732a9ef2 - update to 120.0.6099.216
* High CVE-2024-0333: Insufficient data validation in Extensions
2024-01-10 09:57:57 +01:00
Than Ngo
0c1074816b - new gn update, drop workaround for broken gn on epel 8/9
- update to 120.0.6099.199
   * CVE-2024-0222: Use after free in ANGLE
   * CVE-2024-0223: Heap buffer overflow in ANGLE
   * CVE-2024-0224: Use after free in WebAudio
   * CVE-2024-0225: Use after free in WebGPU
2024-01-04 14:41:31 +01:00
Than Ngo
ff8e5c522b - update to 120.0.6099.129
* High CVE-2023-7024: Heap buffer overflow in WebRTC
2023-12-21 10:09:42 +01:00
Than Ngo
2ea10e4cca - update to 120.0.6099.109
* High CVE-2023-6702: Type Confusion in V8
   * High CVE-2023-6703: Use after free in Blink
   * High CVE-2023-6704: Use after free in libavif
   * High CVE-2023-6705: Use after free in WebRTC
   * High CVE-2023-6706: Use after free in FedCM
   * Medium CVE-2023-6707: Use after free in CSS
2023-12-13 12:06:33 +01:00
Than Ngo
8ec2067190 - fix build error with unsupported instrumentation profile format version 2023-12-09 07:01:10 +01:00
Than Ngo
235c5e38dc update to 120.0.6099.71 2023-12-08 22:57:17 +01:00
Than Ngo
368c9dfe08 update clean_ffmpeg.sh for new bundle ffmpeg 2023-12-08 21:21:57 +01:00
Than Ngo
97d36a8a9c set debug_level 1 2023-12-08 16:27:02 +01:00
Than Ngo
f24d2ab0da drop unsupported ldflag which caused build failure 2023-12-06 19:56:19 +01:00
Than Ngo
199e1e8c0b update to 120.0.6099.62 2023-12-06 10:20:35 +01:00
Than Ngo
ae7653f59b apply patch for bundleminizip 2023-12-05 20:39:20 +01:00
Than Ngo
a6eeb2444a enable use_thin_lto 2023-12-05 15:50:02 +01:00
Than Ngo
d90f112feb - fixed bz#2242271, built with bundleminizip in fedora > 39
- fixed bz#2251884, built with fstack-protector-strong for improved security
- fixed bz#2252874, enable control flow integrity (cfi)
2023-12-05 14:37:05 +01:00
Than Ngo
74166f41a0 enable qt6 linux UI backend 2023-12-03 19:32:47 +01:00
Than Ngo
88b401e09e enable build flag -fstack-protector-strong for improved security 2023-12-02 21:48:27 +01:00
Than Ngo
5a40c29e53 update to 119.0.6045.199 2023-11-29 11:43:30 +01:00
Than Ngo
cfac4f7e0f fix ffmpeg conflicts 2023-11-19 19:50:40 +01:00
Than Ngo
1afd646e56 set dts_version to 13 for epel-8 2023-11-18 23:07:26 +01:00
Than Ngo
1556239d81 add correct requirement on libavformat-free 2023-11-16 21:14:41 +01:00
Than Ngo
9dcb3fd811 * upstream security release:
- High CVE-2023-5997, use after free in Garbage Collection
  - High CVE-2023-6112, use after free in Navigation
2023-11-15 17:36:24 +01:00
Than Ngo
f3d6aa9344 update to 119.0.6045.159 2023-11-15 17:31:02 +01:00
Than Ngo
b4425ac642 - add Requires/Conflicts for ABI break in fmpeg-free 6.0.1
- drop first_dts patch, reintroduce first_dts patch in ffmpeg-free-6.0.1
- fixed python3 syntaxWarning: invalid escape sequenc
- skip clang's patches for epel8 that now gets clang-16 update
2023-11-15 16:30:55 +01:00
Than Ngo
7fc989cee8 fixed python3 syntaxWarning: invalid escape sequence 2023-11-15 15:42:49 +01:00
Than Ngo
24a4c2ac17 fixed bz#2240127, Some h.264 mp4s do not play 2023-11-13 10:48:24 +01:00
Than Ngo
12ae710b99 epel9 now has clang-16 and gcc-toolset-13, need to set dts_version 13 for epel-9 2023-11-10 16:06:52 +01:00
Than Ngo
ebef65c904 update to 119.0.6045.123, security fix for high CVE-2023-5996: Use after free in WebAudio 2023-11-08 18:48:06 +01:00
Than Ngo
64375616dd enable debuginfo 2023-11-07 13:34:43 +01:00
Than Ngo
debc7277d2 - drop default fuzz=2
- refresh patches
- add enable_debug
2023-11-06 20:05:04 +01:00
Than Ngo
4c10597baa rename the gn-system.patch
drop useless patch to reduce debuginfos
2023-11-06 08:46:44 +01:00
Than Ngo
ab00e56c66 hide UseChromeOSDirectVideoDecoder flag on VA-API devices to avoid crashes 2023-11-03 19:55:35 +01:00
Than Ngo
3471229c2a backport upstream patch, workaround for buggy Nvidia drivers 2023-11-03 13:19:32 +01:00
Than Ngo
9ef6902d0d disable AV1 VAAPI video encode due to old libva on el9 2023-11-02 15:40:53 +01:00
Than Ngo
c57568677a - fix build error on epel9 anf fedora 37 with old ffmpeg 5.x
- add workaround for broken gn on epel 8/9
2023-11-02 08:43:26 +01:00
Than Ngo
8033e8d6f7 workaround for broken gn on epel9 2023-11-01 23:40:32 +01:00
Than Ngo
ded4d0bd83 update to 119.0.6045.105 2023-11-01 23:00:55 +01:00
Than Ngo
0f57151b45 update to 118.0.5993.117 2023-10-25 10:59:11 +02:00
Than Ngo
fc6ad5487a - update to 118.0.5993.88
- cleanup the package dependencies
2023-10-18 21:04:07 +02:00
Than Ngo
18e3cfe6d9 fix tab crash with SIGTRAP when using system ffmpeg 2023-10-16 18:32:02 +02:00
Than Ngo
3fa5c0ab7b drop chromium-108-ffmpeg-revert-new-channel-layout-api.patch for f36
cleanup
2023-10-16 12:16:10 +02:00
Than Ngo
820d621e37 update to 118.0.5993.70 2023-10-11 10:36:46 +02:00
Than Ngo
6fbad32df4 - update to 117.0.5938.149
- fix CVE-2023-5346: Type Confusion in V8
2023-10-05 10:58:50 +02:00
Than Ngo
49554e50f0 set arm_control_flow_integrity = "pac" for fedora aarch64 build as
workaround for crash on BTI capable system
2023-09-29 18:34:42 +02:00
Than Ngo
c85b98f7c6 add workaround for chromium chrashes with SIGILL on BTI capable systems (Apple M2) 2023-09-28 17:28:13 +02:00
Than Ngo
0ccb10a2c6 - update to 117.0.5938.132
- CVE-2023-5217, heap buffer overflow in vp8 encoding in libvpx.
- CVE-2023-5186, use after free in Passwords.
- CVE-2023-5187, use after free in Extensions.
2023-09-28 14:11:46 +02:00
Than Ngo
daa72a6e93 backport upstream patch to fix memory leak 2023-09-23 14:06:06 +02:00
Than Ngo
9ac8830f6a update to 117.0.5938.92 2023-09-22 14:05:20 +02:00
Than Ngo
10cad7c377 apply missing-header-files.patch also for fedora 2023-09-18 10:00:22 +02:00
Than Ngo
e6d1d885e5 fix BR esbuild 2023-09-17 20:16:09 +02:00
Than Ngo
7abe4fea9a update to 117.0.5938.88 2023-09-17 18:57:19 +02:00
Than Ngo
18a48bd7aa fixed compiler error on el7 - error: defaulting this default constructor would delete it after its first declaration 2023-09-16 23:05:36 +02:00
Than Ngo
54f9069a38 fix compiler errors due to old clang version 2023-09-15 22:10:13 +02:00
Than Ngo
5391e0e39b fixed compiler errors, missing typename 2023-09-15 18:17:02 +02:00
Than Ngo
2bf7a24994 fixed several compiler errors due to old clang version 2023-09-15 14:45:10 +02:00
Than Ngo
0990303e4a - added missing typename to fix compiler error
- fix compiler error, invalid operands to binary expression
2023-09-15 10:46:02 +02:00
Than Ngo
d2ac2146bc rebase emplace_back_on_vector-c++20.patch to fix the link error 2023-09-14 17:09:57 +02:00
Than Ngo
f32ee45ed4 update to 117.0.5938.62 2023-09-13 12:37:16 +02:00
Than Ngo
1bd4392932 update source 2023-09-12 09:59:58 +02:00
Than Ngo
77bc66f09e update to 116.0.5845.187 2023-09-12 09:58:50 +02:00
Trung Le
6dd6c5b1f4 Fix NodeJS Sources
The URLs are incorrect
2023-09-11 05:44:31 +00:00
Than Ngo
ca8d2b52b5 update to 116.0.5845.179 2023-09-08 14:34:57 +02:00
Than Ngo
e58a94816c add correct patch file 2023-08-17 07:13:37 +02:00
Than Ngo
41db0e056a fixed ftbfs due to error: use of undeclared identifier 'MFD_CLOEXEC' 2023-08-17 07:11:49 +02:00
Than Ngo
d895b61728 fixed chromium FTBFS on RHEL7, error: undefined symbol: unsigned long cc::PaintOpWriter::SerializedSize<unsigned long> 2023-08-16 22:52:58 +02:00
Than Ngo
a8ad64be1d rebase emplace_back_on_vector-c++20.patch for 116 2023-08-15 23:23:23 +02:00
Than Ngo
f553ba3014 Guard the field assignment num_delta_pocs_of_ref_rps_idx as it is not supported
in fedora < 39
2023-08-15 19:19:36 +02:00
Than Ngo
569a8a36e9 fix build error on aarch64 - implicit instantiation of undefined template 'std::numeric_limits<unsigned long>' 2023-08-15 10:46:24 +02:00
Than Ngo
d26f47905e upload source 2023-08-15 10:10:18 +02:00
Than Ngo
5175b086e8 update to chromium-116.0.5845.96 2023-08-15 09:12:05 +02:00
Than Ngo
f4a15a51f7 set use_all_cpus=1 for aarch6 2023-08-09 14:17:09 +02:00
Than Ngo
412980a53b try to build with use_all_cpus=1 2023-08-09 10:18:55 +02:00
Than Ngo
7cebf43f44 update to 115.0.5790.170 2023-08-03 13:19:50 +02:00
Than Ngo
faecd84d40 update to 115.0.5790.110 2023-07-27 11:44:55 +02:00
Than Ngo
ea4ef026ef more fix for python-3.12-deprecated 2023-07-22 18:21:46 +02:00
Than Ngo
6473920878 more fixes for python-3.12 issue 2023-07-22 17:23:12 +02:00
Than Ngo
44cc7c7763 more fix for python-3.12 issue 2023-07-22 16:56:46 +02:00
Than Ngo
f3f21ea6f1 more fixes for python-3.12 issue 2023-07-22 15:31:48 +02:00
Than Ngo
50c0214711 Fix python3 issue, imp modul is removed in python-3.12 2023-07-22 14:38:51 +02:00
Than Ngo
1ac23e4538 update to 115.0.5790.102 2023-07-22 11:00:56 +02:00
Than Ngo
7e71540a5e - Fix FTBFS on aarch64 - error: use of undeclared identifier 'kV4L2FlatStatefulVideoDecoder'
- Fix FTBFS on aarch64 - error: no member named 'Contains' in namespace 'base'
2023-07-20 22:20:36 +02:00
Than Ngo
1579239c98 IFUNC-Resolver is not supported in old glibc on rhel8, revert it 2023-07-20 21:03:27 +02:00
Than Ngo
1f8fd846d2 update to 115.0.5790.98 2023-07-19 09:21:08 +02:00
Than Ngo
daadf4916d update to 114.0.5735.198 2023-06-27 12:13:00 +02:00
Than Ngo
ecbf187d1c - Update to 114.0.5735.133
- Enable AllowQt feature flag
- Fix Qt deps
- Fix Qt logical scale factor
2023-06-14 14:14:28 +02:00
Than Ngo
369ac1d3ad update to 114.0.5735.106 2023-06-07 17:30:36 +02:00
Than Ngo
802b55bba2 - add qt6 linuxui backend
- backport: handle scale factor changes
- backport: fix font double_scaling
2023-05-28 10:09:21 +02:00
Than Ngo
b733bdb781 uodate to 114.0.5735.45 2023-05-26 18:52:37 +02:00
Than Ngo
5027d01233 - drop clang workaround for el8
- update to 113.0.5672.126
2023-05-17 08:54:40 +02:00
142 changed files with 156066 additions and 6404 deletions

12
.gitignore vendored
View file

@ -31,3 +31,15 @@
/testupload
/node-v19.8.1-linux-arm64.tar.xz
/node-v19.8.1-linux-x64.tar.xz
/node-v20.6.1-linux-arm64.tar.xz
/node-v20.6.1-linux-x64.tar.xz
/linux-arm64-0.19.2.tgz
/linux-x64-0.19.2.tgz
/v0.69.4.tar.gz
/bindgen-cli-aarch64.tar.xz
/bindgen-cli-x86_64.tar.xz
/linux-ppc64-0.19.2.tgz
/node-v22.14.0-linux-arm64.tar.xz
/node-v22.14.0-linux-ppc64le.tar.xz
/node-v22.14.0-linux-x64.tar.xz
/node-v22.14.0-stripped.tar.gz

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,57 @@
From 40309fb53e39477490fd6928ebe67c4fb78de380 Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawnanastasio@gmail.com>
Date: Sun, 10 Mar 2019 21:01:37 -0500
Subject: [PATCH] Add ppc64 target to libaom
---
third_party/libaom/BUILD.gn | 12 ++++++++++++
third_party/libaom/cmake_update.sh | 3 +++
2 files changed, 15 insertions(+)
Index: chromium-144.0.7559.59/third_party/libaom/BUILD.gn
===================================================================
--- chromium-144.0.7559.59.orig/third_party/libaom/BUILD.gn
+++ chromium-144.0.7559.59/third_party/libaom/BUILD.gn
@@ -299,6 +299,18 @@ if (current_cpu == "arm64" || current_cp
}
}
+if (current_cpu == "ppc64") {
+ source_set("libaom_intrinsics_vsx") {
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ configs += [ ":libaom_config" ]
+ sources = [
+ "//third_party/libaom/source/libaom/aom_ports/ppc_cpudetect.c",
+ ]
+ sources += aom_av1_common_intrin_vsx
+ }
+}
+
static_library("libaom") {
check_includes = false
if (!is_debug && is_win) {
@@ -368,6 +380,9 @@ static_library("libaom") {
# This is needed by all arm boards due to aom_arm_cpu_caps()
sources += [ "source/libaom/aom_ports/aarch32_cpudetect.c" ]
}
+ if (current_cpu == "ppc64") {
+ deps += [ ":libaom_intrinsics_vsx" ]
+ }
if (is_android) {
deps += [ "//third_party/cpu_features:ndk_compat" ]
}
Index: chromium-144.0.7559.59/third_party/libaom/cmake_update.sh
===================================================================
--- chromium-144.0.7559.59.orig/third_party/libaom/cmake_update.sh
+++ chromium-144.0.7559.59/third_party/libaom/cmake_update.sh
@@ -167,6 +167,9 @@ egrep \
"#define [A-Z0-9_]+[[:space:]]+[01]" "${CFG}/win/ia32/config/aom_config.h" \
| awk '{print "%define " $2 " " $3}' > "${CFG}/win/ia32/config/aom_config.asm"
+reset_dirs linux/ppc64
+gen_config_files linux/ppc64 "${toolchain}/ppc-linux-gcc.cmake ${all_platforms}"
+
# Copy linux configurations and modify for Windows.
reset_dirs win/x64
cp "${CFG}/linux/x64/config"/* "${CFG}/win/x64/config/"

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,13 @@
Index: chromium-144.0.7559.59/v8/gni/v8.gni
===================================================================
--- chromium-144.0.7559.59.orig/v8/gni/v8.gni
+++ chromium-144.0.7559.59/v8/gni/v8.gni
@@ -317,7 +317,7 @@ assert(
if (v8_enable_pointer_compression == "") {
v8_enable_pointer_compression =
v8_current_cpu == "arm64" || v8_current_cpu == "x64" ||
- v8_current_cpu == "loong64"
+ v8_current_cpu == "loong64" || v8_current_cpu == "ppc64"
}
# The Wasm interpreter is currently supported only on arm64 and x64, on

View file

@ -0,0 +1,30 @@
From ea104a841fca1ff4d5430915f1b7c52c6a642f13 Mon Sep 17 00:00:00 2001
From: Timothy Pearson <tpearson@raptorengineering.com>
Date: Fri, 21 Sep 2018 21:44:17 -0500
Subject: [PATCH] Force baseline POWER8 / AltiVec / VSX CPU features when on a
PPC64 platform in LE mode
---
BUILD.gn | 6 ++++++
1 file changed, 6 insertions(+)
Index: chromium-144.0.7559.59/v8/BUILD.gn
===================================================================
--- chromium-144.0.7559.59.orig/v8/BUILD.gn
+++ chromium-144.0.7559.59/v8/BUILD.gn
@@ -1596,7 +1596,14 @@ config("toolchain") {
if (v8_current_cpu == "ppc64") {
defines += [ "V8_TARGET_ARCH_PPC64" ]
cflags += [ "-ffp-contract=off" ]
- if (current_os == "aix") {
+ if (current_os == "linux") {
+ cflags += [
+ # Enable usage of AltiVec, VSX, and other POWER8 and higher features
+ "-mcpu=power8",
+ "-maltivec",
+ "-mvsx",
+ ]
+ } else if (current_os == "aix") {
cflags += [
# Work around AIX ceil, trunc and round oddities.
"-mcpu=power5+",

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,773 @@
From cda9400739dfa064907d822f00578bb51b24a404 Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawnanastasio@yahoo.com>
Date: Fri, 17 Aug 2018 14:18:33 -0500
Subject: [PATCH] Implement support for ppc64 on Linux
This patch implements support for the ppc64 architecture on Linux systems.
Notable changes include:
* Modification of tests to support non-4K page sizes
* minidump_writer: Determine size of stack to capture based on page size
* dump_writer_common: Introduce member function GetVectorRegisters to
ThreadInfo on ppc64 systems. This allows Altivec/VMX registers to be
dumped like they are on OS X. linux_ptrace_dumper has been updated
to utilize this function along with the ptrace mode NT_PPC_VMX.
* processor/exploitability_unittest.cc: Tests were disabled on
non-x86 systems. They assume the system objdump is capable of
disassembling x86 binaries which is not the case on other
architectures.
To-do:
* tools/linux/md2core has been updated as well, but functionality
has not been confirmed and restoration of Altivec/VMX registers
has not been implemented
Note that proper functionality depends on updates to third_party/LSS
that introduce PPC64 support. An in-progress patch that allows
breakpad to build and run successfully is available at:
https://wiki.raptorcs.com/wiki/Porting/Chromium
---
.../dump_writer_common/raw_context_cpu.h | 2 +
.../linux/dump_writer_common/thread_info.cc | 56 ++++++++++++++++++-
.../linux/dump_writer_common/thread_info.h | 9 +++
.../dump_writer_common/ucontext_reader.cc | 42 ++++++++++++++
.../dump_writer_common/ucontext_reader.h | 3 +
src/client/linux/handler/exception_handler.cc | 22 +++++++-
src/client/linux/handler/exception_handler.h | 6 +-
.../handler/exception_handler_unittest.cc | 8 ++-
.../microdump_writer/microdump_writer.cc | 14 ++++-
.../microdump_writer_unittest.cc | 15 ++++-
.../minidump_writer/linux_core_dumper.cc | 8 ++-
.../linux/minidump_writer/linux_dumper.cc | 4 +-
.../linux/minidump_writer/linux_dumper.h | 3 +-
.../linux_dumper_unittest_helper.cc | 2 +
.../minidump_writer/linux_ptrace_dumper.cc | 19 +++++--
.../linux_ptrace_dumper_unittest.cc | 5 ++
.../linux/minidump_writer/minidump_writer.cc | 18 ++++--
.../linux/minidump_writer/minidump_writer.h | 2 +
.../minidump_writer_unittest.cc | 3 +
src/common/linux/memory_mapped_file.cc | 3 +-
.../linux/memory_mapped_file_unittest.cc | 7 ++-
src/common/memory_allocator_unittest.cc | 3 +-
src/processor/exploitability_linux.cc | 2 +
src/processor/exploitability_unittest.cc | 15 +++--
src/tools/linux/md2core/minidump-2-core.cc | 45 +++++++++++++++
25 files changed, 281 insertions(+), 35 deletions(-)
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
@@ -51,6 +51,8 @@ typedef MDRawContextRISCV64 RawContextCP
# else
# error "Unexpected __riscv_xlen"
# endif
+#elif defined(__powerpc64__)
+typedef MDRawContextPPC64 RawContextCPU;
#else
#error "This code has not been ported to your platform yet."
#endif
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
@@ -336,7 +336,42 @@ void ThreadInfo::FillCPUContext(RawConte
#error "Unexpected __riscv_xlen"
#endif
}
-#endif // __riscv
+
+#elif defined(__powerpc64__)
+
+uintptr_t ThreadInfo::GetInstructionPointer() const {
+ return mcontext.gp_regs[PT_NIP];
+}
+
+void ThreadInfo::FillCPUContext(RawContextCPU* out) const {
+ out->context_flags = MD_CONTEXT_PPC64_FULL;
+ for (int i = 0; i < MD_CONTEXT_PPC64_GPR_COUNT; i++)
+ out->gpr[i] = mcontext.gp_regs[i];
+
+ out->lr = mcontext.gp_regs[PT_LNK];
+ out->srr0 = mcontext.gp_regs[PT_NIP];
+ out->srr1 = mcontext.gp_regs[PT_MSR];
+ out->cr = mcontext.gp_regs[PT_CCR];
+ out->xer = mcontext.gp_regs[PT_XER];
+ out->ctr = mcontext.gp_regs[PT_CTR];
+
+ for (int i = 0; i < MD_FLOATINGSAVEAREA_PPC_FPR_COUNT; i++)
+ out->float_save.fpregs[i] = mcontext.fp_regs[i];
+
+ out->float_save.fpscr = mcontext.fp_regs[NFPREG-1];
+
+ for (int i = 0; i < MD_VECTORSAVEAREA_PPC_VR_COUNT; i++)
+ out->vector_save.save_vr[i] = \
+ {(((uint64_t)vregs.vrregs[i][0]) << 32)
+ | vregs.vrregs[i][1],
+ (((uint64_t)vregs.vrregs[i][2]) << 32)
+ | vregs.vrregs[i][3]};
+
+ out->vrsave = vregs.vrsave;
+ out->vector_save.save_vscr = {0, vregs.vscr.vscr_word};
+ out->vector_save.save_vrvalid = 0xFFFFFFFF;
+}
+#endif // __powerpc64__
void ThreadInfo::GetGeneralPurposeRegisters(void** gp_regs, size_t* size) {
assert(gp_regs || size);
@@ -350,6 +385,11 @@ void ThreadInfo::GetGeneralPurposeRegist
*gp_regs = mcontext.__gregs;
if (size)
*size = sizeof(mcontext.__gregs);
+#elif defined(__powerpc64__)
+ if (gp_regs)
+ *gp_regs = mcontext.gp_regs;
+ if (size)
+ *size = sizeof(mcontext.gp_regs);
#else
if (gp_regs)
*gp_regs = &regs;
@@ -384,6 +424,11 @@ void ThreadInfo::GetFloatingPointRegiste
# else
# error "Unexpected __riscv_flen"
# endif
+#elif defined(__powerpc64__)
+ if (fp_regs)
+ *fp_regs = &mcontext.fp_regs;
+ if (size)
+ *size = sizeof(mcontext.fp_regs);
#else
if (fp_regs)
*fp_regs = &fpregs;
@@ -392,4 +437,13 @@ void ThreadInfo::GetFloatingPointRegiste
#endif
}
+#if defined(__powerpc64__)
+void ThreadInfo::GetVectorRegisters(void** v_regs, size_t* size) {
+ if (v_regs)
+ *v_regs = &vregs;
+ if (size)
+ *size = sizeof(vregs);
+}
+#endif
+
} // namespace google_breakpad
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
@@ -67,6 +67,10 @@ struct ThreadInfo {
// Use the structures defined in <sys/user.h>
struct user_regs_struct regs;
struct user_fpsimd_struct fpregs;
+#elif defined(__powerpc64__)
+ // Use the structures defined in <sys/ucontext.h>.
+ mcontext_t mcontext;
+ struct _libc_vrstate vregs;
#elif defined(__mips__) || defined(__riscv)
// Use the structure defined in <sys/ucontext.h>.
mcontext_t mcontext;
@@ -83,6 +87,11 @@ struct ThreadInfo {
// Returns the pointer and size of float point register area.
void GetFloatingPointRegisters(void** fp_regs, size_t* size);
+
+#if defined(__powerpc64__)
+ // Returns the pointer and size of the vector register area. (PPC64 only)
+ void GetVectorRegisters(void** v_regs, size_t* size);
+#endif
};
} // namespace google_breakpad
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
@@ -324,6 +324,48 @@ void UContextReader::FillCPUContext(RawC
#error "Unexpected __riscv_xlen"
#endif
}
+
+#elif defined(__powerpc64__)
+
+uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.gp_regs[MD_CONTEXT_PPC64_REG_SP];
+}
+
+uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
+ return uc->uc_mcontext.gp_regs[PT_NIP];
+}
+
+void UContextReader::FillCPUContext(RawContextCPU* out, const ucontext_t* uc,
+ const struct _libc_vrstate* vregs) {
+ out->context_flags = MD_CONTEXT_PPC64_FULL;
+
+ for (int i = 0; i < MD_CONTEXT_PPC64_GPR_COUNT; i++)
+ out->gpr[i] = uc->uc_mcontext.gp_regs[i];
+
+ out->lr = uc->uc_mcontext.gp_regs[PT_LNK];
+ out->srr0 = uc->uc_mcontext.gp_regs[PT_NIP];
+ out->srr1 = uc->uc_mcontext.gp_regs[PT_MSR];
+ out->cr = uc->uc_mcontext.gp_regs[PT_CCR];
+ out->xer = uc->uc_mcontext.gp_regs[PT_XER];
+ out->ctr = uc->uc_mcontext.gp_regs[PT_CTR];
+
+ for (int i = 0; i < MD_FLOATINGSAVEAREA_PPC_FPR_COUNT; i++)
+ out->float_save.fpregs[i] = uc->uc_mcontext.fp_regs[i];
+
+ out->float_save.fpscr = uc->uc_mcontext.fp_regs[NFPREG-1];
+
+ for (int i = 0; i < MD_VECTORSAVEAREA_PPC_VR_COUNT; i++)
+ out->vector_save.save_vr[i] =
+ {(((uint64_t)vregs->vrregs[i][0]) << 32)
+ | vregs->vrregs[i][1],
+ (((uint64_t)vregs->vrregs[i][2]) << 32)
+ | vregs->vrregs[i][3]};
+
+ out->vrsave = vregs->vrsave;
+ out->vector_save.save_vscr = {0, vregs->vscr.vscr_word};
+ out->vector_save.save_vrvalid = 0xFFFFFFFF;
+}
+
#endif
} // namespace google_breakpad
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
@@ -54,6 +54,9 @@ struct UContextReader {
#elif defined(__aarch64__)
static void FillCPUContext(RawContextCPU* out, const ucontext_t* uc,
const struct fpsimd_context* fpregs);
+#elif defined(__powerpc64__)
+ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+ const struct _libc_vrstate* vregs);
#else
static void FillCPUContext(RawContextCPU* out, const ucontext_t* uc);
#endif
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
@@ -466,6 +466,13 @@ bool ExceptionHandler::HandleSignal(int
memcpy(&g_crash_context_.float_state, fp_ptr,
sizeof(g_crash_context_.float_state));
}
+#elif defined(__powerpc64__)
+ // On PPC64, we must copy VR state
+ ucontext_t* uc_ptr = (ucontext_t*)uc;
+ if (uc_ptr->uc_mcontext.v_regs) {
+ memcpy(&g_crash_context_.vector_state, uc_ptr->uc_mcontext.v_regs,
+ sizeof(g_crash_context_.vector_state));
+ }
#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
ucontext_t* uc_ptr = (ucontext_t*)uc;
if (uc_ptr->uc_mcontext.fpregs) {
@@ -704,10 +711,18 @@ bool ExceptionHandler::WriteMinidump() {
}
#endif
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE && !defined(__aarch64__)
+#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE && !defined(__aarch64__) \
+ && !defined(__powerpc64__)
memcpy(&context.float_state, context.context.uc_mcontext.fpregs,
sizeof(context.float_state));
#endif
+
+#if defined(__powerpc64__)
+ // Vector registers must be copied on PPC64
+ memcpy(&context.vector_state, context.context.uc_mcontext.v_regs,
+ sizeof(context.vector_state));
+#endif
+
context.tid = sys_gettid();
// Add an exception stream to the minidump for better reporting.
@@ -728,6 +743,9 @@ bool ExceptionHandler::WriteMinidump() {
#elif defined(__mips__)
context.siginfo.si_addr =
reinterpret_cast<void*>(context.context.uc_mcontext.pc);
+#elif defined(__powerpc64__)
+ context.siginfo.si_addr =
+ reinterpret_cast<void*>(context.context.uc_mcontext.gp_regs[PT_NIP]);
#elif defined(__riscv)
context.siginfo.si_addr =
reinterpret_cast<void*>(context.context.uc_mcontext.__gregs[REG_PC]);
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
@@ -197,7 +197,11 @@ class ExceptionHandler {
siginfo_t siginfo;
pid_t tid; // the crashing thread.
ucontext_t context;
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
+#if defined(__powerpc64__)
+ // PPC64's FP state is a part of ucontext_t like MIPS but the vector
+ // state is not, so a struct is needed.
+ vstate_t vector_state;
+#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
fpstate_t float_state;
#endif
};
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
@@ -325,7 +325,7 @@ TEST(ExceptionHandlerTest, ParallelChild
ASSERT_EQ(SIGSEGV, WTERMSIG(status));
return;
} else {
- usleep(100000);
+ usleep(200000);
}
}
@@ -581,6 +581,8 @@ const unsigned char kIllegalInstruction[
#if defined(__mips__)
// mfc2 zero,Impl - usually illegal in userspace.
0x48, 0x00, 0x00, 0x48
+#elif defined(__powerpc64__)
+ 0x01, 0x01, 0x01, 0x01 // Crashes on a tested POWER9 cpu
#else
// This crashes with SIGILL on x86/x86-64/arm.
0xff, 0xff, 0xff, 0xff
@@ -776,10 +778,10 @@ TEST(ExceptionHandlerTest, InstructionPo
// These are defined here so the parent can use them to check the
// data from the minidump afterwards.
- // Use 4k here because the OS will hand out a single page even
+ // Use the page size here because the OS will hand out a single page even
// if a smaller size is requested, and this test wants to
// test the upper bound of the memory range.
- const uint32_t kMemorySize = 4096; // bytes
+ const uint32_t kMemorySize = getpagesize(); // bytes
const int kOffset = kMemorySize - sizeof(kIllegalInstruction);
const pid_t child = fork();
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
@@ -143,7 +143,9 @@ class MicrodumpWriter {
const MicrodumpExtraInfo& microdump_extra_info,
LinuxDumper* dumper)
: ucontext_(context ? &context->context : nullptr),
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
+#if defined(__powerpc64__)
+ vector_state_(context ? &context->vector_state : nullptr),
+#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
float_state_(context ? &context->float_state : nullptr),
#endif
dumper_(dumper),
@@ -350,6 +352,8 @@ class MicrodumpWriter {
# else
# error "Unexpected __riscv_xlen"
# endif
+#elif defined(__powerpc64__)
+ const char kArch[] = "ppc64";
#else
# error "This code has not been ported to your platform yet"
#endif
@@ -422,7 +426,9 @@ class MicrodumpWriter {
void DumpCPUState() {
RawContextCPU cpu;
my_memset(&cpu, 0, sizeof(RawContextCPU));
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
+#if defined(__powerpc64__)
+ UContextReader::FillCPUContext(&cpu, ucontext_, vector_state_);
+#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
UContextReader::FillCPUContext(&cpu, ucontext_, float_state_);
#else
UContextReader::FillCPUContext(&cpu, ucontext_);
@@ -618,7 +624,9 @@ class MicrodumpWriter {
void* Alloc(unsigned bytes) { return dumper_->allocator()->Alloc(bytes); }
const ucontext_t* const ucontext_;
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
+#if defined(__powerpc64__)
+ const google_breakpad::vstate_t* const vector_state_;
+#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
const google_breakpad::fpstate_t* const float_state_;
#endif
LinuxDumper* dumper_;
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
@@ -281,10 +281,19 @@ TEST(MicrodumpWriterTest, BasicWithMappi
CrashAndGetMicrodump(mappings, MicrodumpExtraInfo(), &buf);
ASSERT_TRUE(ContainsMicrodump(buf));
+ int page_size = getpagesize();
#ifdef __LP64__
- ASSERT_NE(std::string::npos,
- buf.find("M 0000000000001000 000000000000002A 0000000000001000 "
- "33221100554477668899AABBCCDDEEFF0 libfoo.so"));
+ // This test is only available for the following page sizes
+ ASSERT_TRUE((page_size == 4096) || (page_size == 65536));
+ if (page_size == 4096) {
+ ASSERT_NE(std::string::npos,
+ buf.find("M 0000000000001000 000000000000002A 0000000000001000 "
+ "33221100554477668899AABBCCDDEEFF0 libfoo.so"));
+ } else {
+ ASSERT_NE(std::string::npos,
+ buf.find("M 0000000000010000 000000000000002A 0000000000010000 "
+ "33221100554477668899AABBCCDDEEFF0 libfoo.so"));
+ }
#else
ASSERT_NE(std::string::npos,
buf.find("M 00001000 0000002A 00001000 "
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
@@ -118,6 +118,9 @@ bool LinuxCoreDumper::GetThreadInfoByInd
#elif defined(__riscv)
stack_pointer = reinterpret_cast<uint8_t*>(
info->mcontext.__gregs[MD_CONTEXT_RISCV_REG_SP]);
+#elif defined(__powerpc64__)
+ stack_pointer =
+ reinterpret_cast<uint8_t*>(info->mcontext.gp_regs[MD_CONTEXT_PPC64_REG_SP]);
#else
# error "This code hasn't been ported to your platform yet."
#endif
@@ -213,7 +216,10 @@ bool LinuxCoreDumper::EnumerateThreads()
memset(&info, 0, sizeof(ThreadInfo));
info.tgid = status->pr_pgrp;
info.ppid = status->pr_ppid;
-#if defined(__mips__)
+#if defined(__powerpc64__)
+ for (int i = 0; i < 31; i++)
+ info.mcontext.gp_regs[i] = status->pr_reg[i];
+#elif defined(__mips__)
# if defined(__ANDROID__)
for (int i = EF_R0; i <= EF_R31; i++)
info.mcontext.gregs[i - EF_R0] = status->pr_reg[i];
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
@@ -789,7 +789,9 @@ bool LinuxDumper::GetStackInfo(const voi
reinterpret_cast<uint8_t*>(int_stack_pointer & ~(page_size - 1));
// The number of bytes of stack which we try to capture.
- static const ptrdiff_t kStackToCapture = 32 * 1024;
+ // This now depends on page_size to avoid missing data
+ // on systems with larger page sizes.
+ static const ptrdiff_t kStackToCapture = 8 * page_size;
const MappingInfo* mapping = FindMapping(stack_pointer);
if (!mapping)
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
@@ -64,7 +64,8 @@ namespace google_breakpad {
typedef Elf32_auxv_t elf_aux_entry;
#elif defined(__x86_64) || defined(__aarch64__) || \
(defined(__mips__) && _MIPS_SIM != _ABIO32) || \
- (defined(__riscv) && __riscv_xlen == 64)
+ (defined(__riscv) && __riscv_xlen == 64) || \
+ defined(__powerpc64__)
typedef Elf64_auxv_t elf_aux_entry;
#endif
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
@@ -57,6 +57,8 @@
#define TID_PTR_REGISTER "$1"
#elif defined(__riscv)
#define TID_PTR_REGISTER "x4"
+#elif defined(__powerpc64__)
+#define TID_PTR_REGISTER "r8"
#else
#error This test has not been ported to this platform.
#endif
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
@@ -208,12 +208,12 @@ bool LinuxPtraceDumper::ReadRegisterSet(
#ifdef PTRACE_GETREGSET
struct iovec io;
info->GetGeneralPurposeRegisters(&io.iov_base, &io.iov_len);
- if (sys_ptrace(PTRACE_GETREGSET, tid, (void*)NT_PRSTATUS, (void*)&io) == -1) {
+ if (ptrace(PTRACE_GETREGSET, tid, (void*)NT_PRSTATUS, (void*)&io) == -1) {
return false;
}
info->GetFloatingPointRegisters(&io.iov_base, &io.iov_len);
- if (sys_ptrace(PTRACE_GETREGSET, tid, (void*)NT_FPREGSET, (void*)&io) == -1) {
+ if (ptrace(PTRACE_GETREGSET, tid, (void*)NT_FPREGSET, (void*)&io) == -1) {
// We are going to check if we can read VFP registers on ARM32.
// Currently breakpad does not support VFP registers to be a part of minidump,
// so this is only to confirm that we can actually read FP registers.
@@ -233,6 +233,15 @@ bool LinuxPtraceDumper::ReadRegisterSet(
}
#endif // defined(__arm__)
}
+
+#if defined(__powerpc64__)
+ // Grab the vector registers on PPC64 too
+ info->GetVectorRegisters(&io.iov_base, &io.iov_len);
+ if (ptrace(PTRACE_GETREGSET, tid, (void*)NT_PPC_VMX, (void*)&io) == -1) {
+ return false;
+ }
+#endif // defined(__powerpc64__)
+
return true;
#else
return false;
@@ -397,6 +406,9 @@ bool LinuxPtraceDumper::GetThreadInfoByI
#elif defined(__riscv)
stack_pointer = reinterpret_cast<uint8_t*>(
info->mcontext.__gregs[MD_CONTEXT_RISCV_REG_SP]);
+#elif defined(__powerpc64__)
+ stack_pointer =
+ reinterpret_cast<uint8_t*>(info->mcontext.gp_regs[MD_CONTEXT_PPC64_REG_SP]);
#else
# error "This code hasn't been ported to your platform yet."
#endif
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
@@ -469,6 +469,9 @@ TEST(LinuxPtraceDumperTest, VerifyStackR
#elif defined(__riscv)
pid_t* process_tid_location =
reinterpret_cast<pid_t*>(one_thread.mcontext.__gregs[4]);
+#elif defined(__powerpc64__)
+ pid_t* process_tid_location =
+ reinterpret_cast<pid_t*>(one_thread.mcontext.gp_regs[8]);
#else
#error This test has not been ported to this platform.
#endif
@@ -568,6 +571,8 @@ TEST_F(LinuxPtraceDumperTest, SanitizeSt
uintptr_t heap_addr = thread_info.mcontext.gregs[1];
#elif defined(__riscv)
uintptr_t heap_addr = thread_info.mcontext.__gregs[4];
+#elif defined(__powerpc64__)
+ uintptr_t heap_addr = thread_info.mcontext.gp_regs[8];
#else
#error This test has not been ported to this platform.
#endif
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
@@ -145,7 +145,9 @@ class MinidumpWriter {
: fd_(minidump_fd),
path_(minidump_path),
ucontext_(context ? &context->context : nullptr),
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
+#if defined(__powerpc64__)
+ vector_state_(context ? &context->vector_state : nullptr),
+#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
float_state_(context ? &context->float_state : nullptr),
#endif
dumper_(dumper),
@@ -477,7 +479,9 @@ class MinidumpWriter {
if (!cpu.Allocate())
return false;
my_memset(cpu.get(), 0, sizeof(RawContextCPU));
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
+#if defined(__powerpc64__)
+ UContextReader::FillCPUContext(cpu.get(), ucontext_, vector_state_);
+#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
UContextReader::FillCPUContext(cpu.get(), ucontext_, float_state_);
#else
UContextReader::FillCPUContext(cpu.get(), ucontext_);
@@ -954,7 +958,7 @@ class MinidumpWriter {
dirent->location.rva = 0;
}
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || defined(__powerpc64__)
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";
@@ -974,7 +978,9 @@ class MinidumpWriter {
// processor_architecture should always be set, do this first
sys_info->processor_architecture =
-#if defined(__mips__)
+#if defined(__powerpc64__)
+ MD_CPU_ARCHITECTURE_PPC64;
+#elif defined(__mips__)
# if _MIPS_SIM == _ABIO32
MD_CPU_ARCHITECTURE_MIPS;
# elif _MIPS_SIM == _ABI64
@@ -1441,7 +1447,9 @@ 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 GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
+#if defined(__powerpc64__)
+ const google_breakpad::vstate_t* const vector_state_;
+#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
const google_breakpad::fpstate_t* const float_state_; // ditto
#endif
LinuxDumper* dumper_;
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
@@ -47,6 +47,8 @@ class ExceptionHandler;
#if defined(__aarch64__)
typedef struct fpsimd_context fpstate_t;
+#elif defined(__powerpc64__)
+typedef struct _libc_vrstate vstate_t;
#elif !defined(__ARM_EABI__) && !defined(__mips__)
typedef std::remove_pointer<fpregset_t>::type fpstate_t;
#endif
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc
@@ -723,6 +723,9 @@ TEST(MinidumpWriterTest, InvalidStackPoi
#elif defined(__riscv)
context.context.uc_mcontext.__gregs[MD_CONTEXT_RISCV_REG_SP] =
invalid_stack_pointer;
+#elif defined(__powerpc64__)
+ context.context.uc_mcontext.gp_regs[MD_CONTEXT_PPC64_REG_SP] =
+ invalid_stack_pointer;
#else
# error "This code has not been ported to your platform yet."
#endif
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
@@ -72,8 +72,7 @@ bool MemoryMappedFile::Map(const char* p
#if defined(__x86_64__) || defined(__aarch64__) || \
(defined(__mips__) && _MIPS_SIM == _ABI64) || \
- (defined(__riscv) && __riscv_xlen == 64)
-
+ (defined(__riscv) && __riscv_xlen == 64) || defined(__powerpc64__)
struct kernel_stat st;
if (sys_fstat(fd, &st) == -1 || st.st_size < 0) {
#else
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
@@ -178,9 +178,10 @@ TEST_F(MemoryMappedFileTest, RemapAfterM
TEST_F(MemoryMappedFileTest, MapWithOffset) {
// Put more data in the test file this time. Offsets can only be
// done on page boundaries, so we need a two page file to test this.
- const int page_size = 4096;
- char data1[2 * page_size];
- size_t data1_size = sizeof(data1);
+ const int page_size = getpagesize();
+ char *data1 = static_cast<char*>(malloc(2 * page_size));
+ EXPECT_TRUE(data1 != NULL);
+ size_t data1_size = (2 * page_size);
for (size_t i = 0; i < data1_size; ++i) {
data1[i] = i & 0x7f;
}
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
@@ -64,8 +64,9 @@ TEST(PageAllocatorTest, LargeObject) {
EXPECT_EQ(0U, allocator.pages_allocated());
uint8_t* p = reinterpret_cast<uint8_t*>(allocator.Alloc(10000));
+ uint64_t expected_pages = 1 + ((10000 - 1) / getpagesize());
ASSERT_FALSE(p == nullptr);
- EXPECT_EQ(3U, allocator.pages_allocated());
+ EXPECT_EQ(expected_pages, allocator.pages_allocated());
for (unsigned i = 1; i < 10; ++i) {
uint8_t* p = reinterpret_cast<uint8_t*>(allocator.Alloc(i));
ASSERT_FALSE(p == nullptr);
Index: chromium-144.0.7559.59/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc
+++ chromium-144.0.7559.59/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc
@@ -82,6 +82,8 @@
#define ELF_ARCH EM_AARCH64
#elif defined(__riscv)
#define ELF_ARCH EM_RISCV
+#elif defined(__powerpc64__)
+ #define ELF_ARCH EM_PPC64
#endif
#if defined(__arm__)
@@ -92,6 +94,8 @@ typedef user_regs user_regs_struct;
#elif defined (__mips__) || defined(__riscv)
// This file-local typedef simplifies the source code.
typedef gregset_t user_regs_struct;
+#elif defined(__powerpc64__)
+typedef struct pt_regs user_regs_struct;
#endif
using google_breakpad::MDTypeHelper;
@@ -325,6 +329,9 @@ struct CrashedProcess {
#if defined(__aarch64__)
user_fpsimd_struct fpregs;
#endif
+#if defined(__powerpc64__)
+ mcontext_t mcontext;
+#endif
uintptr_t stack_addr;
const uint8_t* stack;
size_t stack_length;
@@ -628,6 +635,38 @@ ParseThreadRegisters(CrashedProcess::Thr
#error "Unexpected __riscv_xlen"
#endif
}
+#elif defined(__powerpc64__)
+static void
+ParseThreadRegisters(CrashedProcess::Thread* thread,
+ const MinidumpMemoryRange& range) {
+ const MDRawContextPPC64* rawregs = range.GetData<MDRawContextPPC64>(0);
+
+ for (int i = 0; i < MD_CONTEXT_PPC64_GPR_COUNT; i++)
+ thread->mcontext.gp_regs[i] = rawregs->gpr[i];
+
+ thread->mcontext.gp_regs[PT_LNK] = rawregs->lr;
+ thread->mcontext.gp_regs[PT_NIP] = rawregs->srr0;
+ thread->mcontext.gp_regs[PT_MSR] = rawregs->srr1;
+ thread->mcontext.gp_regs[PT_CCR] = rawregs->cr;
+ thread->mcontext.gp_regs[PT_XER] = rawregs->xer;
+ thread->mcontext.gp_regs[PT_CTR] = rawregs->ctr;
+ thread->mcontext.v_regs->vrsave = rawregs->vrsave;
+
+ for (int i = 0; i < MD_FLOATINGSAVEAREA_PPC_FPR_COUNT; i++)
+ thread->mcontext.fp_regs[i] = rawregs->float_save.fpregs[i];
+
+ thread->mcontext.fp_regs[NFPREG-1] = rawregs->float_save.fpscr;
+
+ for (int i = 0; i < MD_VECTORSAVEAREA_PPC_VR_COUNT; i++) {
+ thread->mcontext.v_regs->vrregs[i][0] = rawregs->vector_save.save_vr[i].high >> 32;
+ thread->mcontext.v_regs->vrregs[i][1] = rawregs->vector_save.save_vr[i].high;
+ thread->mcontext.v_regs->vrregs[i][2] = rawregs->vector_save.save_vr[i].low >> 32;
+ thread->mcontext.v_regs->vrregs[i][3] = rawregs->vector_save.save_vr[i].low;
+ }
+
+ thread->mcontext.v_regs->vscr.vscr_word = rawregs->vector_save.save_vscr.low & 0xFFFFFFFF;
+}
+
#else
#error "This code has not been ported to your platform yet"
#endif
@@ -733,6 +772,12 @@ ParseSystemInfo(const Options& options,
# else
# error "Unexpected __riscv_xlen"
# endif
+#elif defined(__powerpc64__)
+ if (sysinfo->processor_architecture != MD_CPU_ARCHITECTURE_PPC64) {
+ fprintf(stderr,
+ "This version of minidump-2-core only supports PPC64.\n");
+ exit(1);
+ }
#else
#error "This code has not been ported to your platform yet"
#endif

View file

@ -0,0 +1,46 @@
From e93d9b5fdcd8e5744de629461c03a07de2252f8f Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgallagh@redhat.com>
Date: Fri, 17 Apr 2020 12:59:44 +0200
Subject: [PATCH] Remove unused OpenSSL config
The build process will try to create these config files, even when
using the system OpenSSL and will thus fail since we strip this path
from the tarball.
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
Signed-off-by: rpm-build <rpm-build>
---
node.gyp | 17 -----------------
1 file changed, 17 deletions(-)
diff --git a/node.gyp b/node.gyp
index 1147495..da6ea50 100644
--- a/node.gyp
+++ b/node.gyp
@@ -822,23 +822,6 @@
],
},
],
- }, {
- 'variables': {
- 'opensslconfig_internal': '<(obj_dir)/deps/openssl/openssl.cnf',
- 'opensslconfig': './deps/openssl/nodejs-openssl.cnf',
- },
- 'actions': [
- {
- 'action_name': 'reset_openssl_cnf',
- 'inputs': [ '<(opensslconfig)', ],
- 'outputs': [ '<(opensslconfig_internal)', ],
- 'action': [
- '<(python)', 'tools/copyfile.py',
- '<(opensslconfig)',
- '<(opensslconfig_internal)',
- ],
- },
- ],
}],
],
}, # node_core_target_name
--
2.47.0

View file

@ -0,0 +1,35 @@
Index: chromium-144.0.7559.59/third_party/xnnpack/generate_build_gn.py
===================================================================
--- chromium-144.0.7559.59.orig/third_party/xnnpack/generate_build_gn.py
+++ chromium-144.0.7559.59/third_party/xnnpack/generate_build_gn.py
@@ -239,7 +239,10 @@ _PLATFORMS = [
bazel_platform='//:linux_aarch64'),
_Platform(gn_cpu='riscv64',
bazel_cpu='riscv64',
- bazel_platform='//:linux_riscv64')
+ bazel_platform='//:linux_riscv64'),
+ _Platform(gn_cpu='ppc64',
+ bazel_cpu='ppc64le',
+ bazel_platform='//:linux_ppc64le')
]
Index: chromium-144.0.7559.59/third_party/xnnpack/bazelroot/BUILD
===================================================================
--- chromium-144.0.7559.59.orig/third_party/xnnpack/bazelroot/BUILD
+++ chromium-144.0.7559.59/third_party/xnnpack/bazelroot/BUILD
@@ -29,6 +29,14 @@ platform(
],
)
+platform(
+ name = "linux_ppc64le",
+ constraint_values = [
+ "@platforms//os:linux",
+ "@platforms//cpu:ppc64le",
+ ],
+)
+
# A dummy clang toolchain for building them for any arch.
filegroup(name = "empty")

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,20 @@
Description: fix swiftshader build issue on ppc64el
Origin: vendor, https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches/-/blob/chromium-131/patches/ppc64le/third_party/0001-swiftshader-fix-build.patch
Bug: https://buildd.debian.org/status/fetch.php?pkg=chromium&arch=ppc64el&ver=131.0.6778.204-1&stamp=1734633529&raw=0
Last-Update: 2024-12-20
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: chromium-144.0.7559.59/third_party/swiftshader/third_party/llvm-16.0/BUILD.gn
===================================================================
--- chromium-144.0.7559.59.orig/third_party/swiftshader/third_party/llvm-16.0/BUILD.gn
+++ chromium-144.0.7559.59/third_party/swiftshader/third_party/llvm-16.0/BUILD.gn
@@ -1599,6 +1599,9 @@ swiftshader_llvm_source_set("swiftshader
"llvm/lib/Target/PowerPC/PPCVSXFMAMutate.cpp",
"llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp",
"llvm/lib/Target/PowerPC/TargetInfo/PowerPCTargetInfo.cpp",
+ "llvm/lib/MC/MCXCOFFObjectTargetWriter.cpp",
+ "llvm/lib/MC/MCAsmInfoXCOFF.cpp",
+ "llvm/lib/MC/MCInstrInfo.cpp",
]
}

View file

@ -0,0 +1,12 @@
Index: chromium-144.0.7559.59/third_party/angle/src/libANGLE/Constants.h
===================================================================
--- chromium-144.0.7559.59.orig/third_party/angle/src/libANGLE/Constants.h
+++ chromium-144.0.7559.59/third_party/angle/src/libANGLE/Constants.h
@@ -9,6 +9,7 @@
#ifndef LIBANGLE_CONSTANTS_H_
#define LIBANGLE_CONSTANTS_H_
+#include <cstddef>
#include "common/platform.h"
#include <stddef.h>

View file

@ -0,0 +1,23 @@
From cc613c2e3bac8d4d1ff153700b819f964435923a Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawnanastasio@yahoo.com>
Date: Tue, 4 Sep 2018 18:16:07 -0500
Subject: [PATCH] third_party/libvpx: Properly generate gni on ppc64
---
third_party/libvpx/BUILD.gn | 2 ++
third_party/libvpx/generate_gni.sh | 10 ++++++++++
2 files changed, 12 insertions(+)
Index: chromium-144.0.7559.59/third_party/libvpx/BUILD.gn
===================================================================
--- chromium-144.0.7559.59.orig/third_party/libvpx/BUILD.gn
+++ chromium-144.0.7559.59/third_party/libvpx/BUILD.gn
@@ -297,6 +297,8 @@ if (current_cpu == "x86" || (current_cpu
} else if (current_cpu == "x64") {
deps = [ ":libvpx_x86_64_headers" ]
sources = libvpx_srcs_x86_64_avx512
+ } else if (current_cpu == "ppc64") {
+ sources = libvpx_srcs_ppc64
}
}
}

View file

@ -0,0 +1,22 @@
From 63e63a70766f3059ce5f1d06a95988ecf909b298 Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawn@anastas.io>
Date: Wed, 24 Apr 2019 21:17:23 -0500
Subject: [PATCH] third_party/pffft: Include altivec.h on ppc64 with SIMD
enabled
---
third_party/pffft/src/pffft.c | 1 +
1 file changed, 1 insertion(+)
Index: chromium-144.0.7559.59/third_party/pffft/src/pffft.c
===================================================================
--- chromium-144.0.7559.59.orig/third_party/pffft/src/pffft.c
+++ chromium-144.0.7559.59/third_party/pffft/src/pffft.c
@@ -100,6 +100,7 @@
Altivec support macros
*/
#if !defined(PFFFT_SIMD_DISABLE) && (defined(__ppc__) || defined(__ppc64__))
+#include <altivec.h>
typedef vector float v4sf;
# define SIMD_SZ 4
# define VZERO() ((vector float) vec_splat_u8(0))

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,18 @@
Index: chromium-144.0.7559.59/v8/src/base/immediate-crash.h
===================================================================
--- chromium-144.0.7559.59.orig/v8/src/base/immediate-crash.h
+++ chromium-144.0.7559.59/v8/src/base/immediate-crash.h
@@ -98,6 +98,13 @@
#define TRAP_SEQUENCE1_() asm volatile(".2byte 0x0001");
#define TRAP_SEQUENCE2_() asm volatile("")
+#elif V8_HOST_ARCH_PPC64
+
+#define TRAP_SEQUENCE1_() asm volatile("trap")
+// Intentionally empty: __builtin_unreachable() is always part of the sequence
+// (see IMMEDIATE_CRASH below)
+#define TRAP_SEQUENCE2_() asm volatile("")
+
#else
// Crash report accuracy will not be guaranteed on other architectures, but at

View file

@ -0,0 +1,36 @@
# crypto: fix missing OPENSSL_NO_ENGINE guard
# PR-URL: https://github.com/nodejs/node/pull/57012
# Reviewed-By: Richard Lau <rlau@redhat.com>
# Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
# Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
# Reviewed-By: James M Snell <jasnell@gmail.com>
diff --git a/src/crypto/crypto_context.cc b/src/crypto/crypto_context.cc
index abcdef1..2345678 100644
--- a/src/crypto/crypto_context.cc
+++ b/src/crypto/crypto_context.cc
@@ -34,7 +34,9 @@ using ncrypto::BIOPointer;
using ncrypto::ClearErrorOnReturn;
using ncrypto::CryptoErrorList;
using ncrypto::DHPointer;
+#ifndef OPENSSL_NO_ENGINE
using ncrypto::EnginePointer;
+#endif // !OPENSSL_NO_ENGINE
using ncrypto::EVPKeyPointer;
using ncrypto::MarkPopErrorOnReturn;
using ncrypto::SSLPointer;
diff --git a/src/crypto/crypto_util.cc b/src/crypto/crypto_util.cc
index 1234567..abcdef0 100644
--- a/src/crypto/crypto_util.cc
+++ b/src/crypto/crypto_util.cc
@@ -30,7 +30,9 @@
using ncrypto::BIOPointer;
using ncrypto::CryptoErrorList;
+#ifndef OPENSSL_NO_ENGINE
using ncrypto::EnginePointer;
+#endif // !OPENSSL_NO_ENGINE
using ncrypto::EVPKeyCtxPointer;
using v8::ArrayBuffer;
using v8::BackingStore;
using v8::BigInt;

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,148 @@
Index: chromium-144.0.7559.59/third_party/lss/linux_syscall_support.h
===================================================================
--- chromium-144.0.7559.59.orig/third_party/lss/linux_syscall_support.h
+++ chromium-144.0.7559.59/third_party/lss/linux_syscall_support.h
@@ -86,7 +86,7 @@
* Porting to other related platforms should not be difficult.
*/
#if (defined(__i386__) || defined(__x86_64__) || defined(__ARM_ARCH_3__) || \
- defined(__mips__) || defined(__PPC__) || defined(__ARM_EABI__) || \
+ defined(__mips__) || defined(__PPC__) || defined(__powerpc64__) || defined(__ARM_EABI__) || \
defined(__aarch64__) || defined(__s390__) || defined(__e2k__) || \
(defined(__riscv) && __riscv_xlen == 64) || defined(__loongarch_lp64)) \
&& (defined(__linux) || defined(__ANDROID__))
@@ -400,7 +400,7 @@ struct kernel_stat64 {
unsigned __pad2;
unsigned long long st_blocks;
};
-#elif defined __PPC__
+#elif defined __PPC__ && !defined(__powerpc64__)
struct kernel_stat64 {
unsigned long long st_dev;
unsigned long long st_ino;
@@ -422,6 +422,28 @@ struct kernel_stat64 {
unsigned long __unused4;
unsigned long __unused5;
};
+#elif defined(__powerpc64__)
+struct kernel_stat64 {
+ unsigned long int st_dev;
+ unsigned long int st_ino;
+ unsigned int st_mode;
+ unsigned long int st_nlink;
+ unsigned int st_uid;
+ unsigned int st_gid;
+ unsigned long int st_rdev;
+ unsigned short int __pad2;
+ long int st_size;
+ long int st_blksize;
+ long int st_blocks;
+ long int st_atime_;
+ unsigned long int st_atime_nsec_;
+ long int st_mtime_;
+ unsigned long int st_mtime_nsec_;
+ long int st_ctime_;
+ unsigned long int st_ctime_nsec_;
+ unsigned long int __unused4;
+ unsigned long int __unused5;
+};
#elif defined(__e2k__)
struct kernel_stat64 {
unsigned long long st_dev;
@@ -538,7 +560,7 @@ struct kernel_stat {
uint64_t st_ctime_nsec_;
int64_t __unused4[3];
};
-#elif defined(__PPC__)
+#elif defined(__PPC__) && !defined(__powerpc64__)
typedef unsigned long kernel_blkcnt_t;
typedef unsigned long kernel_blksize_t;
typedef unsigned kernel_dev_t;
@@ -569,6 +591,37 @@ struct kernel_stat {
unsigned long __unused4;
unsigned long __unused5;
};
+#elif defined(__powerpc64__)
+typedef long int kernel_blkcnt_t;
+typedef long int kernel_blksize_t;
+typedef unsigned long int kernel_dev_t;
+typedef unsigned int kernel_gid_t;
+typedef unsigned long int kernel_ino_t;
+typedef unsigned int kernel_mode_t;
+typedef unsigned long int kernel_nlink_t;
+typedef long int kernel_off_t;
+typedef long int kernel_time_t;
+typedef unsigned int kernel_uid_t;
+struct kernel_stat {
+ kernel_dev_t st_dev;
+ kernel_ino_t st_ino;
+ kernel_mode_t st_mode;
+ kernel_nlink_t st_nlink;
+ kernel_uid_t st_uid;
+ kernel_gid_t st_gid;
+ kernel_dev_t st_rdev;
+ kernel_off_t st_size;
+ kernel_blksize_t st_blksize;
+ kernel_blkcnt_t st_blocks;
+ kernel_time_t st_atime_;
+ unsigned long int st_atime_nsec_;
+ kernel_time_t st_mtime_;
+ unsigned long int st_mtime_nsec_;
+ kernel_time_t st_ctime_;
+ unsigned long int st_ctime_nsec_;
+ unsigned long int __unused4;
+ unsigned long int __unused5;
+};
#elif (defined(__mips__) && _MIPS_SIM != _MIPS_SIM_ABI64)
typedef int kernel_blkcnt_t;
typedef int kernel_blksize_t;
@@ -1825,6 +1878,28 @@ struct kernel_statx {
#ifndef __NR_getcpu
#define __NR_getcpu 302
#endif
+
+/* Linux commit 86250b9d12caa1a3dee12a7cf638b7dd70eaadb6 (2010) adds
+ * direct socket system calls to PPC */
+#ifndef __NR_socket
+#define __NR_socket 326
+#endif
+#ifndef __NR_socketpair
+#define __NR_socketpair 333
+#endif
+#ifndef __NR_sendto
+#define __NR_sendto 335
+#endif
+#ifndef __NR_shutdown
+#define __NR_shutdown 338
+#endif
+#ifndef __NR_sendmsg
+#define __NR_sendmsg 341
+#endif
+#ifndef __NR_recvmsg
+#define __NR_recvmsg 342
+#endif
+
/* End of powerpc definitions */
#elif defined(__s390__)
#ifndef __NR_quotactl
@@ -4826,7 +4901,7 @@ struct kernel_statx {
LSS_INLINE _syscall6(void*, mmap, void*, addr, size_t, length, int, prot,
int, flags, int, fd, int64_t, offset)
#endif
- #if defined(__PPC__)
+ #if defined(__PPC__) && !defined(__powerpc64__)
#undef LSS_SC_LOADARGS_0
#define LSS_SC_LOADARGS_0(dummy...)
#undef LSS_SC_LOADARGS_1
@@ -5216,7 +5291,11 @@ struct kernel_statx {
#endif
#if !defined(__NR_pipe)
+#if defined(__powerpc64__)
+ LSS_INLINE pid_t LSS_NAME(pipe)(int *pipefd) {
+#else
LSS_INLINE int LSS_NAME(pipe)(int *pipefd) {
+#endif
return LSS_NAME(pipe2)(pipefd, 0);
}
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,17 @@
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
===================================================================
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
@@ -239,6 +239,12 @@ std::string UserAgent() {
#endif
#elif defined (ARCH_CPU_RISCV64)
static constexpr char arch[] = "riscv64";
+#elif defined(__powerpc64__)
+#if defined(ARCH_CPU_LITTLE_ENDIAN)
+ static constexpr char arch[] = "ppc64";
+#elif defined(ARCH_CPU_BIG_ENDIAN)
+ static constexpr char arch[] = "ppc64_be";
+#endif
#else
#error Port
#endif

View file

@ -0,0 +1,376 @@
Index: chromium-144.0.7559.59/third_party/libvpx/source/libvpx/vp9/encoder/ppc/vp9_quantize_vsx.c
===================================================================
--- chromium-144.0.7559.59.orig/third_party/libvpx/source/libvpx/vp9/encoder/ppc/vp9_quantize_vsx.c
+++ chromium-144.0.7559.59/third_party/libvpx/source/libvpx/vp9/encoder/ppc/vp9_quantize_vsx.c
@@ -38,6 +38,28 @@ static INLINE int16x8_t vec_max_across(i
return vec_max(a, vec_perm(a, a, vec_perm16));
}
+static INLINE void
+vec_u64_store(vector unsigned long long vecu64, unsigned long offset, void *ptr)
+{
+#ifndef WORDS_BIGENDIAN
+ __asm__ ("xxswapd %x0, %x1"
+ : "=wa" (vecu64)
+ : "wa" (vecu64));
+#endif
+#if __GNUC__ >= 4
+ if (__builtin_constant_p (offset) && offset == 0)
+ __asm__ ("stxvd2x %x0,0,%1\n\t"
+ :
+ : "wa" (vecu64), "r" ((uintptr_t)ptr)
+ : "memory");
+ else
+#endif
+ __asm__ ("stxvd2x %x0,%1,%2\n\t"
+ :
+ : "wa" (vecu64), "r" (offset), "r" ((uintptr_t)ptr)
+ : "memory", "r0");
+}
+
void vp9_quantize_fp_vsx(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
const int16_t *round_ptr, const int16_t *quant_ptr,
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
@@ -60,10 +82,10 @@ void vp9_quantize_fp_vsx(const tran_low_
qcoeff0 = vec_mulhi(vec_vaddshs(vec_abs(coeff0), round), quant);
zero_coeff0 = vec_cmpeq(qcoeff0, vec_zeros_s16);
qcoeff0 = vec_sign(qcoeff0, coeff0);
- vec_vsx_st(qcoeff0, 0, qcoeff_ptr);
+ vec_u64_store(qcoeff0, 0, qcoeff_ptr);
dqcoeff0 = vec_mladd(qcoeff0, dequant, vec_zeros_s16);
- vec_vsx_st(dqcoeff0, 0, dqcoeff_ptr);
+ vec_u64_store(dqcoeff0, 0, dqcoeff_ptr);
// Remove DC value from round and quant
round = vec_splat(round, 1);
@@ -76,10 +98,10 @@ void vp9_quantize_fp_vsx(const tran_low_
qcoeff1 = vec_mulhi(vec_vaddshs(vec_abs(coeff1), round), quant);
zero_coeff1 = vec_cmpeq(qcoeff1, vec_zeros_s16);
qcoeff1 = vec_sign(qcoeff1, coeff1);
- vec_vsx_st(qcoeff1, 16, qcoeff_ptr);
+ vec_u64_store(qcoeff1, 16, qcoeff_ptr);
dqcoeff1 = vec_mladd(qcoeff1, dequant, vec_zeros_s16);
- vec_vsx_st(dqcoeff1, 16, dqcoeff_ptr);
+ vec_u64_store(dqcoeff1, 16, dqcoeff_ptr);
eob = vec_max(vec_or(scan0, zero_coeff0), vec_or(scan1, zero_coeff1));
@@ -107,23 +129,23 @@ void vp9_quantize_fp_vsx(const tran_low_
qcoeff0 = vec_mulhi(vec_vaddshs(vec_abs(coeff0), round), quant);
zero_coeff0 = vec_cmpeq(qcoeff0, vec_zeros_s16);
qcoeff0 = vec_sign(qcoeff0, coeff0);
- vec_vsx_st(qcoeff0, off0, qcoeff_ptr);
+ vec_u64_store(qcoeff0, off0, qcoeff_ptr);
dqcoeff0 = vec_mladd(qcoeff0, dequant, vec_zeros_s16);
- vec_vsx_st(dqcoeff0, off0, dqcoeff_ptr);
+ vec_u64_store(dqcoeff0, off0, dqcoeff_ptr);
qcoeff1 = vec_mulhi(vec_vaddshs(vec_abs(coeff1), round), quant);
zero_coeff1 = vec_cmpeq(qcoeff1, vec_zeros_s16);
qcoeff1 = vec_sign(qcoeff1, coeff1);
- vec_vsx_st(qcoeff1, off1, qcoeff_ptr);
+ vec_u64_store(qcoeff1, off1, qcoeff_ptr);
dqcoeff1 = vec_mladd(qcoeff1, dequant, vec_zeros_s16);
- vec_vsx_st(dqcoeff1, off1, dqcoeff_ptr);
+ vec_u64_store(dqcoeff1, off1, dqcoeff_ptr);
qcoeff2 = vec_mulhi(vec_vaddshs(vec_abs(coeff2), round), quant);
zero_coeff2 = vec_cmpeq(qcoeff2, vec_zeros_s16);
qcoeff2 = vec_sign(qcoeff2, coeff2);
- vec_vsx_st(qcoeff2, off2, qcoeff_ptr);
+ vec_u64_store(qcoeff2, off2, qcoeff_ptr);
dqcoeff2 = vec_mladd(qcoeff2, dequant, vec_zeros_s16);
- vec_vsx_st(dqcoeff2, off2, dqcoeff_ptr);
+ vec_u64_store(dqcoeff2, off2, dqcoeff_ptr);
eob = vec_max(eob, vec_or(scan0, zero_coeff0));
eob2 = vec_max(vec_or(scan1, zero_coeff1), vec_or(scan2, zero_coeff2));
@@ -200,10 +222,10 @@ void vp9_quantize_fp_32x32_vsx(const tra
qcoeff0 = vec_and(qcoeff0, mask0);
zero_coeff0 = vec_cmpeq(qcoeff0, vec_zeros_s16);
qcoeff0 = vec_sign(qcoeff0, coeff0);
- vec_vsx_st(qcoeff0, 0, qcoeff_ptr);
+ vec_u64_store(qcoeff0, 0, qcoeff_ptr);
dqcoeff0 = dequantize_coeff_32(qcoeff0, dequant);
- vec_vsx_st(dqcoeff0, 0, dqcoeff_ptr);
+ vec_u64_store(dqcoeff0, 0, dqcoeff_ptr);
// Remove DC value from thres, round, quant and dequant
thres = vec_splat(thres, 1);
@@ -219,10 +241,10 @@ void vp9_quantize_fp_32x32_vsx(const tra
qcoeff1 = vec_and(qcoeff1, mask1);
zero_coeff1 = vec_cmpeq(qcoeff1, vec_zeros_s16);
qcoeff1 = vec_sign(qcoeff1, coeff1);
- vec_vsx_st(qcoeff1, 16, qcoeff_ptr);
+ vec_u64_store(qcoeff1, 16, qcoeff_ptr);
dqcoeff1 = dequantize_coeff_32(qcoeff1, dequant);
- vec_vsx_st(dqcoeff1, 16, dqcoeff_ptr);
+ vec_u64_store(dqcoeff1, 16, dqcoeff_ptr);
eob = vec_max(vec_or(scan0, zero_coeff0), vec_or(scan1, zero_coeff1));
@@ -260,17 +282,17 @@ void vp9_quantize_fp_32x32_vsx(const tra
qcoeff1 = vec_sign(qcoeff1, coeff1);
qcoeff2 = vec_sign(qcoeff2, coeff2);
- vec_vsx_st(qcoeff0, off0, qcoeff_ptr);
- vec_vsx_st(qcoeff1, off1, qcoeff_ptr);
- vec_vsx_st(qcoeff2, off2, qcoeff_ptr);
+ vec_u64_store(qcoeff0, off0, qcoeff_ptr);
+ vec_u64_store(qcoeff1, off1, qcoeff_ptr);
+ vec_u64_store(qcoeff2, off2, qcoeff_ptr);
dqcoeff0 = dequantize_coeff_32(qcoeff0, dequant);
dqcoeff1 = dequantize_coeff_32(qcoeff1, dequant);
dqcoeff2 = dequantize_coeff_32(qcoeff2, dequant);
- vec_vsx_st(dqcoeff0, off0, dqcoeff_ptr);
- vec_vsx_st(dqcoeff1, off1, dqcoeff_ptr);
- vec_vsx_st(dqcoeff2, off2, dqcoeff_ptr);
+ vec_u64_store(dqcoeff0, off0, dqcoeff_ptr);
+ vec_u64_store(dqcoeff1, off1, dqcoeff_ptr);
+ vec_u64_store(dqcoeff2, off2, dqcoeff_ptr);
eob = vec_max(eob, vec_or(scan0, zero_coeff0));
eob2 = vec_max(vec_or(scan1, zero_coeff1), vec_or(scan2, zero_coeff2));
Index: chromium-144.0.7559.59/third_party/libvpx/source/libvpx/vpx_dsp/ppc/fdct32x32_vsx.c
===================================================================
--- chromium-144.0.7559.59.orig/third_party/libvpx/source/libvpx/vpx_dsp/ppc/fdct32x32_vsx.c
+++ chromium-144.0.7559.59/third_party/libvpx/source/libvpx/vpx_dsp/ppc/fdct32x32_vsx.c
@@ -15,6 +15,28 @@
#include "vpx_dsp/ppc/txfm_common_vsx.h"
#include "vpx_dsp/ppc/types_vsx.h"
+static INLINE void
+vec_u64_store(vector unsigned long long vecu64, unsigned long offset, void *ptr)
+{
+#ifndef WORDS_BIGENDIAN
+ __asm__ ("xxswapd %x0, %x1"
+ : "=wa" (vecu64)
+ : "wa" (vecu64));
+#endif
+#if __GNUC__ >= 4
+ if (__builtin_constant_p (offset) && offset == 0)
+ __asm__ ("stxvd2x %x0,0,%1\n\t"
+ :
+ : "wa" (vecu64), "r" ((uintptr_t)ptr)
+ : "memory");
+ else
+#endif
+ __asm__ ("stxvd2x %x0,%1,%2\n\t"
+ :
+ : "wa" (vecu64), "r" (offset), "r" ((uintptr_t)ptr)
+ : "memory", "r0");
+}
+
// Returns ((a +/- b) * cospi16 + (2 << 13)) >> 14.
static INLINE void single_butterfly(int16x8_t a, int16x8_t b, int16x8_t *add,
int16x8_t *sub) {
@@ -164,45 +186,45 @@ static INLINE void load(const int16_t *a
}
static INLINE void store(tran_low_t *a, const int16x8_t *b) {
- vec_vsx_st(b[0], 0, a);
- vec_vsx_st(b[8], 0, a + 8);
- vec_vsx_st(b[16], 0, a + 16);
- vec_vsx_st(b[24], 0, a + 24);
-
- vec_vsx_st(b[1], 0, a + 32);
- vec_vsx_st(b[9], 0, a + 40);
- vec_vsx_st(b[17], 0, a + 48);
- vec_vsx_st(b[25], 0, a + 56);
-
- vec_vsx_st(b[2], 0, a + 64);
- vec_vsx_st(b[10], 0, a + 72);
- vec_vsx_st(b[18], 0, a + 80);
- vec_vsx_st(b[26], 0, a + 88);
-
- vec_vsx_st(b[3], 0, a + 96);
- vec_vsx_st(b[11], 0, a + 104);
- vec_vsx_st(b[19], 0, a + 112);
- vec_vsx_st(b[27], 0, a + 120);
-
- vec_vsx_st(b[4], 0, a + 128);
- vec_vsx_st(b[12], 0, a + 136);
- vec_vsx_st(b[20], 0, a + 144);
- vec_vsx_st(b[28], 0, a + 152);
-
- vec_vsx_st(b[5], 0, a + 160);
- vec_vsx_st(b[13], 0, a + 168);
- vec_vsx_st(b[21], 0, a + 176);
- vec_vsx_st(b[29], 0, a + 184);
-
- vec_vsx_st(b[6], 0, a + 192);
- vec_vsx_st(b[14], 0, a + 200);
- vec_vsx_st(b[22], 0, a + 208);
- vec_vsx_st(b[30], 0, a + 216);
-
- vec_vsx_st(b[7], 0, a + 224);
- vec_vsx_st(b[15], 0, a + 232);
- vec_vsx_st(b[23], 0, a + 240);
- vec_vsx_st(b[31], 0, a + 248);
+ vec_u64_store(b[0], 0, a);
+ vec_u64_store(b[8], 0, a + 8);
+ vec_u64_store(b[16], 0, a + 16);
+ vec_u64_store(b[24], 0, a + 24);
+
+ vec_u64_store(b[1], 0, a + 32);
+ vec_u64_store(b[9], 0, a + 40);
+ vec_u64_store(b[17], 0, a + 48);
+ vec_u64_store(b[25], 0, a + 56);
+
+ vec_u64_store(b[2], 0, a + 64);
+ vec_u64_store(b[10], 0, a + 72);
+ vec_u64_store(b[18], 0, a + 80);
+ vec_u64_store(b[26], 0, a + 88);
+
+ vec_u64_store(b[3], 0, a + 96);
+ vec_u64_store(b[11], 0, a + 104);
+ vec_u64_store(b[19], 0, a + 112);
+ vec_u64_store(b[27], 0, a + 120);
+
+ vec_u64_store(b[4], 0, a + 128);
+ vec_u64_store(b[12], 0, a + 136);
+ vec_u64_store(b[20], 0, a + 144);
+ vec_u64_store(b[28], 0, a + 152);
+
+ vec_u64_store(b[5], 0, a + 160);
+ vec_u64_store(b[13], 0, a + 168);
+ vec_u64_store(b[21], 0, a + 176);
+ vec_u64_store(b[29], 0, a + 184);
+
+ vec_u64_store(b[6], 0, a + 192);
+ vec_u64_store(b[14], 0, a + 200);
+ vec_u64_store(b[22], 0, a + 208);
+ vec_u64_store(b[30], 0, a + 216);
+
+ vec_u64_store(b[7], 0, a + 224);
+ vec_u64_store(b[15], 0, a + 232);
+ vec_u64_store(b[23], 0, a + 240);
+ vec_u64_store(b[31], 0, a + 248);
}
// Returns 1 if negative 0 if positive
Index: chromium-144.0.7559.59/third_party/libvpx/source/libvpx/vpx_dsp/ppc/quantize_vsx.c
===================================================================
--- chromium-144.0.7559.59.orig/third_party/libvpx/source/libvpx/vpx_dsp/ppc/quantize_vsx.c
+++ chromium-144.0.7559.59/third_party/libvpx/source/libvpx/vpx_dsp/ppc/quantize_vsx.c
@@ -13,6 +13,28 @@
#include "./vpx_dsp_rtcd.h"
#include "vpx_dsp/ppc/types_vsx.h"
+static INLINE void
+vec_u64_store(vector unsigned long long vecu64, unsigned long offset, void *ptr)
+{
+#ifndef WORDS_BIGENDIAN
+ __asm__ ("xxswapd %x0, %x1"
+ : "=wa" (vecu64)
+ : "wa" (vecu64));
+#endif
+#if __GNUC__ >= 4
+ if (__builtin_constant_p (offset) && offset == 0)
+ __asm__ ("stxvd2x %x0,0,%1\n\t"
+ :
+ : "wa" (vecu64), "r" ((uintptr_t)ptr)
+ : "memory");
+ else
+#endif
+ __asm__ ("stxvd2x %x0,%1,%2\n\t"
+ :
+ : "wa" (vecu64), "r" (offset), "r" ((uintptr_t)ptr)
+ : "memory", "r0");
+}
+
// Negate 16-bit integers in a when the corresponding signed 16-bit
// integer in b is negative.
static INLINE int16x8_t vec_sign(int16x8_t a, int16x8_t b) {
@@ -124,19 +146,19 @@ void vpx_quantize_b_vsx(const tran_low_t
qcoeff0 =
quantize_coeff(coeff0, coeff0_abs, round, quant, quant_shift, zero_mask0);
- vec_vsx_st(qcoeff0, 0, qcoeff_ptr);
+ vec_u64_store(qcoeff0, 0, qcoeff_ptr);
round = vec_splat(round, 1);
quant = vec_splat(quant, 1);
quant_shift = vec_splat(quant_shift, 1);
qcoeff1 =
quantize_coeff(coeff1, coeff1_abs, round, quant, quant_shift, zero_mask1);
- vec_vsx_st(qcoeff1, 16, qcoeff_ptr);
+ vec_u64_store(qcoeff1, 16, qcoeff_ptr);
dqcoeff0 = vec_mladd(qcoeff0, dequant, vec_zeros_s16);
- vec_vsx_st(dqcoeff0, 0, dqcoeff_ptr);
+ vec_u64_store(dqcoeff0, 0, dqcoeff_ptr);
dequant = vec_splat(dequant, 1);
dqcoeff1 = vec_mladd(qcoeff1, dequant, vec_zeros_s16);
- vec_vsx_st(dqcoeff1, 16, dqcoeff_ptr);
+ vec_u64_store(dqcoeff1, 16, dqcoeff_ptr);
eob = vec_max(nonzero_scanindex(qcoeff0, iscan_ptr, 0),
nonzero_scanindex(qcoeff1, iscan_ptr, 16));
@@ -164,17 +186,17 @@ void vpx_quantize_b_vsx(const tran_low_t
zero_mask1);
qcoeff2 = quantize_coeff(coeff2, coeff2_abs, round, quant, quant_shift,
zero_mask2);
- vec_vsx_st(qcoeff0, off0, qcoeff_ptr);
- vec_vsx_st(qcoeff1, off1, qcoeff_ptr);
- vec_vsx_st(qcoeff2, off2, qcoeff_ptr);
+ vec_u64_store(qcoeff0, off0, qcoeff_ptr);
+ vec_u64_store(qcoeff1, off1, qcoeff_ptr);
+ vec_u64_store(qcoeff2, off2, qcoeff_ptr);
dqcoeff0 = vec_mladd(qcoeff0, dequant, vec_zeros_s16);
dqcoeff1 = vec_mladd(qcoeff1, dequant, vec_zeros_s16);
dqcoeff2 = vec_mladd(qcoeff2, dequant, vec_zeros_s16);
- vec_vsx_st(dqcoeff0, off0, dqcoeff_ptr);
- vec_vsx_st(dqcoeff1, off1, dqcoeff_ptr);
- vec_vsx_st(dqcoeff2, off2, dqcoeff_ptr);
+ vec_u64_store(dqcoeff0, off0, dqcoeff_ptr);
+ vec_u64_store(dqcoeff1, off1, dqcoeff_ptr);
+ vec_u64_store(dqcoeff2, off2, dqcoeff_ptr);
eob = vec_max(eob, nonzero_scanindex(qcoeff0, iscan_ptr, off0));
eob2 = vec_max(nonzero_scanindex(qcoeff1, iscan_ptr, off1),
@@ -243,12 +265,12 @@ void vpx_quantize_b_32x32_vsx(const tran
qcoeff1 = quantize_coeff_32(coeff1, coeff1_abs, round, quant, quant_shift,
zero_mask1);
- vec_vsx_st(qcoeff0, 0, qcoeff_ptr);
- vec_vsx_st(qcoeff1, 16, qcoeff_ptr);
+ vec_u64_store(qcoeff0, 0, qcoeff_ptr);
+ vec_u64_store(qcoeff1, 16, qcoeff_ptr);
- vec_vsx_st(dequantize_coeff_32(qcoeff0, dequant), 0, dqcoeff_ptr);
+ vec_u64_store(dequantize_coeff_32(qcoeff0, dequant), 0, dqcoeff_ptr);
dequant = vec_splat(dequant, 1); // remove DC from dequant
- vec_vsx_st(dequantize_coeff_32(qcoeff1, dequant), 16, dqcoeff_ptr);
+ vec_u64_store(dequantize_coeff_32(qcoeff1, dequant), 16, dqcoeff_ptr);
eob = vec_max(nonzero_scanindex(qcoeff0, iscan_ptr, 0),
nonzero_scanindex(qcoeff1, iscan_ptr, 16));
@@ -276,13 +298,13 @@ void vpx_quantize_b_32x32_vsx(const tran
qcoeff2 = quantize_coeff_32(coeff2, coeff2_abs, round, quant, quant_shift,
zero_mask2);
- vec_vsx_st(qcoeff0, off0, qcoeff_ptr);
- vec_vsx_st(qcoeff1, off1, qcoeff_ptr);
- vec_vsx_st(qcoeff2, off2, qcoeff_ptr);
-
- vec_vsx_st(dequantize_coeff_32(qcoeff0, dequant), off0, dqcoeff_ptr);
- vec_vsx_st(dequantize_coeff_32(qcoeff1, dequant), off1, dqcoeff_ptr);
- vec_vsx_st(dequantize_coeff_32(qcoeff2, dequant), off2, dqcoeff_ptr);
+ vec_u64_store(qcoeff0, off0, qcoeff_ptr);
+ vec_u64_store(qcoeff1, off1, qcoeff_ptr);
+ vec_u64_store(qcoeff2, off2, qcoeff_ptr);
+
+ vec_u64_store(dequantize_coeff_32(qcoeff0, dequant), off0, dqcoeff_ptr);
+ vec_u64_store(dequantize_coeff_32(qcoeff1, dequant), off1, dqcoeff_ptr);
+ vec_u64_store(dequantize_coeff_32(qcoeff2, dequant), off2, dqcoeff_ptr);
eob = vec_max(eob, nonzero_scanindex(qcoeff0, iscan_ptr, off0));
eob2 = vec_max(nonzero_scanindex(qcoeff1, iscan_ptr, off1),

View file

@ -0,0 +1,13 @@
Index: chromium-144.0.7559.59/base/compiler_specific.h
===================================================================
--- chromium-144.0.7559.59.orig/base/compiler_specific.h
+++ chromium-144.0.7559.59/base/compiler_specific.h
@@ -198,7 +198,7 @@
// MUSTTAIL return Func1(d + 1); // `Func1()` will be tail-called.
// }
// ```
-#if __has_cpp_attribute(clang::musttail)
+#if __has_cpp_attribute(clang::musttail) && !defined(__powerpc64__)
#define MUSTTAIL [[clang::musttail]]
#else
#define MUSTTAIL

View file

@ -0,0 +1,13 @@
Index: chromium-144.0.7559.59/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h
===================================================================
--- chromium-144.0.7559.59.orig/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h
+++ chromium-144.0.7559.59/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h
@@ -139,7 +139,7 @@
// PA_MUSTTAIL return Func1(d + 1); // `Func1()` will be tail-called.
// }
// ```
-#if PA_HAS_CPP_ATTRIBUTE(clang::musttail)
+#if PA_HAS_CPP_ATTRIBUTE(clang::musttail) && !defined(__powerpc64__)
#define PA_MUSTTAIL [[clang::musttail]]
#else
#define PA_MUSTTAIL

View file

@ -0,0 +1,13 @@
Index: chromium-130.0.6723.44/third_party/skia/src/core/SkRasterPipeline.h
===================================================================
--- chromium-130.0.6723.44.orig/third_party/skia/src/core/SkRasterPipeline.h
+++ chromium-130.0.6723.44/third_party/skia/src/core/SkRasterPipeline.h
@@ -27,7 +27,7 @@ struct SkImageInfo;
struct skcms_TransferFunction;
#if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32) && \
- !defined(SK_CPU_LOONGARCH) && !(defined(_WIN32) && defined(SK_BUILD_FOR_ANDROID_FRAMEWORK))
+ !defined(SK_CPU_LOONGARCH) && !(defined(_WIN32) && defined(SK_BUILD_FOR_ANDROID_FRAMEWORK)) && !defined(__powerpc64__)
// [[clang::musttail]] is disabled for the Android version of Skia running on Windows as it
// causes crashes (This is probably related to http://crbug.com/1505442).
#define SK_HAS_MUSTTAIL 1

View file

@ -0,0 +1,48 @@
Index: chromium-144.0.7559.59/third_party/libvpx/generate_gni.sh
===================================================================
--- chromium-144.0.7559.59.orig/third_party/libvpx/generate_gni.sh
+++ chromium-144.0.7559.59/third_party/libvpx/generate_gni.sh
@@ -429,7 +429,7 @@ gen_config_files linux/mipsel "--target=
gen_config_files linux/mips64el "--target=mips64-linux-gcc ${all_platforms}"
gen_config_files linux/loongarch \
"--target=loongarch64-linux-gcc ${all_platforms}"
-gen_config_files linux/ppc64 "--target=ppc64le-linux-gcc ${all_platforms}"
+gen_config_files linux/ppc64 "--target=generic-gnu $HIGHBD ${all_platforms}"
gen_config_files linux/generic "--target=generic-gnu $HIGHBD ${all_platforms}"
gen_config_files win/arm64-highbd \
"--target=arm64-win64-vs15 ${all_platforms} ${HIGHBD} ${disable_sve}"
Index: chromium-144.0.7559.59/third_party/libvpx/source/libvpx/build/make/rtcd.pl
===================================================================
--- chromium-144.0.7559.59.orig/third_party/libvpx/source/libvpx/build/make/rtcd.pl
+++ chromium-144.0.7559.59/third_party/libvpx/source/libvpx/build/make/rtcd.pl
@@ -527,8 +527,9 @@ if ($opts{arch} eq 'x86') {
}
arm;
} elsif ($opts{arch} =~ /^ppc/ ) {
- @ALL_ARCHS = filter(qw/vsx/);
- ppc;
+ #@ALL_ARCHS = filter(qw/vsx/);
+ #ppc;
+ unoptimized;
} elsif ($opts{arch} =~ /loongarch/ ) {
@ALL_ARCHS = filter(qw/lsx lasx/);
loongarch;
Index: chromium-144.0.7559.59/third_party/libvpx/BUILD.gn
===================================================================
--- chromium-144.0.7559.59.orig/third_party/libvpx/BUILD.gn
+++ chromium-144.0.7559.59/third_party/libvpx/BUILD.gn
@@ -98,6 +98,14 @@ config("libvpx_config") {
"-Wno-sign-compare",
]
}
+
+ if (current_cpu == "ppc64") {
+ cflags += [
+ "-mcpu=power8",
+ "-maltivec",
+ "-mvsx",
+ ]
+ }
}
# This config is applied to targets that depend on libvpx.

View file

@ -0,0 +1,23 @@
Index: chromium-144.0.7559.59/third_party/webrtc/rtc_base/system/arch.h
===================================================================
--- chromium-144.0.7559.59.orig/third_party/webrtc/rtc_base/system/arch.h
+++ chromium-144.0.7559.59/third_party/webrtc/rtc_base/system/arch.h
@@ -46,6 +46,18 @@
#endif
#if defined(__MIPSEL__)
#define WEBRTC_ARCH_LITTLE_ENDIAN
+#elif defined(__PPC__)
+#define WEBRTC_ARCH_PPC_FAMILY
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#define WEBRTC_ARCH_LITTLE_ENDIAN
+#else
+#define WEBRTC_ARCH_BIG_ENDIAN
+#endif
+#if defined(__LP64__)
+#define WEBRTC_ARCH_64_BITS
+#else
+#define WEBRTC_ARCH_32_BITS
+#endif
#else
#define WEBRTC_ARCH_BIG_ENDIAN
#endif

View file

@ -0,0 +1,13 @@
Index: chromium-144.0.7559.59/base/system/sys_info.cc
===================================================================
--- chromium-144.0.7559.59.orig/base/system/sys_info.cc
+++ chromium-144.0.7559.59/base/system/sys_info.cc
@@ -263,6 +263,8 @@ std::string SysInfo::ProcessCPUArchitect
return "ARM";
#elif defined(ARCH_CPU_ARM64)
return "ARM_64";
+#elif defined(ARCH_CPU_PPC64)
+ return "PPC_64";
#elif defined(ARCH_CPU_RISCV64)
return "RISCV_64";
#else

View file

@ -0,0 +1,37 @@
Index: chromium-144.0.7559.59/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc
===================================================================
--- chromium-144.0.7559.59.orig/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc
+++ chromium-144.0.7559.59/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc
@@ -383,6 +383,8 @@ bool ChromeRuntimeAPIDelegate::GetPlatfo
info->arch = extensions::api::runtime::PlatformArch::kMips64;
} else if (arch == "riscv64") {
info->arch = extensions::api::runtime::PlatformArch::kRiscv64;
+ } else if (arch == "ppc64") {
+ info->arch = extensions::api::runtime::PlatformArch::kPpc64;
} else {
NOTREACHED();
}
Index: chromium-144.0.7559.59/extensions/common/api/runtime.json
===================================================================
--- chromium-144.0.7559.59.orig/extensions/common/api/runtime.json
+++ chromium-144.0.7559.59/extensions/common/api/runtime.json
@@ -98,7 +98,8 @@
{"name": "x86-64", "description": "Specifies the processer architecture as x86-64."},
{"name": "mips", "description": "Specifies the processer architecture as mips."},
{"name": "mips64", "description": "Specifies the processer architecture as mips64."},
- {"name": "riscv64", "description": "Specifies the processer architecture as riscv64."}
+ {"name": "riscv64", "description": "Specifies the processer architecture as riscv64."},
+ {"name": "ppc64", "description": "Specifies the processer architecture as ppc64."}
],
"description": "The machine's processor architecture."
},
@@ -111,7 +112,8 @@
{"name": "x86-32", "description": "Specifies the native client architecture as x86-32."},
{"name": "x86-64", "description": "Specifies the native client architecture as x86-64."},
{"name": "mips", "description": "Specifies the native client architecture as mips."},
- {"name": "mips64", "description": "Specifies the native client architecture as mips64."}
+ {"name": "mips64", "description": "Specifies the native client architecture as mips64."},
+ {"name": "ppc64", "description": "Specifies the native client architecture as ppc64."}
]
},
{

View file

@ -0,0 +1,14 @@
Index: chromium-144.0.7559.59/base/process/launch.h
===================================================================
--- chromium-144.0.7559.59.orig/base/process/launch.h
+++ chromium-144.0.7559.59/base/process/launch.h
@@ -58,6 +58,9 @@ enum TerminationStatus : int;
#if defined(ARCH_CPU_ARM64) || defined(ARCH_CPU_LOONGARCH64)
#define PTHREAD_STACK_MIN_CONST \
(__builtin_constant_p(PTHREAD_STACK_MIN) ? PTHREAD_STACK_MIN : 131072)
+#elif defined(ARCH_CPU_PPC64)
+#define PTHREAD_STACK_MIN_CONST \
+ (__builtin_constant_p(PTHREAD_STACK_MIN) ? PTHREAD_STACK_MIN : 131072)
#else
#define PTHREAD_STACK_MIN_CONST \
(__builtin_constant_p(PTHREAD_STACK_MIN) ? PTHREAD_STACK_MIN : 16384)

View file

@ -1,14 +0,0 @@
[Unit]
Description="Chrome Remote Desktop host daemon"
[Service]
User=%i
Environment=HOME=%h
ExecStart=@@CRD_PATH@@/chrome-remote-desktop --start --foreground
ExecStop=@@CRD_PATH@@/chrome-remote-desktop --stop
ExecReload=@@CRD_PATH@@/chrome-remote-desktop --reload
Restart=always
TimeoutStopSec=10
[Install]
WantedBy=multi-user.target

View file

@ -1,12 +0,0 @@
diff -up chromium-101.0.4951.41/content/common/user_agent.cc.fedora-user-agent chromium-101.0.4951.41/content/common/user_agent.cc
--- chromium-101.0.4951.41/content/common/user_agent.cc.fedora-user-agent 2022-04-27 20:03:36.913767022 +0000
+++ chromium-101.0.4951.41/content/common/user_agent.cc 2022-04-27 20:04:30.591942420 +0000
@@ -34,7 +34,7 @@ std::string GetUserAgentPlatform() {
#elif BUILDFLAG(IS_MAC)
return "Macintosh; ";
#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
- return "X11; "; // strange, but that's what Firefox uses
+ return "X11; Fedora; "; // strange, but that's what Firefox uses
#elif BUILDFLAG(IS_ANDROID)
return "Linux; ";
#elif BUILDFLAG(IS_FUCHSIA)

View file

@ -1,231 +0,0 @@
From 144479ad7b4287bee4067f95e4218f614798a865 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Sun, 16 Jan 2022 19:15:26 +0000
Subject: [PATCH] sql: make VirtualCursor standard layout type
sql::recover::VirtualCursor needs to be a standard layout type, but
has members of type std::unique_ptr. However, std::unique_ptr is not
guaranteed to be standard layout. Compiling with clang combined with
gcc-11 libstdc++ fails because of this.
Bug: 1189788
Change-Id: Ia6dc388cc5ef1c0f2afc75f8ca45b9f12687ca9c
---
diff --git a/sql/recover_module/btree.cc b/sql/recover_module/btree.cc
index cc9420e5..f12d8fa 100644
--- a/sql/recover_module/btree.cc
+++ b/sql/recover_module/btree.cc
@@ -136,16 +136,22 @@
"Move the destructor to the .cc file if it's non-trival");
#endif // !DCHECK_IS_ON()
-LeafPageDecoder::LeafPageDecoder(DatabasePageReader* db_reader) noexcept
- : page_id_(db_reader->page_id()),
- db_reader_(db_reader),
- cell_count_(ComputeCellCount(db_reader)),
- next_read_index_(0),
- last_record_size_(0) {
+LeafPageDecoder::LeafPageDecoder() noexcept = default;
+
+void LeafPageDecoder::Initialize(DatabasePageReader* db_reader) {
+ page_id_ = db_reader->page_id();
+ db_reader_ = db_reader;
+ cell_count_ = ComputeCellCount(db_reader);
+ next_read_index_ = 0;
+ last_record_size_ = 0;
DCHECK(IsOnValidPage(db_reader));
DCHECK(DatabasePageReader::IsValidPageId(page_id_));
}
+void LeafPageDecoder::Reset() {
+ db_reader_ = nullptr;
+}
+
bool LeafPageDecoder::TryAdvance() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(CanAdvance());
diff --git a/sql/recover_module/btree.h b/sql/recover_module/btree.h
index eaa087a5..df0e0c9 100644
--- a/sql/recover_module/btree.h
+++ b/sql/recover_module/btree.h
@@ -101,9 +101,7 @@
public:
// Creates a decoder for a DatabasePageReader's last read page.
//
- // |db_reader| must have been used to read an inner page of a table B-tree.
- // |db_reader| must outlive this instance.
- explicit LeafPageDecoder(DatabasePageReader* db_reader) noexcept;
+ LeafPageDecoder() noexcept;
~LeafPageDecoder() noexcept = default;
LeafPageDecoder(const LeafPageDecoder&) = delete;
@@ -151,6 +149,17 @@
// read as long as CanAdvance() returns true.
bool TryAdvance();
+ // Initialize with DatabasePageReader
+ // |db_reader| must have been used to read an inner page of a table B-tree.
+ // |db_reader| must outlive this instance.
+ void Initialize(DatabasePageReader* db_reader);
+
+ // Reset internal DatabasePageReader
+ void Reset();
+
+ // True if DatabasePageReader is valid
+ bool IsValid() { return (db_reader_ != nullptr); }
+
// True if the given reader may point to an inner page in a table B-tree.
//
// The last ReadPage() call on |db_reader| must have succeeded.
@@ -164,14 +173,14 @@
static int ComputeCellCount(DatabasePageReader* db_reader);
// The number of the B-tree page this reader is reading.
- const int64_t page_id_;
+ int64_t page_id_;
// Used to read the tree page.
//
// Raw pointer usage is acceptable because this instance's owner is expected
// to ensure that the DatabasePageReader outlives this.
- DatabasePageReader* const db_reader_;
+ DatabasePageReader* db_reader_;
// Caches the ComputeCellCount() value for this reader's page.
- const int cell_count_ = ComputeCellCount(db_reader_);
+ int cell_count_;
// The reader's cursor state.
//
diff --git a/sql/recover_module/cursor.cc b/sql/recover_module/cursor.cc
index 4f827ed..240de499 100644
--- a/sql/recover_module/cursor.cc
+++ b/sql/recover_module/cursor.cc
@@ -28,7 +28,7 @@
int VirtualCursor::First() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
inner_decoders_.clear();
- leaf_decoder_ = nullptr;
+ leaf_decoder_.Reset();
AppendPageDecoder(table_->root_page_id());
return Next();
@@ -38,18 +38,18 @@
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
record_reader_.Reset();
- while (!inner_decoders_.empty() || leaf_decoder_.get()) {
- if (leaf_decoder_.get()) {
- if (!leaf_decoder_->CanAdvance()) {
+ while (!inner_decoders_.empty() || leaf_decoder_.IsValid()) {
+ if (leaf_decoder_.IsValid()) {
+ if (!leaf_decoder_.CanAdvance()) {
// The leaf has been exhausted. Remove it from the DFS stack.
- leaf_decoder_ = nullptr;
+ leaf_decoder_.Reset();
continue;
}
- if (!leaf_decoder_->TryAdvance())
+ if (!leaf_decoder_.TryAdvance())
continue;
- if (!payload_reader_.Initialize(leaf_decoder_->last_record_size(),
- leaf_decoder_->last_record_offset())) {
+ if (!payload_reader_.Initialize(leaf_decoder_.last_record_size(),
+ leaf_decoder_.last_record_offset())) {
continue;
}
if (!record_reader_.Initialize())
@@ -101,13 +101,13 @@
int64_t VirtualCursor::RowId() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(record_reader_.IsInitialized());
- DCHECK(leaf_decoder_.get());
- return leaf_decoder_->last_record_rowid();
+ DCHECK(leaf_decoder_.IsValid());
+ return leaf_decoder_.last_record_rowid();
}
void VirtualCursor::AppendPageDecoder(int page_id) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
- DCHECK(leaf_decoder_.get() == nullptr)
+ DCHECK(!leaf_decoder_.IsValid())
<< __func__
<< " must only be called when the current path has no leaf decoder";
@@ -115,7 +115,7 @@
return;
if (LeafPageDecoder::IsOnValidPage(&db_reader_)) {
- leaf_decoder_ = std::make_unique<LeafPageDecoder>(&db_reader_);
+ leaf_decoder_.Initialize(&db_reader_);
return;
}
diff --git a/sql/recover_module/cursor.h b/sql/recover_module/cursor.h
index 845b785..cc4e85f8 100644
--- a/sql/recover_module/cursor.h
+++ b/sql/recover_module/cursor.h
@@ -130,7 +130,7 @@
std::vector<std::unique_ptr<InnerPageDecoder>> inner_decoders_;
// Decodes the leaf page containing records.
- std::unique_ptr<LeafPageDecoder> leaf_decoder_;
+ LeafPageDecoder leaf_decoder_;
SEQUENCE_CHECKER(sequence_checker_);
};
diff --git a/sql/recover_module/pager.cc b/sql/recover_module/pager.cc
index 58e75de..69d98cef 100644
--- a/sql/recover_module/pager.cc
+++ b/sql/recover_module/pager.cc
@@ -23,8 +23,7 @@
"ints are not appropriate for representing page IDs");
DatabasePageReader::DatabasePageReader(VirtualTable* table)
- : page_data_(std::make_unique<uint8_t[]>(table->page_size())),
- table_(table) {
+ : page_data_(table->page_size()), table_(table) {
DCHECK(table != nullptr);
DCHECK(IsValidPageSize(table->page_size()));
}
@@ -58,7 +57,7 @@
"The |read_offset| computation above may overflow");
int sqlite_status =
- RawRead(sqlite_file, read_size, read_offset, page_data_.get());
+ RawRead(sqlite_file, read_size, read_offset, page_data_.data());
// |page_id_| needs to be set to kInvalidPageId if the read failed.
// Otherwise, future ReadPage() calls with the previous |page_id_| value
diff --git a/sql/recover_module/pager.h b/sql/recover_module/pager.h
index 07cac3cb..d08f093 100644
--- a/sql/recover_module/pager.h
+++ b/sql/recover_module/pager.h
@@ -6,8 +6,8 @@
#define SQL_RECOVER_MODULE_PAGER_H_
#include <cstdint>
-#include <memory>
#include <ostream>
+#include <vector>
#include "base/check_op.h"
#include "base/memory/raw_ptr.h"
@@ -72,7 +72,7 @@
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK_NE(page_id_, kInvalidPageId)
<< "Successful ReadPage() required before accessing pager state";
- return page_data_.get();
+ return page_data_.data();
}
// The number of bytes in the page read by the last ReadPage() call.
@@ -139,7 +139,7 @@
int page_id_ = kInvalidPageId;
// Stores the bytes of the last page successfully read by ReadPage().
// The content is undefined if the last call to ReadPage() did not succeed.
- const std::unique_ptr<uint8_t[]> page_data_;
+ std::vector<uint8_t> page_data_;
// Raw pointer usage is acceptable because this instance's owner is expected
// to ensure that the VirtualTable outlives this.
const raw_ptr<VirtualTable> table_;

File diff suppressed because it is too large Load diff

View file

@ -1,134 +0,0 @@
diff -up chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py.116 chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py
--- chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py.116 2022-07-05 13:31:29.434673638 +0000
+++ chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py 2022-07-05 21:52:01.884578748 +0000
@@ -29,7 +29,7 @@ import sys
import types
__author__ = "Benjamin Peterson <benjamin@python.org>"
-__version__ = "1.15.0"
+__version__ = "1.16.0"
# Useful for very coarse version differentiation.
@@ -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]
@@ -223,6 +233,12 @@ class _SixMetaPathImporter(object):
return None
get_source = get_code # same as get_code
+ def create_module(self, spec):
+ return self.load_module(spec.name)
+
+ def exec_module(self, module):
+ pass
+
_importer = _SixMetaPathImporter(__name__)
diff -up chromium-103.0.5060.53/third_party/six/src/six.py.116 chromium-103.0.5060.53/third_party/six/src/six.py
--- chromium-103.0.5060.53/third_party/six/src/six.py.116 2022-07-05 13:32:28.916687658 +0000
+++ chromium-103.0.5060.53/third_party/six/src/six.py 2022-07-05 21:59:42.561240407 +0000
@@ -29,7 +29,7 @@ import sys
import types
__author__ = "Benjamin Peterson <benjamin@python.org>"
-__version__ = "1.14.0"
+__version__ = "1.16.0"
# Useful for very coarse version differentiation.
@@ -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]
@@ -223,6 +233,12 @@ class _SixMetaPathImporter(object):
return None
get_source = get_code # same as get_code
+ def create_module(self, spec):
+ return self.load_module(spec.name)
+
+ def exec_module(self, module):
+ pass
+
_importer = _SixMetaPathImporter(__name__)
@@ -890,12 +906,11 @@ def ensure_binary(s, encoding='utf-8', e
- `str` -> encoded to `bytes`
- `bytes` -> `bytes`
"""
+ if isinstance(s, binary_type):
+ return s
if isinstance(s, text_type):
return s.encode(encoding, errors)
- elif isinstance(s, binary_type):
- return s
- else:
- raise TypeError("not expecting type '%s'" % type(s))
+ raise TypeError("not expecting type '%s'" % type(s))
def ensure_str(s, encoding='utf-8', errors='strict'):
@@ -909,12 +924,15 @@ def ensure_str(s, encoding='utf-8', erro
- `str` -> `str`
- `bytes` -> decoded to `str`
"""
- if not isinstance(s, (text_type, binary_type)):
- raise TypeError("not expecting type '%s'" % type(s))
+ # Optimization: Fast return for the common case.
+ if type(s) is str:
+ return s
if PY2 and isinstance(s, text_type):
- s = s.encode(encoding, errors)
+ return s.encode(encoding, errors)
elif PY3 and isinstance(s, binary_type):
- s = s.decode(encoding, errors)
+ return s.decode(encoding, errors)
+ elif not isinstance(s, (text_type, binary_type)):
+ raise TypeError("not expecting type '%s'" % type(s))
return s

View file

@ -1,39 +0,0 @@
diff -up chromium-105.0.5195.52/build/linux/unbundle/libusb.gn.gnsystem chromium-105.0.5195.52/build/linux/unbundle/libusb.gn
--- chromium-105.0.5195.52/build/linux/unbundle/libusb.gn.gnsystem 2022-09-01 12:23:27.557313611 +0000
+++ chromium-105.0.5195.52/build/linux/unbundle/libusb.gn 2022-09-01 12:23:27.557313611 +0000
@@ -0,0 +1,24 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/linux/pkg_config.gni")
+import("//build/shim_headers.gni")
+
+pkg_config("system_libusb") {
+ packages = [ "libusb-1.0" ]
+}
+
+shim_headers("libusb_shim") {
+ root_path = "src/libusb"
+ headers = [
+ "libusb.h",
+ ]
+}
+
+source_set("libusb") {
+ deps = [
+ ":libusb_shim",
+ ]
+ public_configs = [ ":system_libusb" ]
+}
diff -up chromium-105.0.5195.52/build/linux/unbundle/replace_gn_files.py.gnsystem chromium-105.0.5195.52/build/linux/unbundle/replace_gn_files.py
--- chromium-105.0.5195.52/build/linux/unbundle/replace_gn_files.py.gnsystem 2022-09-01 12:23:27.558313577 +0000
+++ chromium-105.0.5195.52/build/linux/unbundle/replace_gn_files.py 2022-09-01 12:36:01.870847125 +0000
@@ -52,6 +52,7 @@ REPLACEMENTS = {
'libjpeg': 'third_party/libjpeg.gni',
'libjxl' : 'third_party/libjxl/BUILD.gn',
'libpng': 'third_party/libpng/BUILD.gn',
+ 'libusb': 'third_party/libusb/BUILD.gn',
'libvpx': 'third_party/libvpx/BUILD.gn',
'libwebp': 'third_party/libwebp/BUILD.gn',
'libxml': 'third_party/libxml/BUILD.gn',

View file

@ -1,36 +0,0 @@
diff -up chromium-108.0.5359.124/third_party/wayland/src/src/wayland-shm.c.me chromium-108.0.5359.124/third_party/wayland/src/src/wayland-shm.c
--- chromium-108.0.5359.124/third_party/wayland/src/src/wayland-shm.c.me 2022-12-24 11:08:03.212333476 +0100
+++ chromium-108.0.5359.124/third_party/wayland/src/src/wayland-shm.c 2022-12-24 11:08:18.316606155 +0100
@@ -44,7 +44,7 @@
#include <signal.h>
#include <pthread.h>
#include <errno.h>
-#include <fcntl.h>
+#include <linux/fcntl.h>
#include "wayland-os.h"
#include "wayland-util.h"
diff -up chromium-102.0.5005.115/v8/src/base/platform/platform-posix.cc.el7-memfd-include chromium-102.0.5005.115/v8/src/base/platform/platform-posix.cc
--- chromium-102.0.5005.115/v8/src/base/platform/platform-posix.cc.el7-memfd-include 2022-06-15 10:52:49.553817031 -0400
+++ chromium-102.0.5005.115/v8/src/base/platform/platform-posix.cc 2022-06-15 10:56:15.775173013 -0400
@@ -56,6 +56,7 @@
#if V8_OS_LINUX
#include <sys/prctl.h> // for prctl
+#include <linux/memfd.h> // for MFD_CLOEXEC
#endif
#if defined(V8_OS_FUCHSIA)
diff -up iridium-browser-2022.12.108.1/third_party/wayland/src/cursor/os-compatibility.c.me iridium-browser-2022.12.108.1/third_party/wayland/src/cursor/os-compatibility.c
--- iridium-browser-2022.12.108.1/third_party/wayland/src/cursor/os-compatibility.c.me 2022-12-08 21:59:43.502200984 +0100
+++ iridium-browser-2022.12.108.1/third_party/wayland/src/cursor/os-compatibility.c 2022-12-08 22:13:53.375653343 +0100
@@ -29,7 +29,8 @@
#include <sys/types.h>
#include <unistd.h>
-#include <fcntl.h>
+#include <linux/fcntl.h> // for F_SEAL_SHRINK, F_ADD_SEALS, F_SEAL_SEAL
+#include <linux/memfd.h> // for MFD_CLOEXEC
#include <errno.h>
#include <signal.h>
#include <string.h>

View file

@ -1,11 +0,0 @@
diff -up chromium-108.0.5359.124/third_party/wayland/src/src/scanner.c.me chromium-108.0.5359.124/third_party/wayland/src/src/scanner.c
--- chromium-108.0.5359.124/third_party/wayland/src/src/scanner.c.me 2022-12-27 16:14:22.507496575 +0100
+++ chromium-108.0.5359.124/third_party/wayland/src/src/scanner.c 2022-12-27 16:35:17.617573610 +0100
@@ -26,6 +26,7 @@
*/
#include "wayland-version.h"
+#include "config.h" // HAVE_STRNDUP
#include <stdbool.h>
#include <stdio.h>

View file

@ -1,294 +0,0 @@
diff -up chromium-108.0.5359.124/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc.revert-new-channel-layout-api chromium-108.0.5359.124/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc
--- chromium-108.0.5359.124/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc.revert-new-channel-layout-api 2022-12-14 01:39:52.000000000 +0100
+++ chromium-108.0.5359.124/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc 2023-01-04 21:44:23.098276796 +0100
@@ -74,7 +74,7 @@ void CdmAudioDecoderConfigToAVCodecConte
codec_context->sample_fmt = AV_SAMPLE_FMT_NONE;
}
- codec_context->ch_layout.nb_channels = config.channel_count;
+ codec_context->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_fo
case cdm::kAudioFormatPlanarS16:
case cdm::kAudioFormatPlanarF32: {
const int decoded_size_per_channel =
- decoded_audio_size / av_frame.ch_layout.nb_channels;
- for (int i = 0; i < av_frame.ch_layout.nb_channels; ++i) {
+ decoded_audio_size / av_frame.channels;
+ for (int i = 0; i < av_frame.channels; ++i) {
memcpy(output_buffer, av_frame.extended_data[i],
decoded_size_per_channel);
output_buffer += decoded_size_per_channel;
@@ -185,14 +185,13 @@ bool FFmpegCdmAudioDecoder::Initialize(
// Success!
decoding_loop_ = std::make_unique<FFmpegDecodingLoop>(codec_context_.get());
samples_per_second_ = config.samples_per_second;
- bytes_per_frame_ =
- codec_context_->ch_layout.nb_channels * config.bits_per_channel / 8;
+ bytes_per_frame_ = codec_context_->channels * config.bits_per_channel / 8;
output_timestamp_helper_ =
std::make_unique<AudioTimestampHelper>(config.samples_per_second);
is_initialized_ = true;
// Store initial values to guard against midstream configuration changes.
- channels_ = codec_context_->ch_layout.nb_channels;
+ channels_ = codec_context_->channels;
av_sample_format_ = codec_context_->sample_fmt;
return true;
@@ -292,19 +291,17 @@ cdm::Status FFmpegCdmAudioDecoder::Decod
for (auto& frame : audio_frames) {
int decoded_audio_size = 0;
if (frame->sample_rate != samples_per_second_ ||
- frame->ch_layout.nb_channels != channels_ ||
- frame->format != av_sample_format_) {
+ frame->channels != channels_ || frame->format != av_sample_format_) {
DLOG(ERROR) << "Unsupported midstream configuration change!"
<< " Sample Rate: " << frame->sample_rate << " vs "
- << samples_per_second_
- << ", Channels: " << frame->ch_layout.nb_channels << " vs "
- << channels_ << ", Sample Format: " << frame->format << " vs "
- << av_sample_format_;
+ << samples_per_second_ << ", Channels: " << frame->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_->ch_layout.nb_channels, frame->nb_samples,
+ nullptr, codec_context_->channels, frame->nb_samples,
codec_context_->sample_fmt, 1);
if (!decoded_audio_size)
continue;
@@ -323,9 +320,9 @@ 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_->ch_layout.nb_channels, frame->nb_samples,
- codec_context_->sample_fmt, 1);
+ *total_size += av_samples_get_buffer_size(nullptr, codec_context_->channels,
+ frame->nb_samples,
+ codec_context_->sample_fmt, 1);
audio_frames->emplace_back(av_frame_clone(frame));
return true;
}
diff -up chromium-108.0.5359.124/media/ffmpeg/ffmpeg_common.cc.revert-new-channel-layout-api chromium-108.0.5359.124/media/ffmpeg/ffmpeg_common.cc
--- chromium-108.0.5359.124/media/ffmpeg/ffmpeg_common.cc.revert-new-channel-layout-api 2022-12-14 01:39:52.000000000 +0100
+++ chromium-108.0.5359.124/media/ffmpeg/ffmpeg_common.cc 2023-01-04 21:52:59.674165082 +0100
@@ -353,11 +353,9 @@ bool AVCodecContextToAudioDecoderConfig(
codec_context->sample_fmt, codec_context->codec_id);
ChannelLayout channel_layout =
- codec_context->ch_layout.nb_channels > 8
+ codec_context->channels > 8
? CHANNEL_LAYOUT_DISCRETE
- : ChannelLayoutToChromeChannelLayout(
- codec_context->ch_layout.u.mask,
- codec_context->ch_layout.nb_channels);
+ : ChannelLayoutToChromeChannelLayout(codec_context->channel_layout, codec_context->channels);
switch (codec) {
// For AC3/EAC3 we enable only demuxing, but not decoding, so FFmpeg does
@@ -409,7 +407,7 @@ bool AVCodecContextToAudioDecoderConfig(
extra_data, encryption_scheme, seek_preroll,
codec_context->delay);
if (channel_layout == CHANNEL_LAYOUT_DISCRETE)
- config->SetChannelsForDiscrete(codec_context->ch_layout.nb_channels);
+ config->SetChannelsForDiscrete(codec_context->channels);
#if BUILDFLAG(ENABLE_PLATFORM_AC3_EAC3_AUDIO)
// These are bitstream formats unknown to ffmpeg, so they don't have
@@ -478,7 +476,7 @@ void AudioDecoderConfigToAVCodecContext(
// TODO(scherkus): should we set |channel_layout|? I'm not sure if FFmpeg uses
// said information to decode.
- codec_context->ch_layout.nb_channels = config.channels();
+ codec_context->channels = config.channels();
codec_context->sample_rate = config.samples_per_second();
if (config.extra_data().empty()) {
diff -up chromium-108.0.5359.124/media/filters/audio_file_reader.cc.revert-new-channel-layout-api chromium-108.0.5359.124/media/filters/audio_file_reader.cc
--- chromium-108.0.5359.124/media/filters/audio_file_reader.cc.revert-new-channel-layout-api 2023-01-04 21:44:23.095276762 +0100
+++ chromium-108.0.5359.124/media/filters/audio_file_reader.cc 2023-01-04 21:44:23.098276796 +0100
@@ -113,15 +113,14 @@ 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_->ch_layout.u.mask,
- codec_context_->ch_layout.nb_channels) ==
+ if (ChannelLayoutToChromeChannelLayout(codec_context_->channel_layout,
+ codec_context_->channels) ==
CHANNEL_LAYOUT_UNSUPPORTED) {
return false;
}
// Store initial values to guard against midstream configuration changes.
- channels_ = codec_context_->ch_layout.nb_channels;
+ channels_ = codec_context_->channels;
audio_codec_ = CodecIDToAudioCodec(codec_context_->codec_id);
sample_rate_ = codec_context_->sample_rate;
av_sample_format_ = codec_context_->sample_fmt;
@@ -224,7 +223,7 @@ bool AudioFileReader::OnNewFrame(
if (frames_read < 0)
return false;
- const int channels = frame->ch_layout.nb_channels;
+ const int channels = frame->channels;
if (frame->sample_rate != sample_rate_ || channels != channels_ ||
frame->format != av_sample_format_) {
DLOG(ERROR) << "Unsupported midstream configuration change!"
diff -up chromium-108.0.5359.124/media/filters/audio_file_reader_unittest.cc.revert-new-channel-layout-api chromium-108.0.5359.124/media/filters/audio_file_reader_unittest.cc
--- chromium-108.0.5359.124/media/filters/audio_file_reader_unittest.cc.revert-new-channel-layout-api 2022-12-14 01:39:52.000000000 +0100
+++ chromium-108.0.5359.124/media/filters/audio_file_reader_unittest.cc 2023-01-04 21:44:23.098276796 +0100
@@ -121,11 +121,11 @@ class AudioFileReaderTest : public testi
EXPECT_FALSE(reader_->Open());
}
- void RunTestFailingDecode(const char* fn, int expect_read = 0) {
+ void RunTestFailingDecode(const char* fn) {
Initialize(fn);
EXPECT_TRUE(reader_->Open());
std::vector<std::unique_ptr<AudioBus>> decoded_audio_packets;
- EXPECT_EQ(reader_->Read(&decoded_audio_packets), expect_read);
+ EXPECT_EQ(reader_->Read(&decoded_audio_packets), 0);
}
void RunTestPartialDecode(const char* fn) {
@@ -219,7 +219,7 @@ TEST_F(AudioFileReaderTest, AAC_ADTS) {
}
TEST_F(AudioFileReaderTest, MidStreamConfigChangesFail) {
- RunTestFailingDecode("midstream_config_change.mp3", 42624);
+ RunTestFailingDecode("midstream_config_change.mp3");
}
#endif
diff -up chromium-108.0.5359.124/media/filters/audio_video_metadata_extractor.cc.revert-new-channel-layout-api chromium-108.0.5359.124/media/filters/audio_video_metadata_extractor.cc
--- chromium-108.0.5359.124/media/filters/audio_video_metadata_extractor.cc.revert-new-channel-layout-api 2022-12-14 01:39:52.000000000 +0100
+++ chromium-108.0.5359.124/media/filters/audio_video_metadata_extractor.cc 2023-01-04 21:44:23.098276796 +0100
@@ -113,15 +113,6 @@ bool AudioVideoMetadataExtractor::Extrac
if (!stream)
continue;
- void* display_matrix =
- av_stream_get_side_data(stream, AV_PKT_DATA_DISPLAYMATRIX, nullptr);
- if (display_matrix) {
- rotation_ = VideoTransformation::FromFFmpegDisplayMatrix(
- static_cast<int32_t*>(display_matrix))
- .rotation;
- info.tags["rotate"] = base::NumberToString(rotation_);
- }
-
// Extract dictionary from streams also. Needed for containers that attach
// metadata to contained streams instead the container itself, like OGG.
ExtractDictionary(stream->metadata, &info.tags);
@@ -264,6 +255,8 @@ void AudioVideoMetadataExtractor::Extrac
if (raw_tags->find(tag->key) == raw_tags->end())
(*raw_tags)[tag->key] = tag->value;
+ if (ExtractInt(tag, "rotate", &rotation_))
+ continue;
if (ExtractString(tag, "album", &album_))
continue;
if (ExtractString(tag, "artist", &artist_))
diff -up chromium-108.0.5359.124/media/filters/ffmpeg_aac_bitstream_converter.cc.revert-new-channel-layout-api chromium-108.0.5359.124/media/filters/ffmpeg_aac_bitstream_converter.cc
--- chromium-108.0.5359.124/media/filters/ffmpeg_aac_bitstream_converter.cc.revert-new-channel-layout-api 2022-12-14 01:39:52.000000000 +0100
+++ chromium-108.0.5359.124/media/filters/ffmpeg_aac_bitstream_converter.cc 2023-01-04 21:44:23.099276807 +0100
@@ -195,15 +195,14 @@ bool FFmpegAACBitstreamConverter::Conver
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_->ch_layout.nb_channels ||
+ channel_configuration_ != stream_codec_parameters_->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_->ch_layout.nb_channels,
+ stream_codec_parameters_->channels,
0, // originality
0, // home
0, // copyrighted_stream
@@ -215,7 +214,7 @@ bool FFmpegAACBitstreamConverter::Conver
codec_ = stream_codec_parameters_->codec_id;
audio_profile_ = stream_codec_parameters_->profile;
sample_rate_index_ = sample_rate_index;
- channel_configuration_ = stream_codec_parameters_->ch_layout.nb_channels;
+ channel_configuration_ = stream_codec_parameters_->channels;
frame_length_ = header_plus_packet_size;
}
diff -up chromium-108.0.5359.124/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc.revert-new-channel-layout-api chromium-108.0.5359.124/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc
--- chromium-108.0.5359.124/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc.revert-new-channel-layout-api 2022-12-14 01:39:52.000000000 +0100
+++ chromium-108.0.5359.124/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc 2023-01-04 21:44:23.099276807 +0100
@@ -34,7 +34,7 @@ class FFmpegAACBitstreamConverterTest :
memset(&test_parameters_, 0, sizeof(AVCodecParameters));
test_parameters_.codec_id = AV_CODEC_ID_AAC;
test_parameters_.profile = FF_PROFILE_AAC_MAIN;
- test_parameters_.ch_layout.nb_channels = 2;
+ test_parameters_.channels = 2;
test_parameters_.extradata = extradata_header_;
test_parameters_.extradata_size = sizeof(extradata_header_);
}
diff -up chromium-108.0.5359.124/media/filters/ffmpeg_audio_decoder.cc.revert-new-channel-layout-api chromium-108.0.5359.124/media/filters/ffmpeg_audio_decoder.cc
--- chromium-108.0.5359.124/media/filters/ffmpeg_audio_decoder.cc.revert-new-channel-layout-api 2022-12-14 01:39:52.000000000 +0100
+++ chromium-108.0.5359.124/media/filters/ffmpeg_audio_decoder.cc 2023-01-04 21:44:23.099276807 +0100
@@ -28,7 +28,7 @@ namespace media {
// Return the number of channels from the data in |frame|.
static inline int DetermineChannels(AVFrame* frame) {
- return frame->ch_layout.nb_channels;
+ return frame->channels;
}
// Called by FFmpeg's allocation routine to allocate a buffer. Uses
@@ -233,7 +233,7 @@ bool FFmpegAudioDecoder::OnNewFrame(cons
// Translate unsupported into discrete layouts for discrete configurations;
// ffmpeg does not have a labeled discrete configuration internally.
ChannelLayout channel_layout = ChannelLayoutToChromeChannelLayout(
- codec_context_->ch_layout.u.mask, codec_context_->ch_layout.nb_channels);
+ codec_context_->channel_layout, codec_context_->channels);
if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED &&
config_.channel_layout() == CHANNEL_LAYOUT_DISCRETE) {
channel_layout = CHANNEL_LAYOUT_DISCRETE;
@@ -350,11 +350,11 @@ bool FFmpegAudioDecoder::ConfigureDecode
// Success!
av_sample_format_ = codec_context_->sample_fmt;
- if (codec_context_->ch_layout.nb_channels != config.channels()) {
+ if (codec_context_->channels != config.channels()) {
MEDIA_LOG(ERROR, media_log_)
<< "Audio configuration specified " << config.channels()
<< " channels, but FFmpeg thinks the file contains "
- << codec_context_->ch_layout.nb_channels << " channels";
+ << codec_context_->channels << " channels";
ReleaseFFmpegResources();
state_ = DecoderState::kUninitialized;
return false;
@@ -405,7 +405,7 @@ int FFmpegAudioDecoder::GetAudioBuffer(s
if (frame->nb_samples <= 0)
return AVERROR(EINVAL);
- if (s->ch_layout.nb_channels != channels) {
+ if (s->channels != channels) {
DLOG(ERROR) << "AVCodecContext and AVFrame disagree on channel count.";
return AVERROR(EINVAL);
}
@@ -438,8 +438,7 @@ int FFmpegAudioDecoder::GetAudioBuffer(s
ChannelLayout channel_layout =
config_.channel_layout() == CHANNEL_LAYOUT_DISCRETE
? CHANNEL_LAYOUT_DISCRETE
- : ChannelLayoutToChromeChannelLayout(s->ch_layout.u.mask,
- s->ch_layout.nb_channels);
+ : ChannelLayoutToChromeChannelLayout(s->channel_layout, s->channels);
if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED) {
DLOG(ERROR) << "Unsupported channel layout.";

View file

@ -1,36 +0,0 @@
diff -up chromium-108.0.5359.124/net/filter/brotli_source_stream.cc.me chromium-108.0.5359.124/net/filter/brotli_source_stream.cc
--- chromium-108.0.5359.124/net/filter/brotli_source_stream.cc.me 2022-12-30 16:00:58.320318310 +0100
+++ chromium-108.0.5359.124/net/filter/brotli_source_stream.cc 2022-12-30 16:01:24.928581631 +0100
@@ -10,7 +10,7 @@
#include "base/memory/raw_ptr.h"
#include "base/metrics/histogram_macros.h"
#include "net/base/io_buffer.h"
-#include "third_party/brotli/include/brotli/decode.h"
+#include <brotli/decode.h>
namespace net {
diff -up chromium-108.0.5359.124/net/ssl/cert_compression.cc.me chromium-108.0.5359.124/net/ssl/cert_compression.cc
--- chromium-108.0.5359.124/net/ssl/cert_compression.cc.me 2022-12-30 15:57:59.859543993 +0100
+++ chromium-108.0.5359.124/net/ssl/cert_compression.cc 2022-12-30 16:00:48.560221723 +0100
@@ -9,7 +9,7 @@
#include "third_party/boringssl/src/include/openssl/ssl.h"
#if !defined(NET_DISABLE_BROTLI)
-#include "third_party/brotli/include/brotli/decode.h"
+#include <brotli/decode.h>
#endif
namespace net {
diff -up chromium-108.0.5359.124/ui/base/resource/resource_bundle.cc.me chromium-108.0.5359.124/ui/base/resource/resource_bundle.cc
--- chromium-108.0.5359.124/ui/base/resource/resource_bundle.cc.me 2022-12-30 21:12:27.058346797 +0100
+++ chromium-108.0.5359.124/ui/base/resource/resource_bundle.cc 2022-12-30 21:13:58.363183795 +0100
@@ -31,7 +31,7 @@
#include "build/build_config.h"
#include "net/filter/gzip_header.h"
#include "skia/ext/image_operations.h"
-#include "third_party/brotli/include/brotli/decode.h"
+#include <brotli/decode.h>
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/zlib/google/compression_utils.h"

View file

@ -1,64 +0,0 @@
diff -up chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc.system-minizip chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc
--- chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc.system-minizip 2023-01-04 20:20:37.000000000 +0100
+++ chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc 2023-01-08 15:48:08.654793086 +0100
@@ -27,8 +27,8 @@ limitations under the License.
#include "tensorflow_lite_support/cc/port/status_macros.h"
#include "tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.h"
#include "tensorflow_lite_support/metadata/metadata_schema_generated.h"
-#include "third_party/zlib/contrib/minizip/ioapi.h"
-#include "third_party/zlib/contrib/minizip/unzip.h"
+#include <minizip/ioapi.h>
+#include <minizip/unzip.h>
namespace tflite {
namespace metadata {
diff -up chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc.system-minizip chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc
--- chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc.system-minizip 2023-01-04 20:20:37.000000000 +0100
+++ chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc 2023-01-08 15:48:08.655793097 +0100
@@ -26,8 +26,8 @@ limitations under the License.
#include "tensorflow_lite_support/cc/port/statusor.h"
#include "tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h"
#include "tensorflow_lite_support/metadata/metadata_schema_generated.h"
-#include "third_party/zlib/contrib/minizip/ioapi.h"
-#include "third_party/zlib/contrib/minizip/unzip.h"
+#include <minizip/ioapi.h>
+#include <minizip/zip.h>
namespace tflite {
namespace metadata {
diff -up chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc.system-minizip chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc
--- chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc.system-minizip 2023-01-08 15:48:08.655793097 +0100
+++ chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc 2023-01-08 15:53:17.498329640 +0100
@@ -19,7 +19,7 @@ limitations under the License.
#include <cstdio>
#include "absl/strings/string_view.h" // from @com_google_absl
-#include "third_party/zlib/contrib/minizip/ioapi.h"
+#include <minizip/ioapi.h>
namespace tflite {
namespace metadata {
diff -up chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc.system-minizip chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc
--- chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc.system-minizip 2023-01-04 20:20:37.000000000 +0100
+++ chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc 2023-01-08 15:48:08.655793097 +0100
@@ -19,7 +19,7 @@ limitations under the License.
#include <cstdio>
#include "absl/strings/string_view.h" // from @com_google_absl
-#include "third_party/zlib/contrib/minizip/ioapi.h"
+#include <minizip/ioapi.h>
namespace tflite {
namespace metadata {
diff -up chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h.system-minizip chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h
--- chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h.system-minizip 2023-01-04 20:20:37.000000000 +0100
+++ chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h 2023-01-08 15:48:08.655793097 +0100
@@ -19,7 +19,7 @@ limitations under the License.
#include <cstdlib>
#include "absl/strings/string_view.h" // from @com_google_absl
-#include "third_party/zlib/contrib/minizip/ioapi.h"
+#include <minizip/ioapi.h>
namespace tflite {
namespace metadata {

View file

@ -1,86 +0,0 @@
From 96ee2a8e20bb7a7c4fb19e27dc31ff5c6a472849 Mon Sep 17 00:00:00 2001
From: Ryan Gonzalez <rymg19@gmail.com>
Date: Mon, 06 Mar 2023 20:22:25 -0600
Subject: [PATCH] AddressTrackerLinux: Increase the message buffer size
On non-4k-page systems, the message sizes may be too large to fit into
the buffer, resulting in MSG_TRUNC. Instead of using the fixed 4kb size,
follow the kernel documentation guidelines as to how large the buffer
should be.
Originally found by Asahi Lina:
https://vt.social/@lina/109976892758680822
Bug: None
Change-Id: I4790435190167a706fa7490ab57706db1f4a6120
---
diff --git a/net/base/address_tracker_linux.cc b/net/base/address_tracker_linux.cc
index 4976cae..f1a1fff 100644
--- a/net/base/address_tracker_linux.cc
+++ b/net/base/address_tracker_linux.cc
@@ -14,6 +14,7 @@
#include "base/files/scoped_file.h"
#include "base/functional/callback_helpers.h"
#include "base/logging.h"
+#include "base/memory/page_size.h"
#include "base/posix/eintr_wrapper.h"
#include "base/task/current_thread.h"
#include "base/threading/scoped_blocking_call.h"
@@ -323,8 +324,30 @@
*address_changed = false;
*link_changed = false;
*tunnel_changed = false;
- char buffer[4096];
bool first_loop = true;
+
+ // Varying sources have different opinions regarding the buffer size needed
+ // for netlink messages to avoid truncation:
+ // - The official documentation on netlink says messages are generally 8kb
+ // or the system page size, whichever is *larger*:
+ // https://www.kernel.org/doc/html/v6.2/userspace-api/netlink/intro.html#buffer-sizing
+ // - The kernel headers would imply that messages are generally the system
+ // page size or 8kb, whichever is *smaller*:
+ // https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/include/linux/netlink.h?h=v6.2.2#n226
+ // (libmnl follows this.)
+ // - The netlink(7) man page's example always uses a fixed size 8kb buffer:
+ // https://man7.org/linux/man-pages/man7/netlink.7.html
+ // Here, we follow the guidelines in the documentation, for two primary
+ // reasons:
+ // - Erring on the side of a larger size is the safer way to go to avoid
+ // MSG_TRUNC.
+ // - Since this is heap-allocated anyway, there's no risk to the stack by
+ // using the larger size.
+
+ constexpr size_t kMinNetlinkBufferSize = 8 * 1024;
+ std::vector<char> buffer(
+ std::max(base::GetPageSize(), kMinNetlinkBufferSize));
+
{
absl::optional<base::ScopedBlockingCall> blocking_call;
if (tracking_) {
@@ -334,9 +357,10 @@
}
for (;;) {
- int rv = HANDLE_EINTR(recv(netlink_fd_.get(), buffer, sizeof(buffer),
- // Block the first time through loop.
- first_loop ? 0 : MSG_DONTWAIT));
+ int rv =
+ HANDLE_EINTR(recv(netlink_fd_.get(), buffer.data(), buffer.size(),
+ // Block the first time through loop.
+ first_loop ? 0 : MSG_DONTWAIT));
first_loop = false;
if (rv == 0) {
LOG(ERROR) << "Unexpected shutdown of NETLINK socket.";
@@ -348,7 +372,8 @@
PLOG(ERROR) << "Failed to recv from netlink socket";
return;
}
- HandleMessage(buffer, rv, address_changed, link_changed, tunnel_changed);
+ HandleMessage(buffer.data(), rv, address_changed, link_changed,
+ tunnel_changed);
}
}
if (*link_changed || *address_changed)

View file

@ -1,141 +0,0 @@
diff -up chromium-110.0.5481.77/sandbox/policy/linux/bpf_hardware_video_decoding_policy_linux.cc.me chromium-110.0.5481.77/sandbox/policy/linux/bpf_hardware_video_decoding_policy_linux.cc
--- chromium-110.0.5481.77/sandbox/policy/linux/bpf_hardware_video_decoding_policy_linux.cc.me 2023-02-08 20:34:02.700010846 +0100
+++ chromium-110.0.5481.77/sandbox/policy/linux/bpf_hardware_video_decoding_policy_linux.cc 2023-02-08 20:35:30.455580670 +0100
@@ -4,7 +4,9 @@
#include "sandbox/policy/linux/bpf_hardware_video_decoding_policy_linux.h"
-#include <linux/kcmp.h>
+#ifndef KCMP_FILE
+#define KCMP_FILE 0
+#endif
#include "media/gpu/buildflags.h"
#include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h"
diff -up chromium-99.0.4844.51/mojo/core/channel_linux.cc.epel7-header-workarounds chromium-99.0.4844.51/mojo/core/channel_linux.cc
--- chromium-99.0.4844.51/mojo/core/channel_linux.cc.epel7-header-workarounds 2022-02-28 19:05:54.000000000 -0500
+++ chromium-99.0.4844.51/mojo/core/channel_linux.cc 2022-03-05 14:50:49.876812909 -0500
@@ -44,6 +44,25 @@
#include "base/android/build_info.h"
#endif
+#ifndef F_LINUX_SPECIFIC_BASE
+#define F_LINUX_SPECIFIC_BASE 1024
+#endif
+#ifndef F_SEAL_SEAL
+#define F_SEAL_SEAL 0x0001
+#endif
+#ifndef F_SEAL_SHRINK
+#define F_SEAL_SHRINK 0x0002
+#endif
+#ifndef F_SEAL_GROW
+#define F_SEAL_GROW 0x0004
+#endif
+#ifndef F_ADD_SEALS
+#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
+#endif
+#ifndef F_GET_SEALS
+#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10)
+#endif
+
#ifndef EFD_ZERO_ON_WAKE
#define EFD_ZERO_ON_WAKE O_NOFOLLOW
#endif
diff -up chromium-99.0.4844.51/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc.epel7-header-workarounds chromium-99.0.4844.51/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
--- chromium-99.0.4844.51/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc.epel7-header-workarounds 2022-03-05 14:50:49.877812915 -0500
+++ chromium-99.0.4844.51/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc 2022-03-05 15:15:02.536867009 -0500
@@ -53,6 +53,25 @@
#endif // BUILDFLAG(IS_ANDROID)
+#ifndef F_LINUX_SPECIFIC_BASE
+#define F_LINUX_SPECIFIC_BASE 1024
+#endif
+#ifndef F_SEAL_SEAL
+#define F_SEAL_SEAL 0x0001
+#endif
+#ifndef F_SEAL_SHRINK
+#define F_SEAL_SHRINK 0x0002
+#endif
+#ifndef F_SEAL_GROW
+#define F_SEAL_GROW 0x0004
+#endif
+#ifndef F_ADD_SEALS
+#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
+#endif
+#ifndef F_GET_SEALS
+#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10)
+#endif
+
#if defined(__arm__) && !defined(MAP_STACK)
#define MAP_STACK 0x20000 // Daisy build environment has old headers.
#endif
diff -up chromium-99.0.4844.51/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc.epel7-header-workarounds chromium-99.0.4844.51/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc
--- chromium-99.0.4844.51/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc.epel7-header-workarounds 2022-02-28 19:05:55.000000000 -0500
+++ chromium-99.0.4844.51/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc 2022-03-05 14:50:49.877812915 -0500
@@ -6,7 +6,24 @@
#include <errno.h>
#include <fcntl.h>
-#include <linux/kcmp.h>
+#ifndef KCMP_FILE
+#define KCMP_FILE 0
+#endif
+#ifndef F_LINUX_SPECIFIC_BASE
+#define F_LINUX_SPECIFIC_BASE 1024
+#endif
+#ifndef F_SEAL_SEAL
+#define F_SEAL_SEAL 0x0001
+#endif
+#ifndef F_SEAL_SHRINK
+#define F_SEAL_SHRINK 0x0002
+#endif
+#ifndef F_SEAL_GROW
+#define F_SEAL_GROW 0x0004
+#endif
+#ifndef F_ADD_SEALS
+#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
+#endif
#include <sys/socket.h>
// Some arch's (arm64 for instance) unistd.h don't pull in symbols used here
diff -up chromium-99.0.4844.51/sandbox/policy/linux/bpf_gpu_policy_linux.cc.epel7-header-workarounds chromium-99.0.4844.51/sandbox/policy/linux/bpf_gpu_policy_linux.cc
--- chromium-99.0.4844.51/sandbox/policy/linux/bpf_gpu_policy_linux.cc.epel7-header-workarounds 2022-02-28 19:05:55.000000000 -0500
+++ chromium-99.0.4844.51/sandbox/policy/linux/bpf_gpu_policy_linux.cc 2022-03-05 14:50:49.877812915 -0500
@@ -22,6 +22,22 @@
#include "sandbox/policy/linux/sandbox_linux.h"
#include "sandbox/policy/linux/sandbox_seccomp_bpf_linux.h"
+#ifndef F_LINUX_SPECIFIC_BASE
+#define F_LINUX_SPECIFIC_BASE 1024
+#endif
+#ifndef F_SEAL_SEAL
+#define F_SEAL_SEAL 0x0001
+#endif
+#ifndef F_SEAL_SHRINK
+#define F_SEAL_SHRINK 0x0002
+#endif
+#ifndef F_SEAL_GROW
+#define F_SEAL_GROW 0x0004
+#endif
+#ifndef F_ADD_SEALS
+#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
+#endif
+
using sandbox::bpf_dsl::AllOf;
using sandbox::bpf_dsl::Allow;
using sandbox::bpf_dsl::Arg;
diff -up chromium-99.0.4844.51/ui/events/ozone/evdev/event_converter_evdev_impl.cc.epel7-header-workarounds chromium-99.0.4844.51/ui/events/ozone/evdev/event_converter_evdev_impl.cc
--- chromium-99.0.4844.51/ui/events/ozone/evdev/event_converter_evdev_impl.cc.epel7-header-workarounds 2022-02-28 19:06:49.000000000 -0500
+++ chromium-99.0.4844.51/ui/events/ozone/evdev/event_converter_evdev_impl.cc 2022-03-05 14:50:49.877812915 -0500
@@ -23,6 +23,10 @@
#include "ui/events/ozone/evdev/numberpad_metrics.h"
#endif
+#ifndef SW_PEN_INSERTED
+#define SW_PEN_INSERTED 0x0f /* set = pen inserted */
+#endif
+
namespace ui {
namespace {

View file

@ -1,11 +0,0 @@
diff -up chromium-110.0.5481.177/base/memory/ref_counted.h.me chromium-110.0.5481.177/base/memory/ref_counted.h
--- chromium-110.0.5481.177/base/memory/ref_counted.h.me 2023-02-23 13:34:33.174817255 -0500
+++ chromium-110.0.5481.177/base/memory/ref_counted.h 2023-02-23 13:42:28.646052469 -0500
@@ -6,6 +6,7 @@
#define BASE_MEMORY_REF_COUNTED_H_
#include <stddef.h>
+#include <limits>
#include <utility>

View file

@ -1,120 +0,0 @@
From 2aef9000a1c8d76d3072365ffcb471ebffa20d3d Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@cryptomilk.org>
Date: Tue, 15 Mar 2022 14:26:16 +0100
Subject: [PATCH] Track first_dts instead of using non-upstream functions
The function av_stream_get_first_dts() is not an upstream ffmpeg function and
is not available if you build with system ffmpeg. We can easily track the
first_dts on our own.
See also
https://ffmpeg.org/pipermail/ffmpeg-devel/2021-September/285401.html
Bug: 1306560
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Change-Id: I90ba3cf2f2e16f56a0b405f26c67f911349fb71d
---
media/filters/ffmpeg_demuxer.cc | 18 ++++++++++++------
media/filters/ffmpeg_demuxer.h | 3 +++
3 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index 111899b661..799fc6e941 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -97,7 +97,7 @@ static base::TimeDelta FramesToTimeDelta(int frames, double sample_rate) {
sample_rate);
}
-static base::TimeDelta ExtractStartTime(AVStream* stream) {
+static base::TimeDelta ExtractStartTime(AVStream* stream, int64_t first_dts) {
// The default start time is zero.
base::TimeDelta start_time;
@@ -107,12 +107,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 (av_stream_get_first_dts(stream) != kNoFFmpegTimestamp &&
+ if (first_dts != AV_NOPTS_VALUE &&
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, av_stream_get_first_dts(stream));
+ ConvertFromTimeBase(stream->time_base, first_dts);
if (first_pts < start_time)
start_time = first_pts;
}
@@ -283,6 +283,7 @@ FFmpegDemuxerStream::FFmpegDemuxerStream(
fixup_negative_timestamps_(false),
fixup_chained_ogg_(false),
num_discarded_packet_warnings_(0),
+ first_dts_(AV_NOPTS_VALUE),
last_packet_pos_(AV_NOPTS_VALUE),
last_packet_dts_(AV_NOPTS_VALUE) {
DCHECK(demuxer_);
@@ -349,6 +350,10 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
int64_t packet_dts =
packet->dts == AV_NOPTS_VALUE ? packet->pts : packet->dts;
+ if (first_dts_ == AV_NOPTS_VALUE) {
+ first_dts_ = packet_dts;
+ }
+
// Chained ogg files have non-monotonically increasing position and time stamp
// values, which prevents us from using them to determine if a packet should
// be dropped. Since chained ogg is only allowed on single track audio only
@@ -1442,7 +1447,8 @@ void FFmpegDemuxer::OnFindStreamInfoDone(int result) {
max_duration = std::max(max_duration, streams_[i]->duration());
- base::TimeDelta start_time = ExtractStartTime(stream);
+ base::TimeDelta start_time =
+ ExtractStartTime(stream, streams_[i]->first_dts());
// Note: This value is used for seeking, so we must take the true value and
// not the one possibly clamped to zero below.
@@ -1599,7 +1605,7 @@ FFmpegDemuxerStream* FFmpegDemuxer::FindStreamWithLowestStartTimestamp(
for (const auto& stream : streams_) {
if (!stream || stream->IsEnabled() != enabled)
continue;
- if (av_stream_get_first_dts(stream->av_stream()) == kInvalidPTSMarker)
+ if (stream->first_dts() == AV_NOPTS_VALUE)
continue;
if (!lowest_start_time_stream ||
stream->start_time() < lowest_start_time_stream->start_time()) {
@@ -1620,7 +1626,7 @@ FFmpegDemuxerStream* FFmpegDemuxer::FindPreferredStreamForSeeking(
if (stream->type() != DemuxerStream::VIDEO)
continue;
- if (av_stream_get_first_dts(stream->av_stream()) == kInvalidPTSMarker)
+ if (stream->first_dts() == AV_NOPTS_VALUE)
continue;
if (!stream->IsEnabled())
diff --git a/media/filters/ffmpeg_demuxer.h b/media/filters/ffmpeg_demuxer.h
index c147309d6f..48a8f6ad8c 100644
--- a/media/filters/ffmpeg_demuxer.h
+++ b/media/filters/ffmpeg_demuxer.h
@@ -151,6 +151,8 @@ class MEDIA_EXPORT FFmpegDemuxerStream : public DemuxerStream {
base::TimeDelta start_time() const { return start_time_; }
void set_start_time(base::TimeDelta time) { start_time_ = time; }
+ int64_t first_dts() const { return first_dts_; }
+
private:
friend class FFmpegDemuxerTest;
@@ -208,6 +210,7 @@ class MEDIA_EXPORT FFmpegDemuxerStream : public DemuxerStream {
bool fixup_chained_ogg_;
int num_discarded_packet_warnings_;
+ int64_t first_dts_;
int64_t last_packet_pos_;
int64_t last_packet_dts_;
};
--
2.35.1

View file

@ -1,312 +0,0 @@
diff -up chromium-112.0.5615.49/base/clang_work_around.h.me chromium-112.0.5615.49/base/clang_work_around.h
--- chromium-112.0.5615.49/base/clang_work_around.h.me 2023-04-10 12:10:42.229455956 +0200
+++ chromium-112.0.5615.49/base/clang_work_around.h 2023-04-10 12:16:41.191744766 +0200
@@ -0,0 +1,10 @@
+//
+// workaound for clang-14 in c++20 mode
+//
+
+#ifndef WORKAROUND_CLANG14_IN_C_PLUS_PLUS_20_H
+#define WORKAROUND_CLANG14_IN_C_PLUS_PLUS_20_H
+
+static std::u16string clang_string_workaround(const char16_t* a, const char16_t* b) { return {a, b}; }
+
+#endif // WORKAROUND_CLANG14_IN_C_PLUS_PLUS_20_H
diff -up chromium-112.0.5615.49/base/i18n/number_formatting.cc.me chromium-112.0.5615.49/base/i18n/number_formatting.cc
--- chromium-112.0.5615.49/base/i18n/number_formatting.cc.me 2023-04-10 11:26:58.126271434 +0200
+++ chromium-112.0.5615.49/base/i18n/number_formatting.cc 2023-04-10 12:13:17.573209444 +0200
@@ -18,6 +18,7 @@
#include "base/strings/utf_string_conversions.h"
#include "third_party/icu/source/common/unicode/ustring.h"
#include "third_party/icu/source/i18n/unicode/numfmt.h"
+#include "base/clang_work_around.h"
namespace base {
diff -up chromium-112.0.5615.49/base/i18n/time_formatting.cc.me chromium-112.0.5615.49/base/i18n/time_formatting.cc
--- chromium-112.0.5615.49/base/i18n/time_formatting.cc.me 2023-04-10 10:21:25.360079525 +0200
+++ chromium-112.0.5615.49/base/i18n/time_formatting.cc 2023-04-10 12:13:36.373485371 +0200
@@ -22,6 +22,7 @@
#include "third_party/icu/source/i18n/unicode/fmtable.h"
#include "third_party/icu/source/i18n/unicode/measfmt.h"
#include "third_party/icu/source/i18n/unicode/smpdtfmt.h"
+#include "base/clang_work_around.h"
namespace base {
namespace {
diff -up chromium-112.0.5615.49/base/strings/string_piece.cc.me chromium-112.0.5615.49/base/strings/string_piece.cc
--- chromium-112.0.5615.49/base/strings/string_piece.cc.me 2023-04-10 10:20:40.230277808 +0200
+++ chromium-112.0.5615.49/base/strings/string_piece.cc 2023-04-10 12:14:00.262863956 +0200
@@ -12,6 +12,7 @@
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
+#include "base/clang_work_around.h"
namespace base {
namespace {
diff -up chromium-112.0.5615.49/components/url_formatter/spoof_checks/skeleton_generator.cc.me chromium-112.0.5615.49/components/url_formatter/spoof_checks/skeleton_generator.cc
--- chromium-112.0.5615.49/components/url_formatter/spoof_checks/skeleton_generator.cc.me 2023-04-10 11:27:36.207948830 +0200
+++ chromium-112.0.5615.49/components/url_formatter/spoof_checks/skeleton_generator.cc 2023-04-10 12:17:36.338730147 +0200
@@ -15,6 +15,7 @@
#include "third_party/icu/source/i18n/unicode/regex.h"
#include "third_party/icu/source/i18n/unicode/translit.h"
#include "third_party/icu/source/i18n/unicode/uspoof.h"
+#include "base/clang_work_around.h"
namespace {
diff -up chromium-112.0.5615.49/content/child/browser_font_resource_trusted.cc.me chromium-112.0.5615.49/content/child/browser_font_resource_trusted.cc
--- chromium-112.0.5615.49/content/child/browser_font_resource_trusted.cc.me 2023-04-10 11:28:09.962549271 +0200
+++ chromium-112.0.5615.49/content/child/browser_font_resource_trusted.cc 2023-04-10 12:12:14.242145968 +0200
@@ -26,6 +26,7 @@
#include "third_party/skia/include/core/SkRect.h"
#include "ui/gfx/geometry/rect_f.h"
#include "ui/gfx/ubidi_deleter.h"
+#include "base/clang_work_around.h"
using ppapi::StringVar;
using ppapi::thunk::EnterResourceNoLock;
diff -up chromium-112.0.5615.49/content/common/zygote/zygote_communication_linux.cc.me chromium-112.0.5615.49/content/common/zygote/zygote_communication_linux.cc
--- chromium-112.0.5615.49/content/common/zygote/zygote_communication_linux.cc.me 2023-04-10 10:19:32.223069670 +0200
+++ chromium-112.0.5615.49/content/common/zygote/zygote_communication_linux.cc 2023-04-10 12:12:31.315438868 +0200
@@ -22,6 +22,7 @@
#include "content/public/common/result_codes.h"
#include "sandbox/policy/switches.h"
#include "third_party/icu/source/i18n/unicode/timezone.h"
+#include "base/clang_work_around.h"
namespace content {
diff -up chromium-112.0.5615.49/mojo/public/cpp/base/string16_mojom_traits.cc.me chromium-112.0.5615.49/mojo/public/cpp/base/string16_mojom_traits.cc
--- chromium-112.0.5615.49/mojo/public/cpp/base/string16_mojom_traits.cc.me 2023-04-10 11:26:20.277598168 +0200
+++ chromium-112.0.5615.49/mojo/public/cpp/base/string16_mojom_traits.cc 2023-04-10 12:12:56.706874472 +0200
@@ -6,6 +6,8 @@
#include "mojo/public/cpp/base/big_buffer_mojom_traits.h"
+#include "base/clang_work_around.h"
+
namespace mojo {
// static
diff -up chromium-112.0.5615.49/third_party/blink/common/page_state/page_state_serialization.cc.me chromium-112.0.5615.49/third_party/blink/common/page_state/page_state_serialization.cc
--- chromium-112.0.5615.49/third_party/blink/common/page_state/page_state_serialization.cc.me 2023-04-10 11:22:27.525457904 +0200
+++ chromium-112.0.5615.49/third_party/blink/common/page_state/page_state_serialization.cc 2023-04-10 12:14:21.584248718 +0200
@@ -24,6 +24,7 @@
#include "ui/display/screen.h"
#include "ui/gfx/geometry/mojom/geometry_mojom_traits.h"
#include "url/mojom/url_gurl_mojom_traits.h"
+#include "base/clang_work_around.h"
namespace blink {
diff -up chromium-112.0.5615.49/base/strings/escape.cc.me chromium-112.0.5615.49/base/strings/escape.cc
--- chromium-112.0.5615.49/base/strings/escape.cc.me 2023-04-10 16:10:08.298906995 +0200
+++ chromium-112.0.5615.49/base/strings/escape.cc 2023-04-10 16:10:17.751072552 +0200
@@ -14,6 +14,7 @@
#include "base/strings/utf_string_conversion_utils.h"
#include "base/strings/utf_string_conversions.h"
#include "base/third_party/icu/icu_utf.h"
+#include "base/clang_work_around.h"
namespace base {
diff -up chromium-112.0.5615.49/base/strings/string_split.cc.me chromium-112.0.5615.49/base/strings/string_split.cc
--- chromium-112.0.5615.49/base/strings/string_split.cc.me 2023-04-10 16:17:49.702245206 +0200
+++ chromium-112.0.5615.49/base/strings/string_split.cc 2023-04-10 16:17:56.420471079 +0200
@@ -10,6 +10,7 @@
#include "base/strings/string_split_internal.h"
#include "base/strings/string_util.h"
#include "base/third_party/icu/icu_utf.h"
+#include "base/clang_work_around.h"
namespace base {
diff -up chromium-112.0.5615.49/chrome/browser/sharing/click_to_call/click_to_call_utils.cc.me chromium-112.0.5615.49/chrome/browser/sharing/click_to_call/click_to_call_utils.cc
--- chromium-112.0.5615.49/chrome/browser/sharing/click_to_call/click_to_call_utils.cc.me 2023-04-10 16:09:21.861093623 +0200
+++ chromium-112.0.5615.49/chrome/browser/sharing/click_to_call/click_to_call_utils.cc 2023-04-10 16:09:31.428261186 +0200
@@ -21,6 +21,7 @@
#include "third_party/re2/src/re2/re2.h"
#include "url/url_constants.h"
#include "url/url_util.h"
+#include "base/clang_work_around.h"
namespace {
diff -up chromium-112.0.5615.49/ui/ozone/platform/wayland/host/wayland_exchange_data_provider.cc.me chromium-112.0.5615.49/ui/ozone/platform/wayland/host/wayland_exchange_data_provider.cc
--- chromium-112.0.5615.49/ui/ozone/platform/wayland/host/wayland_exchange_data_provider.cc.me 2023-04-10 16:05:55.155357863 +0200
+++ chromium-112.0.5615.49/ui/ozone/platform/wayland/host/wayland_exchange_data_provider.cc 2023-04-10 16:06:09.726629617 +0200
@@ -27,6 +27,7 @@
#include "url/gurl.h"
#include "url/url_canon.h"
#include "url/url_util.h"
+#include "base/clang_work_around.h"
#if BUILDFLAG(IS_CHROMEOS_LACROS)
#include "ui/base/data_transfer_policy/data_transfer_endpoint_serializer.h"
diff -up chromium-112.0.5615.49/base/i18n/break_iterator.cc.me chromium-112.0.5615.49/base/i18n/break_iterator.cc
--- chromium-112.0.5615.49/base/i18n/break_iterator.cc.me 2023-04-11 09:19:54.124933361 +0200
+++ chromium-112.0.5615.49/base/i18n/break_iterator.cc 2023-04-11 09:20:14.790301819 +0200
@@ -15,6 +15,7 @@
#include "third_party/icu/source/common/unicode/ubrk.h"
#include "third_party/icu/source/common/unicode/uchar.h"
#include "third_party/icu/source/common/unicode/ustring.h"
+#include "base/clang_work_around.h"
namespace base {
namespace i18n {
diff -up chromium-112.0.5615.49/base/i18n/message_formatter.cc.me chromium-112.0.5615.49/base/i18n/message_formatter.cc
--- chromium-112.0.5615.49/base/i18n/message_formatter.cc.me 2023-04-11 09:20:34.687657454 +0200
+++ chromium-112.0.5615.49/base/i18n/message_formatter.cc 2023-04-11 09:21:28.617663963 +0200
@@ -13,6 +13,7 @@
#include "third_party/icu/source/common/unicode/utypes.h"
#include "third_party/icu/source/i18n/unicode/fmtable.h"
#include "third_party/icu/source/i18n/unicode/msgfmt.h"
+#include "base/clang_work_around.h"
using icu::UnicodeString;
diff -up chromium-112.0.5615.49/base/time/time.cc.me chromium-112.0.5615.49/base/time/time.cc
--- chromium-112.0.5615.49/base/time/time.cc.me 2023-04-11 09:23:22.732757775 +0200
+++ chromium-112.0.5615.49/base/time/time.cc 2023-04-11 09:23:33.655958193 +0200
@@ -17,6 +17,7 @@
#include "base/time/time_override.h"
#include "build/build_config.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
+#include "base/clang_work_around.h"
namespace base {
diff -up chromium-112.0.5615.49/chrome/browser/ui/webui/downloads/downloads_list_tracker.cc.me chromium-112.0.5615.49/chrome/browser/ui/webui/downloads/downloads_list_tracker.cc
--- chromium-112.0.5615.49/chrome/browser/ui/webui/downloads/downloads_list_tracker.cc.me 2023-04-11 09:36:50.646409434 +0200
+++ chromium-112.0.5615.49/chrome/browser/ui/webui/downloads/downloads_list_tracker.cc 2023-04-11 09:37:07.977731153 +0200
@@ -36,6 +36,7 @@
#include "net/base/filename_util.h"
#include "third_party/icu/source/i18n/unicode/datefmt.h"
#include "ui/base/l10n/time_format.h"
+#include "base/clang_work_around.h"
using content::BrowserContext;
using content::DownloadManager;
diff -up chromium-112.0.5615.49/chrome/browser/ui/webui/new_tab_page/untrusted_source.cc.me chromium-112.0.5615.49/chrome/browser/ui/webui/new_tab_page/untrusted_source.cc
--- chromium-112.0.5615.49/chrome/browser/ui/webui/new_tab_page/untrusted_source.cc.me 2023-04-11 09:37:21.262977759 +0200
+++ chromium-112.0.5615.49/chrome/browser/ui/webui/new_tab_page/untrusted_source.cc 2023-04-11 09:37:27.594095277 +0200
@@ -33,6 +33,7 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/template_expressions.h"
#include "url/url_util.h"
+#include "base/clang_work_around.h"
namespace {
diff -up chromium-112.0.5615.49/components/autofill/content/renderer/html_based_username_detector.cc.me chromium-112.0.5615.49/components/autofill/content/renderer/html_based_username_detector.cc
--- chromium-112.0.5615.49/components/autofill/content/renderer/html_based_username_detector.cc.me 2023-04-11 09:38:01.297776504 +0200
+++ chromium-112.0.5615.49/components/autofill/content/renderer/html_based_username_detector.cc 2023-04-11 09:38:07.899908357 +0200
@@ -18,6 +18,7 @@
#include "components/autofill/content/renderer/html_based_username_detector_vocabulary.h"
#include "components/autofill/core/common/form_data.h"
#include "third_party/blink/public/web/web_form_element.h"
+#include "base/clang_work_around.h"
using blink::WebFormControlElement;
using blink::WebFormElement;
diff -up chromium-112.0.5615.49/components/autofill/core/browser/autofill_data_util.cc.me chromium-112.0.5615.49/components/autofill/core/browser/autofill_data_util.cc
--- chromium-112.0.5615.49/components/autofill/core/browser/autofill_data_util.cc.me 2023-04-11 09:33:59.637234801 +0200
+++ chromium-112.0.5615.49/components/autofill/core/browser/autofill_data_util.cc 2023-04-11 09:34:08.353412198 +0200
@@ -25,6 +25,7 @@
#include "components/strings/grit/components_strings.h"
#include "third_party/icu/source/common/unicode/uscript.h"
#include "third_party/re2/src/re2/re2.h"
+#include "base/clang_work_around.h"
namespace autofill {
namespace data_util {
diff -up chromium-112.0.5615.49/components/autofill/core/browser/data_model/borrowed_transliterator.cc.me chromium-112.0.5615.49/components/autofill/core/browser/data_model/borrowed_transliterator.cc
--- chromium-112.0.5615.49/components/autofill/core/browser/data_model/borrowed_transliterator.cc.me 2023-04-11 09:33:33.683706577 +0200
+++ chromium-112.0.5615.49/components/autofill/core/browser/data_model/borrowed_transliterator.cc 2023-04-11 09:33:40.115837491 +0200
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "base/no_destructor.h"
+#include "base/clang_work_around.h"
namespace autofill {
diff -up chromium-112.0.5615.49/components/autofill/core/browser/form_processing/label_processing_util.cc.me chromium-112.0.5615.49/components/autofill/core/browser/form_processing/label_processing_util.cc
--- chromium-112.0.5615.49/components/autofill/core/browser/form_processing/label_processing_util.cc.me 2023-04-11 09:35:15.569558729 +0200
+++ chromium-112.0.5615.49/components/autofill/core/browser/form_processing/label_processing_util.cc 2023-04-11 09:35:22.156704236 +0200
@@ -7,6 +7,7 @@
#include "base/ranges/algorithm.h"
#include "base/strings/string_split.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/clang_work_around.h"
namespace autofill {
diff -up chromium-112.0.5615.49/components/autofill/core/common/autofill_regexes.cc.me chromium-112.0.5615.49/components/autofill/core/common/autofill_regexes.cc
--- chromium-112.0.5615.49/components/autofill/core/common/autofill_regexes.cc.me 2023-04-11 09:24:03.442503498 +0200
+++ chromium-112.0.5615.49/components/autofill/core/common/autofill_regexes.cc 2023-04-11 09:24:10.633634865 +0200
@@ -12,6 +12,7 @@
#include "base/check.h"
#include "base/i18n/unicodestring.h"
#include "base/memory/ptr_util.h"
+#include "base/clang_work_around.h"
namespace {
diff -up chromium-112.0.5615.49/components/bookmarks/browser/titled_url_index.cc.me chromium-112.0.5615.49/components/bookmarks/browser/titled_url_index.cc
--- chromium-112.0.5615.49/components/bookmarks/browser/titled_url_index.cc.me 2023-04-11 09:35:47.419224388 +0200
+++ chromium-112.0.5615.49/components/bookmarks/browser/titled_url_index.cc 2023-04-11 09:35:53.917341490 +0200
@@ -29,6 +29,7 @@
#include "components/query_parser/snippet.h"
#include "third_party/icu/source/common/unicode/normalizer2.h"
#include "third_party/icu/source/common/unicode/utypes.h"
+#include "base/clang_work_around.h"
namespace bookmarks {
diff -up chromium-112.0.5615.49/components/omnibox/browser/tailored_word_break_iterator.cc.me chromium-112.0.5615.49/components/omnibox/browser/tailored_word_break_iterator.cc
--- chromium-112.0.5615.49/components/omnibox/browser/tailored_word_break_iterator.cc.me 2023-04-11 09:36:26.323925501 +0200
+++ chromium-112.0.5615.49/components/omnibox/browser/tailored_word_break_iterator.cc 2023-04-11 09:36:32.480043078 +0200
@@ -5,6 +5,7 @@
#include "components/omnibox/browser/tailored_word_break_iterator.h"
#include "base/strings/string_piece.h"
+#include "base/clang_work_around.h"
namespace {
constexpr char16_t kUnderscore = '_';
diff -up chromium-112.0.5615.49/components/sync/base/time.cc.me chromium-112.0.5615.49/components/sync/base/time.cc
--- chromium-112.0.5615.49/components/sync/base/time.cc.me 2023-04-11 09:32:48.709645320 +0200
+++ chromium-112.0.5615.49/components/sync/base/time.cc 2023-04-11 09:32:56.044820918 +0200
@@ -11,6 +11,7 @@
#include "base/strings/utf_string_conversions.h"
#include "third_party/icu/source/common/unicode/utypes.h"
#include "third_party/icu/source/i18n/unicode/smpdtfmt.h"
+#include "base/clang_work_around.h"
namespace syncer {
diff -up chromium-112.0.5615.49/ui/base/x/selection_utils.cc.me chromium-112.0.5615.49/ui/base/x/selection_utils.cc
--- chromium-112.0.5615.49/ui/base/x/selection_utils.cc.me 2023-04-11 09:22:42.734023876 +0200
+++ chromium-112.0.5615.49/ui/base/x/selection_utils.cc 2023-04-11 09:22:51.565185914 +0200
@@ -18,6 +18,7 @@
#include "base/strings/utf_string_conversions.h"
#include "ui/base/clipboard/clipboard_constants.h"
#include "ui/gfx/x/x11_atom_cache.h"
+#include "base/clang_work_around.h"
namespace ui {
diff -up chromium-112.0.5615.49/chrome/test/chromedriver/server/http_handler.cc.me chromium-112.0.5615.49/chrome/test/chromedriver/server/http_handler.cc
--- chromium-112.0.5615.49/chrome/test/chromedriver/server/http_handler.cc.me 2023-04-11 09:43:01.795293420 +0200
+++ chromium-112.0.5615.49/chrome/test/chromedriver/server/http_handler.cc 2023-04-11 09:43:13.763545992 +0200
@@ -46,6 +46,7 @@
#include "services/network/public/mojom/url_loader_factory.mojom.h"
#include "services/network/transitional_url_loader_factory_owner.h"
#include "url/url_util.h"
+#include "base/clang_work_around.h"
#if BUILDFLAG(IS_MAC)
#include "base/mac/scoped_nsautorelease_pool.h"

View file

@ -1,454 +0,0 @@
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
index 3470da1..ff39851b 100644
--- a/chrome/browser/ui/BUILD.gn
+++ b/chrome/browser/ui/BUILD.gn
@@ -5628,8 +5628,12 @@
sources += [
"views/chrome_browser_main_extra_parts_views_linux.cc",
"views/chrome_browser_main_extra_parts_views_linux.h",
+ "views/dark_mode_manager_linux.cc",
+ "views/dark_mode_manager_linux.h",
]
deps += [
+ "//components/dbus/thread_linux",
+ "//dbus",
"//ui/base/cursor",
"//ui/ozone",
]
diff --git a/chrome/browser/ui/DEPS b/chrome/browser/ui/DEPS
index fc3fab23..b56a704e 100644
--- a/chrome/browser/ui/DEPS
+++ b/chrome/browser/ui/DEPS
@@ -42,6 +42,9 @@
"browser_navigator_browsertest\.cc": [
"+ash/shell.h",
],
+ "dark_mode_manager_linux\.cc": [
+ "+dbus",
+ ],
"fullscreen_controller_interactive_browsertest\.cc": [
"+ash/shell.h",
],
diff --git a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
index dbc9cc4e..d7fad5b 100644
--- a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
+++ b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
@@ -7,6 +7,7 @@
#include "base/metrics/histogram_macros.h"
#include "chrome/browser/themes/theme_service_aura_linux.h"
#include "chrome/browser/ui/browser_list.h"
+#include "chrome/browser/ui/views/dark_mode_manager_linux.h"
#include "chrome/browser/ui/views/theme_profile_key.h"
#include "ui/base/buildflags.h"
#include "ui/base/cursor/cursor_factory.h"
@@ -56,6 +57,8 @@
UMA_HISTOGRAM_ENUMERATION("Linux.SystemTheme.Default",
linux_ui_theme->GetNativeTheme()->system_theme());
}
+
+ dark_mode_manager_ = std::make_unique<ui::DarkModeManagerLinux>();
}
void ChromeBrowserMainExtraPartsViewsLinux::PreCreateThreads() {
diff --git a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h
index 392d14c..6deb520 100644
--- a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h
+++ b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h
@@ -13,6 +13,7 @@
namespace ui {
class LinuxUiGetter;
+class DarkModeManagerLinux;
}
// Extra parts, which are used by both Ozone/X11/Wayland and inherited by the
@@ -41,6 +42,8 @@
absl::optional<display::ScopedDisplayObserver> display_observer_;
std::unique_ptr<ui::LinuxUiGetter> linux_ui_getter_;
+
+ std::unique_ptr<ui::DarkModeManagerLinux> dark_mode_manager_;
};
#endif // CHROME_BROWSER_UI_VIEWS_CHROME_BROWSER_MAIN_EXTRA_PARTS_VIEWS_LINUX_H_
diff --git a/chrome/browser/ui/views/dark_mode_manager_linux.cc b/chrome/browser/ui/views/dark_mode_manager_linux.cc
new file mode 100644
index 0000000..bb638f7
--- /dev/null
+++ b/chrome/browser/ui/views/dark_mode_manager_linux.cc
@@ -0,0 +1,160 @@
+// Copyright 2023 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/views/dark_mode_manager_linux.h"
+
+#include "base/functional/bind.h"
+#include "base/logging.h"
+#include "components/dbus/thread_linux/dbus_thread_linux.h"
+#include "dbus/bus.h"
+#include "dbus/message.h"
+#include "dbus/object_proxy.h"
+#include "ui/linux/linux_ui.h"
+#include "ui/linux/linux_ui_factory.h"
+#include "ui/native_theme/native_theme.h"
+
+namespace {
+
+constexpr char kFreedesktopSettingsService[] = "org.freedesktop.portal.Desktop";
+constexpr char kFreedesktopSettingsObjectPath[] =
+ "/org/freedesktop/portal/desktop";
+constexpr char kFreedesktopSettingsInterface[] =
+ "org.freedesktop.portal.Settings";
+constexpr char kSettingChangedSignal[] = "SettingChanged";
+constexpr char kReadMethod[] = "Read";
+constexpr char kSettingsNamespace[] = "org.freedesktop.appearance";
+constexpr char kColorSchemeKey[] = "color-scheme";
+constexpr int kFreedesktopColorSchemeDark = 1;
+
+scoped_refptr<dbus::Bus> CreateBus() {
+ dbus::Bus::Options options;
+ options.bus_type = dbus::Bus::SESSION;
+ options.connection_type = dbus::Bus::PRIVATE;
+ options.dbus_task_runner = dbus_thread_linux::GetTaskRunner();
+ return base::MakeRefCounted<dbus::Bus>(options);
+}
+
+} // namespace
+
+namespace ui {
+
+DarkModeManagerLinux::DarkModeManagerLinux()
+ : bus_(CreateBus()),
+ settings_proxy_(bus_->GetObjectProxy(
+ kFreedesktopSettingsService,
+ dbus::ObjectPath(kFreedesktopSettingsObjectPath))) {
+ // Subscribe to changes in the color scheme preference.
+ settings_proxy_->ConnectToSignal(
+ kFreedesktopSettingsInterface, kSettingChangedSignal,
+ base::BindRepeating(&DarkModeManagerLinux::OnPortalSettingChanged,
+ weak_ptr_factory_.GetWeakPtr()),
+ base::BindOnce(&DarkModeManagerLinux::OnSignalConnected,
+ weak_ptr_factory_.GetWeakPtr()));
+
+ // Read initial color scheme preference.
+ dbus::MethodCall method_call(kFreedesktopSettingsInterface, kReadMethod);
+ dbus::MessageWriter writer(&method_call);
+ writer.AppendString(kSettingsNamespace);
+ writer.AppendString(kColorSchemeKey);
+ settings_proxy_->CallMethod(
+ &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
+ base::BindOnce(&DarkModeManagerLinux::OnReadColorSchemeResponse,
+ weak_ptr_factory_.GetWeakPtr()));
+
+ // Read the toolkit preference while asynchronously fetching the
+ // portal preference.
+ if (auto* linux_ui_theme = ui::GetDefaultLinuxUiTheme()) {
+ auto* native_theme = linux_ui_theme->GetNativeTheme();
+ native_theme_observer_.Observe(native_theme);
+ SetColorScheme(native_theme->ShouldUseDarkColors());
+ }
+}
+
+DarkModeManagerLinux::~DarkModeManagerLinux() {
+ settings_proxy_ = nullptr;
+ dbus::Bus* const bus_ptr = bus_.get();
+ bus_ptr->GetDBusTaskRunner()->PostTask(
+ FROM_HERE, base::BindOnce(&dbus::Bus::ShutdownAndBlock, std::move(bus_)));
+}
+
+void DarkModeManagerLinux::OnNativeThemeUpdated(
+ ui::NativeTheme* observed_theme) {
+ SetColorScheme(observed_theme->ShouldUseDarkColors());
+}
+
+void DarkModeManagerLinux::OnSignalConnected(const std::string& interface_name,
+ const std::string& signal_name,
+ bool connected) {
+ // Nothing to do. Continue using the toolkit setting if !connected.
+}
+
+void DarkModeManagerLinux::OnPortalSettingChanged(dbus::Signal* signal) {
+ dbus::MessageReader reader(signal);
+
+ std::string namespace_changed;
+ std::string key_changed;
+ dbus::MessageReader variant_reader(nullptr);
+ if (!reader.PopString(&namespace_changed) ||
+ !reader.PopString(&key_changed) || !reader.PopVariant(&variant_reader)) {
+ LOG(ERROR) << "Received malformed Setting Changed signal from "
+ "org.freedesktop.portal.Settings";
+ return;
+ }
+
+ if (namespace_changed != kSettingsNamespace ||
+ key_changed != kColorSchemeKey) {
+ return;
+ }
+
+ uint32_t new_color_scheme;
+ if (!variant_reader.PopUint32(&new_color_scheme)) {
+ LOG(ERROR)
+ << "Failed to read color-scheme value from SettingChanged signal";
+ return;
+ }
+
+ SetColorScheme(new_color_scheme == kFreedesktopColorSchemeDark);
+}
+
+void DarkModeManagerLinux::OnReadColorSchemeResponse(dbus::Response* response) {
+ if (!response) {
+ // Continue using the toolkit setting.
+ return;
+ }
+
+ dbus::MessageReader reader(response);
+ dbus::MessageReader variant_reader(nullptr);
+ if (!reader.PopVariant(&variant_reader)) {
+ LOG(ERROR) << "Failed to read variant from Read method response";
+ return;
+ }
+
+ uint32_t new_color_scheme;
+ if (!variant_reader.PopVariantOfUint32(&new_color_scheme)) {
+ LOG(ERROR) << "Failed to read color-scheme value from Read "
+ "method response";
+ return;
+ }
+
+ // Ignore future updates from the toolkit theme.
+ native_theme_observer_.Reset();
+
+ SetColorScheme(new_color_scheme == kFreedesktopColorSchemeDark);
+}
+
+void DarkModeManagerLinux::SetColorScheme(bool prefer_dark_theme) {
+ if (prefer_dark_theme_ == prefer_dark_theme) {
+ return;
+ }
+ prefer_dark_theme_ = prefer_dark_theme;
+
+ NativeTheme* web_theme = NativeTheme::GetInstanceForWeb();
+ web_theme->set_use_dark_colors(prefer_dark_theme_);
+ web_theme->set_preferred_color_scheme(
+ prefer_dark_theme_ ? NativeTheme::PreferredColorScheme::kDark
+ : NativeTheme::PreferredColorScheme::kLight);
+ web_theme->NotifyOnNativeThemeUpdated();
+}
+
+} // namespace ui
diff --git a/chrome/browser/ui/views/dark_mode_manager_linux.h b/chrome/browser/ui/views/dark_mode_manager_linux.h
new file mode 100644
index 0000000..34b07ff
--- /dev/null
+++ b/chrome/browser/ui/views/dark_mode_manager_linux.h
@@ -0,0 +1,62 @@
+// Copyright 2023 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_VIEWS_DARK_MODE_MANAGER_LINUX_H_
+#define CHROME_BROWSER_UI_VIEWS_DARK_MODE_MANAGER_LINUX_H_
+
+#include <string>
+
+#include "base/memory/scoped_refptr.h"
+#include "base/memory/weak_ptr.h"
+#include "base/scoped_observation.h"
+#include "ui/native_theme/native_theme_observer.h"
+
+namespace dbus {
+class Bus;
+class ObjectProxy;
+class Response;
+class Signal;
+} // namespace dbus
+
+namespace ui {
+
+// Observes the system color scheme preference using
+// org.freedesktop.portal.Settings. Falls back to the toolkit preference if
+// org.freedesktop.portal.Settings is unavailable. Propagates the dark mode
+// preference to the web theme.
+class DarkModeManagerLinux : public NativeThemeObserver {
+ public:
+ DarkModeManagerLinux();
+ DarkModeManagerLinux(const DarkModeManagerLinux&) = delete;
+ DarkModeManagerLinux& operator=(const DarkModeManagerLinux&) = delete;
+ ~DarkModeManagerLinux() override;
+
+ private:
+ // ui::NativeThemeObserver:
+ void OnNativeThemeUpdated(ui::NativeTheme* observed_theme) override;
+
+ // D-Bus async handlers
+ void OnSignalConnected(const std::string& interface_name,
+ const std::string& signal_name,
+ bool connected);
+ void OnPortalSettingChanged(dbus::Signal* signal);
+ void OnReadColorSchemeResponse(dbus::Response* response);
+
+ // Sets `prefer_dark_theme_` and propagates to the web theme.
+ void SetColorScheme(bool prefer_dark_theme);
+
+ scoped_refptr<dbus::Bus> bus_;
+ raw_ptr<dbus::ObjectProxy> settings_proxy_;
+
+ bool prefer_dark_theme_ = false;
+
+ base::ScopedObservation<NativeTheme, NativeThemeObserver>
+ native_theme_observer_{this};
+
+ base::WeakPtrFactory<DarkModeManagerLinux> weak_ptr_factory_{this};
+};
+
+} // namespace ui
+
+#endif // CHROME_BROWSER_UI_VIEWS_DARK_MODE_MANAGER_LINUX_H_
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
index 91b1e98..7adddbd 100644
--- a/chrome/common/chrome_features.cc
+++ b/chrome/common/chrome_features.cc
@@ -1448,17 +1448,17 @@
BASE_FEATURE(kWebShare, "WebShare", base::FEATURE_DISABLED_BY_DEFAULT);
#endif
-// Whether to enable "dark mode" enhancements in Mac Mojave or Windows 10 for
-// UIs implemented with web technologies.
+// Whether to enable "dark mode" enhancements in Mac Mojave, Windows 10, or
+// Linux for UIs implemented with web technologies.
BASE_FEATURE(kWebUIDarkMode,
"WebUIDarkMode",
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || \
- BUILDFLAG(IS_CHROMEOS)
+ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
base::FEATURE_ENABLED_BY_DEFAULT
#else
base::FEATURE_DISABLED_BY_DEFAULT
#endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) ||
- // BUILDFLAG(IS_CHROMEOS)
+ // BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX)
);
#if BUILDFLAG(IS_CHROMEOS_ASH)
diff --git a/ui/qt/qt_ui.cc b/ui/qt/qt_ui.cc
index b188ad0..6c0d2cd 100644
--- a/ui/qt/qt_ui.cc
+++ b/ui/qt/qt_ui.cc
@@ -98,6 +98,13 @@
QtNativeTheme& operator=(const QtNativeTheme&) = delete;
~QtNativeTheme() override = default;
+ void ThemeChanged(bool prefer_dark_theme) {
+ set_use_dark_colors(IsForcedDarkMode() || prefer_dark_theme);
+ set_preferred_color_scheme(CalculatePreferredColorScheme());
+
+ NotifyOnNativeThemeUpdated();
+ }
+
// ui::NativeTheme:
DISABLE_CFI_VCALL
void PaintFrameTopArea(cc::PaintCanvas* canvas,
@@ -387,7 +394,7 @@
}
void QtUi::ThemeChanged() {
- native_theme_->NotifyOnNativeThemeUpdated();
+ native_theme_->ThemeChanged(PreferDarkTheme());
}
DISABLE_CFI_VCALL
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
index decfb02b6817e..108e2af907e25 100644
--- a/chrome/browser/ui/BUILD.gn
+++ b/chrome/browser/ui/BUILD.gn
@@ -5632,20 +5632,24 @@ static_library("ui") {
]
}
- if (use_aura) {
+ if (use_aura && (is_linux || is_chromeos_lacros)) {
# These files can do Gtk+-based theming for builds with gtk enabled.
- if (is_linux || is_chromeos_lacros) {
+ sources += [
+ "views/chrome_browser_main_extra_parts_views_linux.cc",
+ "views/chrome_browser_main_extra_parts_views_linux.h",
+ ]
+ deps += [
+ "//ui/base/cursor",
+ "//ui/ozone",
+ ]
+ if (use_dbus) {
sources += [
- "views/chrome_browser_main_extra_parts_views_linux.cc",
- "views/chrome_browser_main_extra_parts_views_linux.h",
"views/dark_mode_manager_linux.cc",
"views/dark_mode_manager_linux.h",
]
deps += [
"//components/dbus/thread_linux",
"//dbus",
- "//ui/base/cursor",
- "//ui/ozone",
]
}
}
diff --git a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
index d7fad5b5b9007..23d0611fdb2b5 100644
--- a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
+++ b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
@@ -7,7 +7,6 @@
#include "base/metrics/histogram_macros.h"
#include "chrome/browser/themes/theme_service_aura_linux.h"
#include "chrome/browser/ui/browser_list.h"
-#include "chrome/browser/ui/views/dark_mode_manager_linux.h"
#include "chrome/browser/ui/views/theme_profile_key.h"
#include "ui/base/buildflags.h"
#include "ui/base/cursor/cursor_factory.h"
@@ -19,6 +18,10 @@
#include "ui/native_theme/native_theme.h"
#include "ui/ozone/public/ozone_platform.h"
+#if defined(USE_DBUS)
+#include "chrome/browser/ui/views/dark_mode_manager_linux.h"
+#endif
+
namespace {
class LinuxUiGetterImpl : public ui::LinuxUiGetter {
@@ -57,8 +60,9 @@ void ChromeBrowserMainExtraPartsViewsLinux::ToolkitInitialized() {
UMA_HISTOGRAM_ENUMERATION("Linux.SystemTheme.Default",
linux_ui_theme->GetNativeTheme()->system_theme());
}
-
+#if defined(USE_DBUS)
dark_mode_manager_ = std::make_unique<ui::DarkModeManagerLinux>();
+#endif
}
void ChromeBrowserMainExtraPartsViewsLinux::PreCreateThreads() {
diff --git a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h
index 6deb5205d198a..bc9167bda1fc3 100644
--- a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h
+++ b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h
@@ -13,7 +13,9 @@
namespace ui {
class LinuxUiGetter;
+#if defined(USE_DBUS)
class DarkModeManagerLinux;
+#endif
}
// Extra parts, which are used by both Ozone/X11/Wayland and inherited by the
@@ -42,8 +44,9 @@ class ChromeBrowserMainExtraPartsViewsLinux
absl::optional<display::ScopedDisplayObserver> display_observer_;
std::unique_ptr<ui::LinuxUiGetter> linux_ui_getter_;
-
+#if defined(USE_DBUS)
std::unique_ptr<ui::DarkModeManagerLinux> dark_mode_manager_;
+#endif
};
#endif // CHROME_BROWSER_UI_VIEWS_CHROME_BROWSER_MAIN_EXTRA_PARTS_VIEWS_LINUX_H_

View file

@ -1,277 +0,0 @@
diff --git a/components/version_info/version_info.cc b/components/version_info/version_info.cc
index c5b6a9ea17be1..9b1f5e4478f53 100644
--- a/components/version_info/version_info.cc
+++ b/components/version_info/version_info.cc
@@ -4,26 +4,15 @@
#include "components/version_info/version_info.h"
-#include "base/check.h"
+#include <string>
+
#include "base/no_destructor.h"
-#include "base/notreached.h"
-#include "base/sanitizer_buildflags.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/version.h"
-#include "build/branding_buildflags.h"
-#include "build/build_config.h"
-#include "build/chromeos_buildflags.h"
-#include "components/version_info/version_info_values.h"
namespace version_info {
-const std::string& GetProductNameAndVersionForUserAgent() {
- static const base::NoDestructor<std::string> product_and_version(
- "Chrome/" + GetVersionNumber());
- return *product_and_version;
-}
-
const std::string GetProductNameAndVersionForReducedUserAgent(
const std::string& build_version) {
std::string product_and_version;
@@ -32,14 +21,6 @@ const std::string GetProductNameAndVersionForReducedUserAgent(
return product_and_version;
}
-std::string GetProductName() {
- return PRODUCT_NAME;
-}
-
-std::string GetVersionNumber() {
- return PRODUCT_VERSION;
-}
-
int GetMajorVersionNumberAsInt() {
DCHECK(GetVersion().IsValid());
return GetVersion().components()[0];
@@ -54,82 +35,4 @@ const base::Version& GetVersion() {
return *version;
}
-std::string GetLastChange() {
- return LAST_CHANGE;
-}
-
-bool IsOfficialBuild() {
- return IS_OFFICIAL_BUILD;
-}
-
-std::string GetOSType() {
-#if BUILDFLAG(IS_WIN)
- return "Windows";
-#elif BUILDFLAG(IS_IOS)
- return "iOS";
-#elif BUILDFLAG(IS_MAC)
- return "Mac OS X";
-#elif BUILDFLAG(IS_CHROMEOS)
-# if BUILDFLAG(GOOGLE_CHROME_BRANDING)
- return "ChromeOS";
-# else
- return "ChromiumOS";
-# endif
-#elif BUILDFLAG(IS_ANDROID)
- return "Android";
-#elif BUILDFLAG(IS_LINUX)
- return "Linux";
-#elif BUILDFLAG(IS_FREEBSD)
- return "FreeBSD";
-#elif BUILDFLAG(IS_OPENBSD)
- return "OpenBSD";
-#elif BUILDFLAG(IS_SOLARIS)
- return "Solaris";
-#elif BUILDFLAG(IS_FUCHSIA)
- return "Fuchsia";
-#else
- return "Unknown";
-#endif
-}
-
-std::string GetChannelString(Channel channel) {
- switch (channel) {
- case Channel::STABLE:
- return "stable";
- case Channel::BETA:
- return "beta";
- case Channel::DEV:
- return "dev";
- case Channel::CANARY:
- return "canary";
- case Channel::UNKNOWN:
- return "unknown";
- }
- NOTREACHED();
- return std::string();
-}
-
-std::string GetSanitizerList() {
- std::string sanitizers;
-#if defined(ADDRESS_SANITIZER)
- sanitizers += "address ";
-#endif
-#if BUILDFLAG(IS_HWASAN)
- sanitizers += "hwaddress ";
-#endif
-#if defined(LEAK_SANITIZER)
- sanitizers += "leak ";
-#endif
-#if defined(MEMORY_SANITIZER)
- sanitizers += "memory ";
-#endif
-#if defined(THREAD_SANITIZER)
- sanitizers += "thread ";
-#endif
-#if defined(UNDEFINED_SANITIZER)
- sanitizers += "undefined ";
-#endif
- return sanitizers;
-}
-
} // namespace version_info
diff --git a/components/version_info/version_info.h b/components/version_info/version_info.h
index cab516659a9e4..ffa554eed7598 100644
--- a/components/version_info/version_info.h
+++ b/components/version_info/version_info.h
@@ -7,7 +7,12 @@
#include <string>
+#include "base/notreached.h"
+#include "base/sanitizer_buildflags.h"
+#include "build/branding_buildflags.h"
+#include "build/build_config.h"
#include "components/version_info/channel.h"
+#include "components/version_info/version_info_values.h"
namespace base {
class Version;
@@ -15,10 +20,6 @@ class Version;
namespace version_info {
-// Returns the product name and version information for the User-Agent header,
-// in the format: Chrome/<major_version>.<minor_version>.<build>.<patch>.
-const std::string& GetProductNameAndVersionForUserAgent();
-
// Returns the product name and reduced version information for the User-Agent
// header, in the format: Chrome/<major_version>.0.build_version.0, where
// `build_version` is a frozen BUILD number.
@@ -26,10 +27,20 @@ const std::string GetProductNameAndVersionForReducedUserAgent(
const std::string& build_version);
// Returns the product name, e.g. "Chromium" or "Google Chrome".
-std::string GetProductName();
+constexpr std::string GetProductName() {
+ return PRODUCT_NAME;
+}
// Returns the version number, e.g. "6.0.490.1".
-std::string GetVersionNumber();
+constexpr std::string GetVersionNumber() {
+ return PRODUCT_VERSION;
+}
+
+// Returns the product name and version information for the User-Agent header,
+// in the format: Chrome/<major_version>.<minor_version>.<build>.<patch>.
+constexpr std::string GetProductNameAndVersionForUserAgent() {
+ return "Chrome/" + GetVersionNumber();
+}
// Returns the major component (aka the milestone) of the version as an int,
// e.g. 6 when the version is "6.0.490.1".
@@ -42,22 +53,89 @@ std::string GetMajorVersionNumber();
const base::Version& GetVersion();
// Returns a version control specific identifier of this release.
-std::string GetLastChange();
+constexpr std::string GetLastChange() {
+ return LAST_CHANGE;
+}
// Returns whether this is an "official" release of the current version, i.e.
// whether knowing GetVersionNumber() is enough to completely determine what
// GetLastChange() is.
-bool IsOfficialBuild();
+constexpr bool IsOfficialBuild() {
+ return IS_OFFICIAL_BUILD;
+}
// Returns the OS type, e.g. "Windows", "Linux", "FreeBSD", ...
-std::string GetOSType();
+constexpr std::string GetOSType() {
+#if BUILDFLAG(IS_WIN)
+ return "Windows";
+#elif BUILDFLAG(IS_IOS)
+ return "iOS";
+#elif BUILDFLAG(IS_MAC)
+ return "Mac OS X";
+#elif BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+ return "ChromeOS";
+#else
+ return "ChromiumOS";
+#endif
+#elif BUILDFLAG(IS_ANDROID)
+ return "Android";
+#elif BUILDFLAG(IS_LINUX)
+ return "Linux";
+#elif BUILDFLAG(IS_FREEBSD)
+ return "FreeBSD";
+#elif BUILDFLAG(IS_OPENBSD)
+ return "OpenBSD";
+#elif BUILDFLAG(IS_SOLARIS)
+ return "Solaris";
+#elif BUILDFLAG(IS_FUCHSIA)
+ return "Fuchsia";
+#else
+ return "Unknown";
+#endif
+}
// Returns a string equivalent of |channel|, independent of whether the build
// is branded or not and without any additional modifiers.
-std::string GetChannelString(Channel channel);
+constexpr std::string GetChannelString(Channel channel) {
+ switch (channel) {
+ case Channel::STABLE:
+ return "stable";
+ case Channel::BETA:
+ return "beta";
+ case Channel::DEV:
+ return "dev";
+ case Channel::CANARY:
+ return "canary";
+ case Channel::UNKNOWN:
+ return "unknown";
+ }
+ NOTREACHED_NORETURN();
+}
// Returns a list of sanitizers enabled in this build.
-std::string GetSanitizerList();
+constexpr std::string GetSanitizerList() {
+ return ""
+#if defined(ADDRESS_SANITIZER)
+ "address "
+#endif
+#if BUILDFLAG(IS_HWASAN)
+ "hwaddress "
+#endif
+#if defined(LEAK_SANITIZER)
+ "leak "
+#endif
+#if defined(MEMORY_SANITIZER)
+ "memory "
+#endif
+#if defined(THREAD_SANITIZER)
+ "thread "
+#endif
+#if defined(UNDEFINED_SANITIZER)
+ "undefined "
+#endif
+ ;
+}
} // namespace version_info

View file

@ -1,12 +0,0 @@
diff -up chromium-113.0.5672.24/chrome/browser/media/router/media_router_feature.cc.disable-GlobalMediaControlsCastStartStop chromium-113.0.5672.24/chrome/browser/media/router/media_router_feature.cc
--- chromium-113.0.5672.24/chrome/browser/media/router/media_router_feature.cc.disable-GlobalMediaControlsCastStartStop 2023-04-07 13:54:52.562292026 +0200
+++ chromium-113.0.5672.24/chrome/browser/media/router/media_router_feature.cc 2023-04-07 13:57:41.470414086 +0200
@@ -68,7 +68,7 @@ BASE_FEATURE(kGlobalMediaControlsCastSta
#else
BASE_FEATURE(kGlobalMediaControlsCastStartStop,
"GlobalMediaControlsCastStartStop",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ base::FEATURE_DISABLED_BY_DEFAULT);
#endif // BUILDFLAG(IS_CHROMEOS)
#endif // BUILDFLAG(IS_ANDROID)

View file

@ -1,422 +0,0 @@
diff -up chromium-109.0.5414.74/base/check_op.h.me chromium-109.0.5414.74/base/check_op.h
--- chromium-109.0.5414.74/base/check_op.h.me 2023-01-17 17:39:27.620875883 +0100
+++ chromium-109.0.5414.74/base/check_op.h 2023-01-17 17:39:42.546060957 +0100
@@ -5,6 +5,7 @@
#ifndef BASE_CHECK_OP_H_
#define BASE_CHECK_OP_H_
+#include <cstdint>
#include <cstddef>
#include <string>
#include <type_traits>
diff -up chromium-109.0.5414.74/base/debug/profiler.h.me chromium-109.0.5414.74/base/debug/profiler.h
--- chromium-109.0.5414.74/base/debug/profiler.h.me 2023-01-17 16:29:26.368090073 +0100
+++ chromium-109.0.5414.74/base/debug/profiler.h 2023-01-17 16:59:41.190628679 +0100
@@ -7,6 +7,7 @@
#include <stddef.h>
+#include <cstdint>
#include <string>
#include "base/base_export.h"
diff -up chromium-109.0.5414.74/components/viz/common/view_transition_element_resource_id.h.me chromium-109.0.5414.74/components/viz/common/view_transition_element_resource_id.h
--- chromium-109.0.5414.74/components/viz/common/view_transition_element_resource_id.h.me 2023-01-17 19:03:10.920014806 +0100
+++ chromium-109.0.5414.74/components/viz/common/view_transition_element_resource_id.h 2023-01-17 19:03:48.736395274 +0100
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_VIZ_COMMON_VIEW_TRANSITION_ELEMENT_RESOURCE_ID_H_
#define COMPONENTS_VIZ_COMMON_VIEW_TRANSITION_ELEMENT_RESOURCE_ID_H_
+#include <cstdint>
#include <string>
#include <vector>
diff -up chromium-109.0.5414.74/gpu/config/gpu_feature_info.h.me chromium-109.0.5414.74/gpu/config/gpu_feature_info.h
--- chromium-109.0.5414.74/gpu/config/gpu_feature_info.h.me 2023-01-17 19:06:53.530675129 +0100
+++ chromium-109.0.5414.74/gpu/config/gpu_feature_info.h 2023-01-17 19:07:08.874849879 +0100
@@ -5,6 +5,7 @@
#ifndef GPU_CONFIG_GPU_FEATURE_INFO_H_
#define GPU_CONFIG_GPU_FEATURE_INFO_H_
+#include <cstdint>
#include <string>
#include <vector>
diff -up chromium-109.0.5414.74/net/base/net_export.h.me chromium-109.0.5414.74/net/base/net_export.h
--- chromium-109.0.5414.74/net/base/net_export.h.me 2023-01-17 18:16:34.133854615 +0100
+++ chromium-109.0.5414.74/net/base/net_export.h 2023-01-17 18:16:15.945623153 +0100
@@ -5,6 +5,8 @@
#ifndef NET_BASE_NET_EXPORT_H_
#define NET_BASE_NET_EXPORT_H_
+#include <cstdint>
+
// Defines NET_EXPORT so that functionality implemented by the net module can
// be exported to consumers, and NET_EXPORT_PRIVATE that allows unit tests to
// access features not intended to be used directly by real consumers.
diff -up chromium-109.0.5414.74/sandbox/linux/syscall_broker/broker_file_permission.h.me chromium-109.0.5414.74/sandbox/linux/syscall_broker/broker_file_permission.h
--- chromium-109.0.5414.74/sandbox/linux/syscall_broker/broker_file_permission.h.me 2023-01-17 17:12:34.184686515 +0100
+++ chromium-109.0.5414.74/sandbox/linux/syscall_broker/broker_file_permission.h 2023-01-17 17:13:16.537162420 +0100
@@ -5,6 +5,7 @@
#ifndef SANDBOX_LINUX_SYSCALL_BROKER_BROKER_FILE_PERMISSION_H_
#define SANDBOX_LINUX_SYSCALL_BROKER_BROKER_FILE_PERMISSION_H_
+#include <cstdint>
#include <bitset>
#include <string>
diff -up chromium-109.0.5414.74/third_party/abseil-cpp/absl/strings/string_view.h.me chromium-109.0.5414.74/third_party/abseil-cpp/absl/strings/string_view.h
--- chromium-109.0.5414.74/third_party/abseil-cpp/absl/strings/string_view.h.me 2023-01-17 17:33:20.895717307 +0100
+++ chromium-109.0.5414.74/third_party/abseil-cpp/absl/strings/string_view.h 2023-01-17 17:34:03.456185365 +0100
@@ -27,6 +27,7 @@
#ifndef ABSL_STRINGS_STRING_VIEW_H_
#define ABSL_STRINGS_STRING_VIEW_H_
+#include <cstdint>
#include <algorithm>
#include <cassert>
#include <cstddef>
diff -up chromium-109.0.5414.74/third_party/angle/include/GLSLANG/ShaderVars.h.me chromium-109.0.5414.74/third_party/angle/include/GLSLANG/ShaderVars.h
--- chromium-109.0.5414.74/third_party/angle/include/GLSLANG/ShaderVars.h.me 2023-01-17 17:36:15.017616250 +0100
+++ chromium-109.0.5414.74/third_party/angle/include/GLSLANG/ShaderVars.h 2023-01-17 17:36:48.960982195 +0100
@@ -10,6 +10,7 @@
#ifndef GLSLANG_SHADERVARS_H_
#define GLSLANG_SHADERVARS_H_
+#include <cstdint>
#include <algorithm>
#include <array>
#include <string>
diff -up chromium-109.0.5414.74/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h.me chromium-109.0.5414.74/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h
--- chromium-109.0.5414.74/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h.me 2023-01-17 19:17:40.480876171 +0100
+++ chromium-109.0.5414.74/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h 2023-01-17 19:17:46.803958320 +0100
@@ -5,6 +5,7 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_BLUETOOTH_WEB_BLUETOOTH_DEVICE_ID_H_
#define THIRD_PARTY_BLINK_PUBLIC_COMMON_BLUETOOTH_WEB_BLUETOOTH_DEVICE_ID_H_
+#include <cstdint>
#include <array>
#include <string>
diff -up chromium-109.0.5414.74/third_party/dawn/src/dawn/native/stream/ByteVectorSink.h.me chromium-109.0.5414.74/third_party/dawn/src/dawn/native/stream/ByteVectorSink.h
--- chromium-109.0.5414.74/third_party/dawn/src/dawn/native/stream/ByteVectorSink.h.me 2023-01-17 18:00:37.123218954 +0100
+++ chromium-109.0.5414.74/third_party/dawn/src/dawn/native/stream/ByteVectorSink.h 2023-01-17 18:00:50.610300138 +0100
@@ -15,6 +15,7 @@
#ifndef SRC_DAWN_NATIVE_STREAM_BYTEVECTORSINK_H_
#define SRC_DAWN_NATIVE_STREAM_BYTEVECTORSINK_H_
+#include <cstdint>
#include <ostream>
#include <vector>
diff -up chromium-109.0.5414.74/third_party/dawn/src/tint/reader/spirv/namer.h.me chromium-109.0.5414.74/third_party/dawn/src/tint/reader/spirv/namer.h
--- chromium-109.0.5414.74/third_party/dawn/src/tint/reader/spirv/namer.h.me 2023-01-17 18:02:44.681538107 +0100
+++ chromium-109.0.5414.74/third_party/dawn/src/tint/reader/spirv/namer.h 2023-01-17 18:02:57.208679140 +0100
@@ -15,6 +15,7 @@
#ifndef SRC_TINT_READER_SPIRV_NAMER_H_
#define SRC_TINT_READER_SPIRV_NAMER_H_
+#include <cstdint>
#include <string>
#include <unordered_map>
#include <vector>
diff -up chromium-109.0.5414.74/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h.me chromium-109.0.5414.74/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h
--- chromium-109.0.5414.74/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h.me 2023-01-18 15:22:38.472940648 +0100
+++ chromium-109.0.5414.74/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h 2023-01-18 15:23:09.380255101 +0100
@@ -5,6 +5,7 @@
#ifndef DISCOVERY_DNSSD_PUBLIC_DNS_SD_TXT_RECORD_H_
#define DISCOVERY_DNSSD_PUBLIC_DNS_SD_TXT_RECORD_H_
+#include <cstdint>
#include <functional>
#include <map>
#include <set>
diff -up chromium-109.0.5414.74/third_party/swiftshader/src/System/LRUCache.hpp.me chromium-109.0.5414.74/third_party/swiftshader/src/System/LRUCache.hpp
--- chromium-109.0.5414.74/third_party/swiftshader/src/System/LRUCache.hpp.me 2023-01-17 15:37:48.530626516 +0100
+++ chromium-109.0.5414.74/third_party/swiftshader/src/System/LRUCache.hpp 2023-01-17 16:57:46.025548092 +0100
@@ -17,6 +17,7 @@
#include "System/Debug.hpp"
+#include <cstdint>
#include <cstddef>
#include <functional>
#include <unordered_set>
diff -up chromium-109.0.5414.74/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h.me chromium-109.0.5414.74/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h
--- chromium-109.0.5414.74/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h.me 2023-01-17 15:40:23.854386206 +0100
+++ chromium-109.0.5414.74/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h 2023-01-17 16:58:19.397862885 +0100
@@ -2388,6 +2388,7 @@ VMA_CALL_PRE void VMA_CALL_POST vmaFreeV
#ifdef VMA_IMPLEMENTATION
#undef VMA_IMPLEMENTATION
+#include <cstdio>
#include <cstdint>
#include <cstdlib>
#include <cstring>
diff -up chromium-109.0.5414.74/ui/gfx/geometry/linear_gradient.h.me chromium-109.0.5414.74/ui/gfx/geometry/linear_gradient.h
--- chromium-109.0.5414.74/ui/gfx/geometry/linear_gradient.h.me 2023-01-17 18:08:25.745491353 +0100
+++ chromium-109.0.5414.74/ui/gfx/geometry/linear_gradient.h 2023-01-17 18:08:35.777667632 +0100
@@ -5,6 +5,7 @@
#ifndef UI_GFX_LINEAR_GRADIENT_H_
#define UI_GFX_LINEAR_GRADIENT_H_
+#include <cstdint>
#include <array>
#include <string>
diff -up chromium-109.0.5414.74/third_party/perfetto/include/perfetto/ext/base/uuid.h.me chromium-109.0.5414.74/third_party/perfetto/include/perfetto/ext/base/uuid.h
--- chromium-109.0.5414.74/third_party/perfetto/include/perfetto/ext/base/uuid.h.me 2023-01-18 16:00:58.563875881 +0100
+++ chromium-109.0.5414.74/third_party/perfetto/include/perfetto/ext/base/uuid.h 2023-01-18 16:02:01.773517452 +0100
@@ -17,6 +17,7 @@
#ifndef INCLUDE_PERFETTO_EXT_BASE_UUID_H_
#define INCLUDE_PERFETTO_EXT_BASE_UUID_H_
+#include <cstdint>
#include <array>
#include <string>
diff -up chromium-109.0.5414.74/third_party/ruy/src/ruy/profiler/instrumentation.h.me chromium-109.0.5414.74/third_party/ruy/src/ruy/profiler/instrumentation.h
--- chromium-109.0.5414.74/third_party/ruy/src/ruy/profiler/instrumentation.h.me 2023-01-19 10:10:21.287876736 +0100
+++ chromium-109.0.5414.74/third_party/ruy/src/ruy/profiler/instrumentation.h 2023-01-19 10:11:21.714778896 +0100
@@ -17,6 +17,7 @@ limitations under the License.
#define RUY_RUY_PROFILER_INSTRUMENTATION_H_
#ifdef RUY_PROFILER
+#include <string>
#include <cstdio>
#include <mutex>
#include <vector>
diff -up chromium-109.0.5414.74/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h.me chromium-109.0.5414.74/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h
--- chromium-109.0.5414.74/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h.me 2023-01-19 10:30:27.533861985 +0100
+++ chromium-109.0.5414.74/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h 2023-01-19 10:31:12.585554183 +0100
@@ -31,6 +31,7 @@ limitations under the License.
#ifndef TENSORFLOW_LITE_KERNELS_INTERNAL_SPECTROGRAM_H_
#define TENSORFLOW_LITE_KERNELS_INTERNAL_SPECTROGRAM_H_
+#include <cstdint>
#include <complex>
#include <deque>
#include <vector>
diff -up chromium-109.0.5414.74/base/containers/flat_map.h.mee chromium-109.0.5414.74/base/containers/flat_map.h
--- chromium-109.0.5414.74/base/containers/flat_map.h.mee 2023-01-19 10:59:52.214957773 +0100
+++ chromium-109.0.5414.74/base/containers/flat_map.h 2023-01-19 11:00:06.415215309 +0100
@@ -5,6 +5,7 @@
#ifndef BASE_CONTAINERS_FLAT_MAP_H_
#define BASE_CONTAINERS_FLAT_MAP_H_
+#include <cstdint>
#include <functional>
#include <tuple>
#include <utility>
diff -up chromium-109.0.5414.74/components/crash/core/app/crash_reporter_client.h.mee chromium-109.0.5414.74/components/crash/core/app/crash_reporter_client.h
--- chromium-109.0.5414.74/components/crash/core/app/crash_reporter_client.h.mee 2023-01-19 10:36:40.571422826 +0100
+++ chromium-109.0.5414.74/components/crash/core/app/crash_reporter_client.h 2023-01-19 10:36:49.343565294 +0100
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_CRASH_CORE_APP_CRASH_REPORTER_CLIENT_H_
#define COMPONENTS_CRASH_CORE_APP_CRASH_REPORTER_CLIENT_H_
+#include <cstdint>
#include <string>
#include "build/build_config.h"
diff -up chromium-109.0.5414.74/device/bluetooth/public/cpp/bluetooth_uuid.h.mee chromium-109.0.5414.74/device/bluetooth/public/cpp/bluetooth_uuid.h
--- chromium-109.0.5414.74/device/bluetooth/public/cpp/bluetooth_uuid.h.mee 2023-01-19 10:46:54.826513707 +0100
+++ chromium-109.0.5414.74/device/bluetooth/public/cpp/bluetooth_uuid.h 2023-01-19 10:47:11.255711472 +0100
@@ -5,6 +5,7 @@
#ifndef DEVICE_BLUETOOTH_PUBLIC_CPP_BLUETOOTH_UUID_H_
#define DEVICE_BLUETOOTH_PUBLIC_CPP_BLUETOOTH_UUID_H_
+#include <cstdint>
#include <ostream>
#include <string>
#include <vector>
diff -up chromium-109.0.5414.74/ui/base/prediction/kalman_filter.h.mee chromium-109.0.5414.74/ui/base/prediction/kalman_filter.h
--- chromium-109.0.5414.74/ui/base/prediction/kalman_filter.h.mee 2023-01-19 11:45:15.953159755 +0100
+++ chromium-109.0.5414.74/ui/base/prediction/kalman_filter.h 2023-01-19 11:45:22.320246241 +0100
@@ -5,6 +5,8 @@
#ifndef UI_BASE_PREDICTION_KALMAN_FILTER_H_
#define UI_BASE_PREDICTION_KALMAN_FILTER_H_
+#include <cstdint>
+
#include "base/component_export.h"
#include "ui/gfx/geometry/matrix3_f.h"
diff -up chromium-109.0.5414.74/components/password_manager/core/browser/generation/password_generator.h.me chromium-109.0.5414.74/components/password_manager/core/browser/generation/password_generator.h
--- chromium-109.0.5414.74/components/password_manager/core/browser/generation/password_generator.h.me 2023-01-19 15:20:07.620987949 +0100
+++ chromium-109.0.5414.74/components/password_manager/core/browser/generation/password_generator.h 2023-01-19 15:20:18.324173702 +0100
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_GENERATION_PASSWORD_GENERATOR_H_
#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_GENERATION_PASSWORD_GENERATOR_H_
+#include <cstdint>
#include <string>
diff -up chromium-109.0.5414.74/components/feature_engagement/internal/event_storage_validator.h.me chromium-109.0.5414.74/components/feature_engagement/internal/event_storage_validator.h
--- chromium-109.0.5414.74/components/feature_engagement/internal/event_storage_validator.h.me 2023-01-19 16:00:14.350186515 +0100
+++ chromium-109.0.5414.74/components/feature_engagement/internal/event_storage_validator.h 2023-01-19 16:00:21.643307993 +0100
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_EVENT_STORAGE_VALIDATOR_H_
#define COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_EVENT_STORAGE_VALIDATOR_H_
+#include <cstdint>
#include <string>
namespace feature_engagement {
diff -up chromium-109.0.5414.74/components/feature_engagement/internal/never_event_storage_validator.h.me chromium-109.0.5414.74/components/feature_engagement/internal/never_event_storage_validator.h
--- chromium-109.0.5414.74/components/feature_engagement/internal/never_event_storage_validator.h.me 2023-01-19 15:59:18.210239416 +0100
+++ chromium-109.0.5414.74/components/feature_engagement/internal/never_event_storage_validator.h 2023-01-19 15:59:34.513515030 +0100
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_NEVER_EVENT_STORAGE_VALIDATOR_H_
#define COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_NEVER_EVENT_STORAGE_VALIDATOR_H_
+#include <cstdint>
#include <string>
#include "components/feature_engagement/internal/event_storage_validator.h"
diff -up chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/Signals.h.me chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/Signals.h
--- chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/Signals.h.me 2023-01-19 16:06:17.548272878 +0100
+++ chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/Signals.h 2023-01-19 16:06:25.685410592 +0100
@@ -14,6 +14,7 @@
#ifndef LLVM_SUPPORT_SIGNALS_H
#define LLVM_SUPPORT_SIGNALS_H
+#include <cstdint>
#include <string>
namespace llvm {
diff -up chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc.me chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc
--- chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc.me 2023-01-19 16:09:29.216477182 +0100
+++ chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc 2023-01-19 16:10:05.657089208 +0100
@@ -45,6 +45,7 @@
#include "llvm/Support/SaveAndRestore.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
+#include <cstdint>
#include <string>
#include <sysexits.h>
#ifdef HAVE_BACKTRACE
diff -up chromium-109.0.5414.74/chrome/browser/privacy_budget/encountered_surface_tracker.h.me chromium-109.0.5414.74/chrome/browser/privacy_budget/encountered_surface_tracker.h
--- chromium-109.0.5414.74/chrome/browser/privacy_budget/encountered_surface_tracker.h.me 2023-01-19 16:32:05.338160131 +0100
+++ chromium-109.0.5414.74/chrome/browser/privacy_budget/encountered_surface_tracker.h 2023-01-19 16:32:16.213326798 +0100
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_PRIVACY_BUDGET_ENCOUNTERED_SURFACE_TRACKER_H_
#define CHROME_BROWSER_PRIVACY_BUDGET_ENCOUNTERED_SURFACE_TRACKER_H_
+#include <cstdint>
#include <map>
#include "base/containers/flat_set.h"
diff -up chromium-109.0.5414.74/components/autofill/core/browser/autofill_ablation_study.h.me chromium-109.0.5414.74/components/autofill/core/browser/autofill_ablation_study.h
--- chromium-109.0.5414.74/components/autofill/core/browser/autofill_ablation_study.h.me 2023-01-19 16:47:55.548571102 +0100
+++ chromium-109.0.5414.74/components/autofill/core/browser/autofill_ablation_study.h 2023-01-19 16:48:29.214146529 +0100
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_ABLATION_STUDY_H_
#define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_ABLATION_STUDY_H_
+#include <cstdint>
#include <string>
class GURL;
diff -up chromium-109.0.5414.74/components/omnibox/browser/on_device_head_model.h.me chromium-109.0.5414.74/components/omnibox/browser/on_device_head_model.h
--- chromium-109.0.5414.74/components/omnibox/browser/on_device_head_model.h.me 2023-01-19 16:57:29.525372814 +0100
+++ chromium-109.0.5414.74/components/omnibox/browser/on_device_head_model.h 2023-01-19 16:58:02.667979288 +0100
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_OMNIBOX_BROWSER_ON_DEVICE_HEAD_MODEL_H_
#define COMPONENTS_OMNIBOX_BROWSER_ON_DEVICE_HEAD_MODEL_H_
+#include <cstdint>
#include <string>
#include <utility>
#include <vector>
diff -up chromium-109.0.5414.74/components/payments/content/utility/fingerprint_parser.h.me chromium-109.0.5414.74/components/payments/content/utility/fingerprint_parser.h
--- chromium-109.0.5414.74/components/payments/content/utility/fingerprint_parser.h.me 2023-01-19 17:02:45.258544665 +0100
+++ chromium-109.0.5414.74/components/payments/content/utility/fingerprint_parser.h 2023-01-19 17:02:52.577611757 +0100
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_PAYMENTS_CONTENT_UTILITY_FINGERPRINT_PARSER_H_
#define COMPONENTS_PAYMENTS_CONTENT_UTILITY_FINGERPRINT_PARSER_H_
+#include <cstdint>
#include <stddef.h>
#include <string>
diff -up chromium-109.0.5414.74/pdf/document_attachment_info.h.me chromium-109.0.5414.74/pdf/document_attachment_info.h
--- chromium-109.0.5414.74/pdf/document_attachment_info.h.me 2023-01-19 17:28:28.552063534 +0100
+++ chromium-109.0.5414.74/pdf/document_attachment_info.h 2023-01-19 17:28:48.072379953 +0100
@@ -5,6 +5,7 @@
#ifndef PDF_DOCUMENT_ATTACHMENT_INFO_H_
#define PDF_DOCUMENT_ATTACHMENT_INFO_H_
+#include <cstdint>
#include <string>
diff -up chromium-109.0.5414.74/third_party/pdfium/constants/annotation_flags.h.me chromium-109.0.5414.74/third_party/pdfium/constants/annotation_flags.h
--- chromium-109.0.5414.74/third_party/pdfium/constants/annotation_flags.h.me 2023-01-19 18:25:47.648193710 +0100
+++ chromium-109.0.5414.74/third_party/pdfium/constants/annotation_flags.h 2023-01-19 18:26:11.488593556 +0100
@@ -5,6 +5,8 @@
#ifndef CONSTANTS_ANNOTATION_FLAGS_H_
#define CONSTANTS_ANNOTATION_FLAGS_H_
+#include <cstdint>
+
namespace pdfium {
namespace annotation_flags {
diff -up chromium-109.0.5414.74/base/cpu.h.me chromium-109.0.5414.74/base/cpu.h
--- chromium-109.0.5414.74/base/cpu.h.me 2023-01-19 21:31:02.905062987 +0100
+++ chromium-109.0.5414.74/base/cpu.h 2023-01-19 21:31:32.298573267 +0100
@@ -5,6 +5,7 @@
#ifndef BASE_CPU_H_
#define BASE_CPU_H_
+#include <cstdint>
#include <string>
#include "base/base_export.h"
diff -up chromium-113.0.5672.24/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h.me chromium-113.0.5672.24/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h
--- chromium-113.0.5672.24/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h.me 2023-04-15 16:44:55.344305412 +0200
+++ chromium-113.0.5672.24/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h 2023-04-15 16:47:09.028666995 +0200
@@ -2854,6 +2854,7 @@ static void vma_aligned_free(void* VMA_N
// Define this macro to 1 to enable functions: vmaBuildStatsString, vmaFreeStatsString.
#if VMA_STATS_STRING_ENABLED
+#include <stdio.h>
static inline void VmaUint32ToStr(char* VMA_NOT_NULL outStr, size_t strLen, uint32_t num)
{
snprintf(outStr, strLen, "%u", static_cast<unsigned int>(num));
diff -up chromium-113.0.5672.37/chrome/browser/webauthn/authenticator_request_dialog_model.h.me chromium-113.0.5672.37/chrome/browser/webauthn/authenticator_request_dialog_model.h
--- chromium-113.0.5672.37/chrome/browser/webauthn/authenticator_request_dialog_model.h.me 2023-04-18 15:55:44.774916319 +0200
+++ chromium-113.0.5672.37/chrome/browser/webauthn/authenticator_request_dialog_model.h 2023-04-18 15:55:54.441085882 +0200
@@ -8,6 +8,7 @@
#include <memory>
#include <string>
#include <vector>
+#include <variant>
#include "base/containers/span.h"
#include "base/functional/callback_forward.h"
diff -up chromium-113.0.5672.37/gin/time_clamper.h.me chromium-113.0.5672.37/gin/time_clamper.h
--- chromium-113.0.5672.37/gin/time_clamper.h.me 2023-04-18 16:38:41.180437467 +0200
+++ chromium-113.0.5672.37/gin/time_clamper.h 2023-04-18 16:39:43.857049432 +0200
@@ -48,7 +48,7 @@ class GIN_EXPORT TimeClamper {
const int64_t micros = now_micros % 1000;
// abs() is necessary for devices with times before unix-epoch (most likely
// configured incorrectly).
- if (abs(micros) + kResolutionMicros < 1000) {
+ if (std::abs(micros) + kResolutionMicros < 1000) {
return now_micros / 1000;
}
return ClampTimeResolution(now_micros) / 1000;
diff -up chromium-113.0.5672.53/chrome/test/chromedriver/chrome/web_view_impl.cc.me chromium-113.0.5672.53/chrome/test/chromedriver/chrome/web_view_impl.cc
--- chromium-113.0.5672.53/chrome/test/chromedriver/chrome/web_view_impl.cc.me 2023-04-21 08:07:55.362714544 +0200
+++ chromium-113.0.5672.53/chrome/test/chromedriver/chrome/web_view_impl.cc 2023-04-21 08:14:35.424158693 +0200
@@ -10,6 +10,7 @@
#include <queue>
#include <utility>
#include <vector>
+#include <cstring>
#include "base/check.h"
#include "base/files/file_path.h"

View file

@ -1,115 +0,0 @@
diff -up chromium-113.0.5672.24/chrome/common/safe_browsing/BUILD.gn.nounrar chromium-113.0.5672.24/chrome/common/safe_browsing/BUILD.gn
--- chromium-113.0.5672.24/chrome/common/safe_browsing/BUILD.gn.nounrar 2023-04-07 13:11:59.495927476 +0200
+++ chromium-113.0.5672.24/chrome/common/safe_browsing/BUILD.gn 2023-04-07 13:47:57.004758029 +0200
@@ -143,8 +143,6 @@ source_set("safe_browsing") {
"protobuf_message_log_macros.h",
"protobuf_message_read_macros.h",
"protobuf_message_write_macros.h",
- "rar_analyzer.cc",
- "rar_analyzer.h",
"seven_zip_analyzer.cc",
"seven_zip_analyzer.h",
"zip_analyzer.cc",
@@ -160,7 +158,6 @@ source_set("safe_browsing") {
"//components/safe_browsing/content/common:file_type_policies",
"//components/safe_browsing/core/common",
"//third_party/lzma_sdk/google:seven_zip_reader",
- "//third_party/unrar:unrar",
]
if (is_linux) {
diff -up chromium-113.0.5672.24/chrome/common/safe_browsing/DEPS.nounrar chromium-113.0.5672.24/chrome/common/safe_browsing/DEPS
--- chromium-113.0.5672.24/chrome/common/safe_browsing/DEPS.nounrar 2023-04-04 20:41:26.000000000 +0200
+++ chromium-113.0.5672.24/chrome/common/safe_browsing/DEPS 2023-04-07 13:11:59.495927476 +0200
@@ -3,7 +3,6 @@ include_rules = [
"+components/safe_browsing/core/common",
"+third_party/maldoca",
"+third_party/protobuf",
- "+third_party/unrar",
"+third_party/zlib",
"+third_party/lzma_sdk/google",
]
diff -up chromium-113.0.5672.24/chrome/services/file_util/BUILD.gn.nounrar chromium-113.0.5672.24/chrome/services/file_util/BUILD.gn
diff -up chromium-113.0.5672.24/chrome/services/file_util/safe_archive_analyzer.cc.nounrar chromium-113.0.5672.24/chrome/services/file_util/safe_archive_analyzer.cc
--- chromium-113.0.5672.24/chrome/services/file_util/safe_archive_analyzer.cc.nounrar 2023-04-07 13:11:59.495927476 +0200
+++ chromium-113.0.5672.24/chrome/services/file_util/safe_archive_analyzer.cc 2023-04-07 13:52:52.998109006 +0200
@@ -61,6 +61,7 @@ void SafeArchiveAnalyzer::AnalyzeRarFile
base::File rar_file,
mojo::PendingRemote<chrome::mojom::TemporaryFileGetter> temp_file_getter,
AnalyzeRarFileCallback callback) {
+#if 0
DCHECK(rar_file.IsValid());
temp_file_getter_.Bind(std::move(temp_file_getter));
callback_ = std::move(callback);
@@ -76,6 +77,9 @@ void SafeArchiveAnalyzer::AnalyzeRarFile
rar_analyzer_.Init(std::move(rar_file), base::FilePath(),
std::move(analysis_finished_callback),
std::move(temp_file_getter_callback), &results_);
+#else
+ NOTREACHED();
+#endif
}
void SafeArchiveAnalyzer::AnalyzeSevenZipFile(
diff -up chromium-113.0.5672.53/chrome/common/safe_browsing/zip_analyzer.cc.me chromium-113.0.5672.53/chrome/common/safe_browsing/zip_analyzer.cc
--- chromium-113.0.5672.53/chrome/common/safe_browsing/zip_analyzer.cc.me 2023-04-23 18:10:06.103858362 +0200
+++ chromium-113.0.5672.53/chrome/common/safe_browsing/zip_analyzer.cc 2023-04-23 18:12:05.428092347 +0200
@@ -18,7 +18,7 @@
#include "base/time/time.h"
#include "build/build_config.h"
#include "chrome/common/safe_browsing/archive_analyzer_results.h"
-#include "chrome/common/safe_browsing/rar_analyzer.h"
+//#include "chrome/common/safe_browsing/rar_analyzer.h"
#include "components/safe_browsing/content/common/file_type_policies.h"
#include "components/safe_browsing/core/common/features.h"
#include "components/safe_browsing/core/common/proto/csd.pb.h"
@@ -132,14 +132,14 @@ bool ZipAnalyzer::AnalyzeNestedArchive(
std::move(nested_analysis_finished_callback),
get_temp_file_callback_, results_);
return true;
- } else if (file_type == DownloadFileType::RAR) {
+ } /* else if (file_type == DownloadFileType::RAR) {
nested_rar_analyzer_ = std::make_unique<safe_browsing::RarAnalyzer>();
nested_rar_analyzer_->Init(temp_file_.Duplicate(),
root_zip_path_.Append(path),
std::move(nested_analysis_finished_callback),
get_temp_file_callback_, results_);
return true;
- }
+ }*/
return false;
}
diff -up chromium-113.0.5672.53/chrome/common/safe_browsing/zip_analyzer.h.me chromium-113.0.5672.53/chrome/common/safe_browsing/zip_analyzer.h
--- chromium-113.0.5672.53/chrome/common/safe_browsing/zip_analyzer.h.me 2023-04-23 18:12:11.316203496 +0200
+++ chromium-113.0.5672.53/chrome/common/safe_browsing/zip_analyzer.h 2023-04-23 18:12:26.827498082 +0200
@@ -78,7 +78,7 @@ class ZipAnalyzer {
// DFS.
// TODO(crbug.com/1426164) Create a common class to hold all analyzers.
std::unique_ptr<safe_browsing::ZipAnalyzer> nested_zip_analyzer_;
- std::unique_ptr<safe_browsing::RarAnalyzer> nested_rar_analyzer_;
+// std::unique_ptr<safe_browsing::RarAnalyzer> nested_rar_analyzer_;
base::WeakPtrFactory<ZipAnalyzer> weak_factory_{this};
};
diff -up chromium-113.0.5672.53/chrome/services/file_util/safe_archive_analyzer.h.me chromium-113.0.5672.53/chrome/services/file_util/safe_archive_analyzer.h
--- chromium-113.0.5672.53/chrome/services/file_util/safe_archive_analyzer.h.me 2023-04-23 18:06:26.476791520 +0200
+++ chromium-113.0.5672.53/chrome/services/file_util/safe_archive_analyzer.h 2023-04-23 18:08:58.594606171 +0200
@@ -6,7 +6,7 @@
#define CHROME_SERVICES_FILE_UTIL_SAFE_ARCHIVE_ANALYZER_H_
#include "chrome/common/safe_browsing/archive_analyzer_results.h"
-#include "chrome/common/safe_browsing/rar_analyzer.h"
+//#include "chrome/common/safe_browsing/rar_analyzer.h"
#include "chrome/services/file_util/public/mojom/safe_archive_analyzer.mojom.h"
#include "mojo/public/cpp/bindings/remote.h"
@@ -59,7 +59,7 @@ class SafeArchiveAnalyzer : public chrom
void Timeout();
safe_browsing::ZipAnalyzer zip_analyzer_;
- safe_browsing::RarAnalyzer rar_analyzer_;
+// safe_browsing::RarAnalyzer rar_analyzer_;
// A timer to ensure no archive takes too long to unpack.
base::OneShotTimer timeout_timer_;

View file

@ -1,12 +0,0 @@
diff -up chromium-113.0.5672.24/components/os_crypt/sync/features.gni.disblegnomekeyring chromium-113.0.5672.24/components/os_crypt/sync/features.gni
--- chromium-113.0.5672.24/components/os_crypt/sync/features.gni.disblegnomekeyring 2023-04-07 14:23:11.083985460 +0200
+++ chromium-113.0.5672.24/components/os_crypt/sync/features.gni 2023-04-07 14:23:44.276599353 +0200
@@ -8,7 +8,7 @@ import("//build/config/ui.gni")
declare_args() {
# Whether to use libgnome-keyring (deprecated by libsecret).
# See http://crbug.com/466975 and http://crbug.com/355223.
- use_gnome_keyring = is_linux && use_glib
+ use_gnome_keyring = false
# Whether to make account and service names for the crypto key storage
# configurable at runtime for embedders.

View file

@ -1,38 +0,0 @@
diff -up chromium-113.0.5672.63/chrome/browser/download/bubble/download_bubble_update_service.cc.me chromium-113.0.5672.63/chrome/browser/download/bubble/download_bubble_update_service.cc
--- chromium-113.0.5672.63/chrome/browser/download/bubble/download_bubble_update_service.cc.me 2023-05-03 17:46:37.194000834 +0200
+++ chromium-113.0.5672.63/chrome/browser/download/bubble/download_bubble_update_service.cc 2023-05-03 17:48:05.170317575 +0200
@@ -87,7 +87,7 @@ ItemSortKey GetSortKey(const Item& item)
// Helper to get an iterator to the last element in the cache. The cache
// must not be empty.
template <typename Item>
-SortedItems<Item>::iterator GetLastIter(SortedItems<Item>& cache) {
+typename SortedItems<Item>::iterator GetLastIter(SortedItems<Item>& cache) {
CHECK(!cache.empty());
auto it = cache.end();
return std::prev(it);
@@ -789,9 +789,9 @@ bool DownloadBubbleUpdateService::Remove
}
template <typename Id, typename Item>
-SortedItems<Item>::iterator
+typename SortedItems<Item>::iterator
DownloadBubbleUpdateService::RemoveItemFromCacheByIter(
- SortedItems<Item>::iterator iter,
+ typename SortedItems<Item>::iterator iter,
SortedItems<Item>& cache,
IterMap<Id, Item>& iter_map) {
CHECK(iter != cache.end());
diff -up chromium-113.0.5672.63/chrome/browser/download/bubble/download_bubble_update_service.h.me chromium-113.0.5672.63/chrome/browser/download/bubble/download_bubble_update_service.h
--- chromium-113.0.5672.63/chrome/browser/download/bubble/download_bubble_update_service.h.me 2023-05-03 17:48:14.079551820 +0200
+++ chromium-113.0.5672.63/chrome/browser/download/bubble/download_bubble_update_service.h 2023-05-03 17:49:24.702387180 +0200
@@ -208,8 +208,8 @@ class DownloadBubbleUpdateService
// Removes item if we already have the iterator to it. Returns next iterator.
template <typename Id, typename Item>
- SortedItems<Item>::iterator RemoveItemFromCacheByIter(
- SortedItems<Item>::iterator iter,
+ typename SortedItems<Item>::iterator RemoveItemFromCacheByIter(
+ typename SortedItems<Item>::iterator iter,
SortedItems<Item>& cache,
IterMap<Id, Item>& iter_map);

View file

@ -1,540 +0,0 @@
commit 74e41428503d16ff365bbfa93ca23332ce04215a
Author: Ilya Nikolaevskiy <ilnik@chromium.org>
Date: Wed Apr 5 16:16:22 2023 +0000
Revert "V4L2: media/capture: Use VIDIOC_S_EXT_CTRLS API correctly"
This reverts commit 4301563bdea1766779b5e032d2eb2ff19959fce3.
Reason for revert: Breaks test bot: crbug.com/1430699
Original change's description:
> V4L2: media/capture: Use VIDIOC_S_EXT_CTRLS API correctly
>
> This CL:
> - Uses the `which` struct v4l2_ext_controls field instead of
> the deprecated `ctrl_class` alias field.
> - Prefers the new style value of `V4L2_CTRL_WHICH_CUR_VAL` for that
> field instead of the old style value of the control class ID as long
> as the device supports the new style (detected on run-time).
> - Sets special controls only if they are supported. Trying to set
> an unsupported special control as part of a VIDIOC_S_EXT_CTRLS call
> causes the whole VIDIOC_S_EXT_CTRLS call to fail.
> - Fixes control iteration not to skip over the brightness control.
> - Skips permanently disabled and read-only controls.
> - Enables the corresponding test case.
>
> This fixes VIDIOC_S_EXT_CTRLS to work on new device drivers, too.
>
> API: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/vidioc-g-ext-ctrls.html#c.V4L.v4l2_ext_controls
>
> Bug: 1421739, 732355
> Change-Id: I13593bb647fe664d70a3d8ed8d2789f77397aa40
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4324021
> Commit-Queue: Eero Hakkinen <eero.hakkinen@intel.com>
> Reviewed-by: Tomas Gunnarsson <tommi@chromium.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1116416}
Bug: 1421739, 732355
Change-Id: I291b80009550f0c890b5203060d9283a4074af97
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4401592
Commit-Queue: Tomas Gunnarsson <tommi@chromium.org>
Auto-Submit: Ilya Nikolaevskiy <ilnik@chromium.org>
Reviewed-by: Tomas Gunnarsson <tommi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1126615}
diff --git a/media/capture/video/linux/v4l2_capture_delegate.cc b/media/capture/video/linux/v4l2_capture_delegate.cc
index 7efa2b1c2252c..864111f5c255e 100644
--- a/media/capture/video/linux/v4l2_capture_delegate.cc
+++ b/media/capture/video/linux/v4l2_capture_delegate.cc
@@ -138,6 +138,47 @@ int GetControllingSpecialControl(int control_id) {
return 0;
}
+// Determines if |control_id| is special, i.e. controls another one's state.
+bool IsSpecialControl(int control_id) {
+ switch (control_id) {
+ case V4L2_CID_AUTO_WHITE_BALANCE:
+ case V4L2_CID_EXPOSURE_AUTO:
+ case V4L2_CID_EXPOSURE_AUTO_PRIORITY:
+ case V4L2_CID_FOCUS_AUTO:
+ return true;
+ }
+ return false;
+}
+
+// Determines if |control_id| should be skipped, https://crbug.com/697885.
+#if !defined(V4L2_CID_PAN_SPEED)
+#define V4L2_CID_PAN_SPEED (V4L2_CID_CAMERA_CLASS_BASE + 32)
+#endif
+#if !defined(V4L2_CID_TILT_SPEED)
+#define V4L2_CID_TILT_SPEED (V4L2_CID_CAMERA_CLASS_BASE + 33)
+#endif
+#if !defined(V4L2_CID_PANTILT_CMD)
+#define V4L2_CID_PANTILT_CMD (V4L2_CID_CAMERA_CLASS_BASE + 34)
+#endif
+bool IsBlockedControl(int control_id) {
+ switch (control_id) {
+ case V4L2_CID_PAN_RELATIVE:
+ case V4L2_CID_TILT_RELATIVE:
+ case V4L2_CID_PAN_RESET:
+ case V4L2_CID_TILT_RESET:
+ case V4L2_CID_PAN_ABSOLUTE:
+ case V4L2_CID_TILT_ABSOLUTE:
+ case V4L2_CID_ZOOM_ABSOLUTE:
+ case V4L2_CID_ZOOM_RELATIVE:
+ case V4L2_CID_ZOOM_CONTINUOUS:
+ case V4L2_CID_PAN_SPEED:
+ case V4L2_CID_TILT_SPEED:
+ case V4L2_CID_PANTILT_CMD:
+ return true;
+ }
+ return false;
+}
+
bool IsNonEmptyRange(const mojom::RangePtr& range) {
return range->min < range->max;
}
@@ -211,49 +252,6 @@ std::vector<uint32_t> V4L2CaptureDelegate::GetListOfUsableFourCcs(
return supported_formats;
}
-// Determines if |control_id| is special, i.e. controls another one's state.
-// static
-bool V4L2CaptureDelegate::IsSpecialControl(int control_id) {
- switch (control_id) {
- case V4L2_CID_AUTO_WHITE_BALANCE:
- case V4L2_CID_EXPOSURE_AUTO:
- case V4L2_CID_EXPOSURE_AUTO_PRIORITY:
- case V4L2_CID_FOCUS_AUTO:
- return true;
- }
- return false;
-}
-
-// Determines if |control_id| should be skipped, https://crbug.com/697885.
-#if !defined(V4L2_CID_PAN_SPEED)
-#define V4L2_CID_PAN_SPEED (V4L2_CID_CAMERA_CLASS_BASE + 32)
-#endif
-#if !defined(V4L2_CID_TILT_SPEED)
-#define V4L2_CID_TILT_SPEED (V4L2_CID_CAMERA_CLASS_BASE + 33)
-#endif
-#if !defined(V4L2_CID_PANTILT_CMD)
-#define V4L2_CID_PANTILT_CMD (V4L2_CID_CAMERA_CLASS_BASE + 34)
-#endif
-// static
-bool V4L2CaptureDelegate::IsBlockedControl(int control_id) {
- switch (control_id) {
- case V4L2_CID_PAN_RELATIVE:
- case V4L2_CID_TILT_RELATIVE:
- case V4L2_CID_PAN_RESET:
- case V4L2_CID_TILT_RESET:
- case V4L2_CID_PAN_ABSOLUTE:
- case V4L2_CID_TILT_ABSOLUTE:
- case V4L2_CID_ZOOM_ABSOLUTE:
- case V4L2_CID_ZOOM_RELATIVE:
- case V4L2_CID_ZOOM_CONTINUOUS:
- case V4L2_CID_PAN_SPEED:
- case V4L2_CID_TILT_SPEED:
- case V4L2_CID_PANTILT_CMD:
- return true;
- }
- return false;
-}
-
V4L2CaptureDelegate::V4L2CaptureDelegate(
V4L2CaptureDevice* v4l2,
const VideoCaptureDeviceDescriptor& device_descriptor,
@@ -830,89 +828,100 @@ mojom::RangePtr V4L2CaptureDelegate::RetrieveUserControlRange(int control_id) {
}
void V4L2CaptureDelegate::ResetUserAndCameraControlsToDefault() {
+ // Set V4L2_CID_AUTO_WHITE_BALANCE to false first.
+ v4l2_control auto_white_balance = {};
+ auto_white_balance.id = V4L2_CID_AUTO_WHITE_BALANCE;
+ auto_white_balance.value = false;
+ if (!RunIoctl(VIDIOC_S_CTRL, &auto_white_balance))
+ return;
+
+ std::vector<struct v4l2_ext_control> special_camera_controls;
+ // Set V4L2_CID_EXPOSURE_AUTO to V4L2_EXPOSURE_MANUAL.
+ v4l2_ext_control auto_exposure = {};
+ auto_exposure.id = V4L2_CID_EXPOSURE_AUTO;
+ auto_exposure.value = V4L2_EXPOSURE_MANUAL;
+ special_camera_controls.push_back(auto_exposure);
+ // Set V4L2_CID_EXPOSURE_AUTO_PRIORITY to false.
+ v4l2_ext_control priority_auto_exposure = {};
+ priority_auto_exposure.id = V4L2_CID_EXPOSURE_AUTO_PRIORITY;
+ priority_auto_exposure.value = false;
+ special_camera_controls.push_back(priority_auto_exposure);
+ // Set V4L2_CID_FOCUS_AUTO to false.
+ v4l2_ext_control auto_focus = {};
+ auto_focus.id = V4L2_CID_FOCUS_AUTO;
+ auto_focus.value = false;
+ special_camera_controls.push_back(auto_focus);
+
struct v4l2_ext_controls ext_controls = {};
- ext_controls.which = V4L2_CTRL_WHICH_CUR_VAL;
- ext_controls.count = 0;
- const bool use_modern_s_ext_ctrls =
- DoIoctl(VIDIOC_S_EXT_CTRLS, &ext_controls) == 0;
+ ext_controls.ctrl_class = V4L2_CID_CAMERA_CLASS;
+ ext_controls.count = special_camera_controls.size();
+ ext_controls.controls = special_camera_controls.data();
+ if (DoIoctl(VIDIOC_S_EXT_CTRLS, &ext_controls) < 0)
+ DPLOG(INFO) << "VIDIOC_S_EXT_CTRLS";
for (const auto& control : kControls) {
std::vector<struct v4l2_ext_control> camera_controls;
- std::vector<struct v4l2_ext_control> manual_special_camera_controls;
- std::vector<struct v4l2_ext_control> special_camera_controls;
v4l2_queryctrl range = {};
- // Start right below the base so that the first next retrieved control ID
- // is always the first available control ID within the class even if that
- // control ID is equal to the base (V4L2_CID_BRIGHTNESS equals to
- // V4L2_CID_USER_BASE).
- range.id = (control.control_base - 1) | V4L2_CTRL_FLAG_NEXT_CTRL;
+ range.id = control.control_base | V4L2_CTRL_FLAG_NEXT_CTRL;
while (0 == DoIoctl(VIDIOC_QUERYCTRL, &range)) {
if (V4L2_CTRL_ID2CLASS(range.id) != V4L2_CTRL_ID2CLASS(control.class_id))
break;
-
- v4l2_ext_control ext_control = {};
- ext_control.id = range.id;
- ext_control.value = range.default_value;
-
- // Prepare to query for the next control as `range` is an in-out
- // parameter.
range.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
- if (range.flags & (V4L2_CTRL_FLAG_DISABLED | V4L2_CTRL_FLAG_READ_ONLY)) {
- // Permanently disabled or permanently read-only.
+ if (IsSpecialControl(range.id & ~V4L2_CTRL_FLAG_NEXT_CTRL))
continue;
- }
- if (IsBlockedControl(ext_control.id)) {
+ if (IsBlockedControl(range.id & ~V4L2_CTRL_FLAG_NEXT_CTRL))
continue;
- }
- if (IsSpecialControl(ext_control.id)) {
- special_camera_controls.push_back(ext_control);
- if (ext_control.id == V4L2_CID_EXPOSURE_AUTO) {
- ext_control.value = V4L2_EXPOSURE_MANUAL;
- } else {
- ext_control.value = false; // Not automatic but manual.
- }
- manual_special_camera_controls.push_back(ext_control);
- } else {
- camera_controls.push_back(ext_control);
- }
+ struct v4l2_ext_control ext_control = {};
+ ext_control.id = range.id & ~V4L2_CTRL_FLAG_NEXT_CTRL;
+ ext_control.value = range.default_value;
+ camera_controls.push_back(ext_control);
}
if (!camera_controls.empty()) {
- // Set special controls to manual modes first.
- if (!manual_special_camera_controls.empty()) {
- ext_controls.which =
- use_modern_s_ext_ctrls ? V4L2_CTRL_WHICH_CUR_VAL : control.class_id;
- ext_controls.count = manual_special_camera_controls.size();
- ext_controls.controls = manual_special_camera_controls.data();
- if (DoIoctl(VIDIOC_S_EXT_CTRLS, &ext_controls) < 0) {
- DPLOG(INFO) << "VIDIOC_S_EXT_CTRLS";
- }
- }
-
- // Set non-special controls to the default values.
- ext_controls.which =
- use_modern_s_ext_ctrls ? V4L2_CTRL_WHICH_CUR_VAL : control.class_id;
- ext_controls.count = camera_controls.size();
- ext_controls.controls = camera_controls.data();
- if (DoIoctl(VIDIOC_S_EXT_CTRLS, &ext_controls) < 0) {
- DPLOG(INFO) << "VIDIOC_S_EXT_CTRLS";
- }
- }
-
- // Set special controls to the default values.
- if (!special_camera_controls.empty()) {
- ext_controls.which =
- use_modern_s_ext_ctrls ? V4L2_CTRL_WHICH_CUR_VAL : control.class_id;
- ext_controls.count = special_camera_controls.size();
- ext_controls.controls = special_camera_controls.data();
- if (DoIoctl(VIDIOC_S_EXT_CTRLS, &ext_controls) < 0) {
+ struct v4l2_ext_controls ext_controls2 = {};
+ ext_controls2.ctrl_class = control.class_id;
+ ext_controls2.count = camera_controls.size();
+ ext_controls2.controls = camera_controls.data();
+ if (DoIoctl(VIDIOC_S_EXT_CTRLS, &ext_controls2) < 0)
DPLOG(INFO) << "VIDIOC_S_EXT_CTRLS";
- }
}
}
+
+ // Now set the special flags to the default values
+ v4l2_queryctrl range = {};
+ range.id = V4L2_CID_AUTO_WHITE_BALANCE;
+ DoIoctl(VIDIOC_QUERYCTRL, &range);
+ auto_white_balance.value = range.default_value;
+ DoIoctl(VIDIOC_S_CTRL, &auto_white_balance);
+
+ special_camera_controls.clear();
+ memset(&range, 0, sizeof(range));
+ range.id = V4L2_CID_EXPOSURE_AUTO;
+ DoIoctl(VIDIOC_QUERYCTRL, &range);
+ auto_exposure.value = range.default_value;
+ special_camera_controls.push_back(auto_exposure);
+
+ memset(&range, 0, sizeof(range));
+ range.id = V4L2_CID_EXPOSURE_AUTO_PRIORITY;
+ DoIoctl(VIDIOC_QUERYCTRL, &range);
+ priority_auto_exposure.value = range.default_value;
+ special_camera_controls.push_back(priority_auto_exposure);
+
+ memset(&range, 0, sizeof(range));
+ range.id = V4L2_CID_FOCUS_AUTO;
+ DoIoctl(VIDIOC_QUERYCTRL, &range);
+ auto_focus.value = range.default_value;
+ special_camera_controls.push_back(auto_focus);
+
+ memset(&ext_controls, 0, sizeof(ext_controls));
+ ext_controls.ctrl_class = V4L2_CID_CAMERA_CLASS;
+ ext_controls.count = special_camera_controls.size();
+ ext_controls.controls = special_camera_controls.data();
+ if (DoIoctl(VIDIOC_S_EXT_CTRLS, &ext_controls) < 0)
+ DPLOG(INFO) << "VIDIOC_S_EXT_CTRLS";
}
bool V4L2CaptureDelegate::MapAndQueueBuffer(int index) {
diff --git a/media/capture/video/linux/v4l2_capture_delegate.h b/media/capture/video/linux/v4l2_capture_delegate.h
index 5eaa0cd004b81..c9be3d02f9344 100644
--- a/media/capture/video/linux/v4l2_capture_delegate.h
+++ b/media/capture/video/linux/v4l2_capture_delegate.h
@@ -78,9 +78,6 @@ class CAPTURE_EXPORT V4L2CaptureDelegate final {
base::WeakPtr<V4L2CaptureDelegate> GetWeakPtr();
- static bool IsBlockedControl(int control_id);
- static bool IsSpecialControl(int control_id);
-
private:
friend class V4L2CaptureDelegateTest;
diff --git a/media/capture/video/linux/v4l2_capture_delegate_unittest.cc b/media/capture/video/linux/v4l2_capture_delegate_unittest.cc
index 06046ca45d634..4e6e38bbd5c72 100644
--- a/media/capture/video/linux/v4l2_capture_delegate_unittest.cc
+++ b/media/capture/video/linux/v4l2_capture_delegate_unittest.cc
@@ -35,110 +35,119 @@ static struct {
} const kControls[] = {{V4L2_CID_USER_BASE, V4L2_CID_USER_CLASS},
{V4L2_CID_CAMERA_CLASS_BASE, V4L2_CID_CAMERA_CLASS}};
+// Determines if |control_id| is special, i.e. controls another one's state, or
+// if it should be denied (see https://crbug.com/697885).
+#if !defined(V4L2_CID_PAN_SPEED)
+#define V4L2_CID_PAN_SPEED (V4L2_CID_CAMERA_CLASS_BASE + 32)
+#endif
+#if !defined(V4L2_CID_TILT_SPEED)
+#define V4L2_CID_TILT_SPEED (V4L2_CID_CAMERA_CLASS_BASE + 33)
+#endif
+#if !defined(V4L2_CID_PANTILT_CMD)
+#define V4L2_CID_PANTILT_CMD (V4L2_CID_CAMERA_CLASS_BASE + 34)
+#endif
+static bool IsSpecialOrBlockedControl(int control_id) {
+ switch (control_id) {
+ case V4L2_CID_AUTO_WHITE_BALANCE:
+ case V4L2_CID_EXPOSURE_AUTO:
+ case V4L2_CID_EXPOSURE_AUTO_PRIORITY:
+ case V4L2_CID_FOCUS_AUTO:
+ case V4L2_CID_PAN_RELATIVE:
+ case V4L2_CID_TILT_RELATIVE:
+ case V4L2_CID_PAN_RESET:
+ case V4L2_CID_TILT_RESET:
+ case V4L2_CID_PAN_ABSOLUTE:
+ case V4L2_CID_TILT_ABSOLUTE:
+ case V4L2_CID_ZOOM_ABSOLUTE:
+ case V4L2_CID_ZOOM_RELATIVE:
+ case V4L2_CID_ZOOM_CONTINUOUS:
+ case V4L2_CID_PAN_SPEED:
+ case V4L2_CID_TILT_SPEED:
+ case V4L2_CID_PANTILT_CMD:
+ return true;
+ }
+ return false;
+}
+
static void SetControlsToMaxValues(int device_fd) {
- v4l2_ext_controls ext_controls;
- memset(&ext_controls, 0, sizeof(ext_controls));
- ext_controls.which = V4L2_CTRL_WHICH_CUR_VAL;
- ext_controls.count = 0;
- const bool use_modern_s_ext_ctrls =
- HANDLE_EINTR(ioctl(device_fd, VIDIOC_S_EXT_CTRLS, &ext_controls)) == 0;
+ // Set V4L2_CID_AUTO_WHITE_BALANCE to false first.
+ v4l2_control auto_white_balance = {};
+ auto_white_balance.id = V4L2_CID_AUTO_WHITE_BALANCE;
+ auto_white_balance.value = false;
+ if (HANDLE_EINTR(ioctl(device_fd, VIDIOC_S_CTRL, &auto_white_balance)) < 0)
+ DPLOG(ERROR) << "VIDIOC_S_CTRL";
+
+ std::vector<struct v4l2_ext_control> special_camera_controls;
+ // Set V4L2_CID_EXPOSURE_AUTO to V4L2_EXPOSURE_MANUAL.
+ v4l2_ext_control auto_exposure = {};
+ auto_exposure.id = V4L2_CID_EXPOSURE_AUTO;
+ auto_exposure.value = V4L2_EXPOSURE_MANUAL;
+ special_camera_controls.push_back(auto_exposure);
+ // Set V4L2_CID_EXPOSURE_AUTO_PRIORITY to false.
+ v4l2_ext_control priority_auto_exposure = {};
+ priority_auto_exposure.id = V4L2_CID_EXPOSURE_AUTO_PRIORITY;
+ priority_auto_exposure.value = false;
+ special_camera_controls.push_back(priority_auto_exposure);
+ // Set V4L2_CID_FOCUS_AUTO to false.
+ v4l2_ext_control auto_focus = {};
+ auto_focus.id = V4L2_CID_FOCUS_AUTO;
+ auto_focus.value = false;
+ special_camera_controls.push_back(auto_focus);
+
+ struct v4l2_ext_controls camera_ext_controls = {};
+ camera_ext_controls.ctrl_class = V4L2_CID_CAMERA_CLASS;
+ camera_ext_controls.count = special_camera_controls.size();
+ camera_ext_controls.controls = special_camera_controls.data();
+ if (HANDLE_EINTR(ioctl(device_fd, VIDIOC_S_EXT_CTRLS, &camera_ext_controls)) <
+ 0) {
+ DPLOG(ERROR) << "VIDIOC_S_EXT_CTRLS";
+ }
for (const auto& control : kControls) {
std::vector<struct v4l2_ext_control> camera_controls;
- std::vector<struct v4l2_ext_control> manual_special_camera_controls;
v4l2_queryctrl range = {};
- // Start right below the base so that the first next retrieved control ID
- // is always the first available control ID within the class even if that
- // control ID is equal to the base (V4L2_CID_BRIGHTNESS equals to
- // V4L2_CID_USER_BASE).
- range.id = (control.control_base - 1) | V4L2_CTRL_FLAG_NEXT_CTRL;
+ range.id = control.control_base | V4L2_CTRL_FLAG_NEXT_CTRL;
while (0 == HANDLE_EINTR(ioctl(device_fd, VIDIOC_QUERYCTRL, &range))) {
if (V4L2_CTRL_ID2CLASS(range.id) != V4L2_CTRL_ID2CLASS(control.class_id))
break;
-
- v4l2_ext_control ext_control = {};
- ext_control.id = range.id;
-
- // Prepare to query for the next control as `range` is an in-out
- // parameter.
range.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
- if (range.flags & (V4L2_CTRL_FLAG_DISABLED | V4L2_CTRL_FLAG_READ_ONLY)) {
- // Permanently disabled or permanently read-only.
- continue;
- }
- if (V4L2CaptureDelegate::IsBlockedControl(ext_control.id)) {
+ if (IsSpecialOrBlockedControl(range.id & ~V4L2_CTRL_FLAG_NEXT_CTRL))
continue;
- }
-
- if (V4L2CaptureDelegate::IsSpecialControl(ext_control.id)) {
- if (ext_control.id == V4L2_CID_EXPOSURE_AUTO) {
- ext_control.value = V4L2_EXPOSURE_MANUAL;
- } else {
- ext_control.value = false; // Not automatic but manual.
- }
- manual_special_camera_controls.push_back(ext_control);
- DVLOG(1) << __func__ << " " << range.name << " set to manual";
- } else {
- ext_control.value = range.maximum;
- camera_controls.push_back(ext_control);
- DVLOG(1) << __func__ << " " << range.name << " set to "
- << range.maximum;
- }
- }
+ DVLOG(1) << __func__ << " " << range.name << " set to " << range.maximum;
- // Set special controls to manual modes.
- if (!manual_special_camera_controls.empty()) {
- ext_controls.which =
- use_modern_s_ext_ctrls ? V4L2_CTRL_WHICH_CUR_VAL : control.class_id;
- ext_controls.count = manual_special_camera_controls.size();
- ext_controls.controls = manual_special_camera_controls.data();
- if (HANDLE_EINTR(ioctl(device_fd, VIDIOC_S_EXT_CTRLS, &ext_controls)) <
- 0) {
- DPLOG(ERROR) << "VIDIOC_S_EXT_CTRLS";
- }
+ struct v4l2_ext_control ext_control = {};
+ ext_control.id = range.id & ~V4L2_CTRL_FLAG_NEXT_CTRL;
+ ext_control.value = range.maximum;
+ camera_controls.push_back(ext_control);
}
- // Set non-special controls to maximum values.
if (!camera_controls.empty()) {
- ext_controls.which =
- use_modern_s_ext_ctrls ? V4L2_CTRL_WHICH_CUR_VAL : control.class_id;
+ struct v4l2_ext_controls ext_controls = {};
+ ext_controls.ctrl_class = control.class_id;
ext_controls.count = camera_controls.size();
ext_controls.controls = camera_controls.data();
if (HANDLE_EINTR(ioctl(device_fd, VIDIOC_S_EXT_CTRLS, &ext_controls)) < 0)
DPLOG(ERROR) << "VIDIOC_S_EXT_CTRLS";
}
- // Start right below the base so that the first next retrieved control ID
- // is always the first available control ID within the class even if that
- // control ID is equal to the base (V4L2_CID_BRIGHTNESS equals to
- // V4L2_CID_USER_BASE).
- range.id = (control.control_base - 1) | V4L2_CTRL_FLAG_NEXT_CTRL;
+ range.id = control.control_base | V4L2_CTRL_FLAG_NEXT_CTRL;
while (0 == HANDLE_EINTR(ioctl(device_fd, VIDIOC_QUERYCTRL, &range))) {
if (V4L2_CTRL_ID2CLASS(range.id) != V4L2_CTRL_ID2CLASS(control.class_id))
break;
-
- v4l2_control readback = {};
- readback.id = range.id;
-
- // Prepare to query for the next control as `range` is an in-out
- // parameter.
range.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
- if (range.flags & (V4L2_CTRL_FLAG_DISABLED | V4L2_CTRL_FLAG_READ_ONLY)) {
- // Permanently disabled or permanently read-only.
+ if (IsSpecialOrBlockedControl(range.id & ~V4L2_CTRL_FLAG_NEXT_CTRL))
continue;
- }
- if (V4L2CaptureDelegate::IsBlockedControl(readback.id) ||
- V4L2CaptureDelegate::IsSpecialControl(readback.id)) {
- continue;
- }
+ DVLOG(1) << __func__ << " " << range.name << " set to " << range.maximum;
+ v4l2_control readback = {};
+ readback.id = range.id & ~V4L2_CTRL_FLAG_NEXT_CTRL;
if (HANDLE_EINTR(ioctl(device_fd, VIDIOC_G_CTRL, &readback)) < 0)
DPLOG(ERROR) << range.name << ", failed to be read.";
- EXPECT_EQ(range.maximum, readback.value)
- << " control " << range.name << " didn't set correctly";
+ EXPECT_EQ(range.maximum, readback.value) << " control " << range.name
+ << " didnt set correctly";
}
}
}
@@ -186,7 +195,15 @@ class V4L2CaptureDelegateTest : public ::testing::Test {
} // anonymous namespace
-TEST_F(V4L2CaptureDelegateTest, CreateAndDestroyAndVerifyControls) {
+// Fails on Linux, see crbug/732355
+#if BUILDFLAG(IS_LINUX)
+#define MAYBE_CreateAndDestroyAndVerifyControls \
+ DISABLED_CreateAndDestroyAndVerifyControls
+#else
+#define MAYBE_CreateAndDestroyAndVerifyControls \
+ CreateAndDestroyAndVerifyControls
+#endif
+TEST_F(V4L2CaptureDelegateTest, MAYBE_CreateAndDestroyAndVerifyControls) {
// Check that there is at least a video device, otherwise bail.
const base::FilePath path("/dev/");
base::FileEnumerator enumerator(path, false, base::FileEnumerator::FILES,

View file

@ -1,30 +0,0 @@
diff -up chromium-113.0.5672.63/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc.me chromium-113.0.5672.63/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc
--- chromium-113.0.5672.63/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc.me 2023-05-03 16:30:34.244612573 +0200
+++ chromium-113.0.5672.63/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc 2023-05-03 16:37:36.732278590 +0200
@@ -516,8 +516,11 @@ wtf_size_t NGGridLayoutAlgorithm::BuildG
row_auto_repetitions);
bool has_nested_subgrid = false;
- auto& [grid_items, layout_data, subtree_size] =
- sizing_tree->CreateSizingData();
+
+ auto& workaround_clang_bug = sizing_tree->CreateSizingData();
+ auto& grid_items = workaround_clang_bug.grid_items;
+ auto& layout_data = workaround_clang_bug.layout_data;
+ auto& subtree_size = workaround_clang_bug.subtree_size;
if (!must_ignore_children) {
// Construct grid items that are not subgridded.
@@ -1540,8 +1543,10 @@ void NGGridLayoutAlgorithm::InitializeTr
NGGridSizingTree* sizing_tree) const {
DCHECK(sizing_tree && current_grid_index < sizing_tree->Size());
- auto& [grid_items, layout_data, subtree_size] =
- sizing_tree->At(current_grid_index);
+ auto& workaround_clang_bug = sizing_tree->At(current_grid_index);
+ auto& grid_items = workaround_clang_bug.grid_items;
+ auto& layout_data = workaround_clang_bug.layout_data;
+ auto& subtree_size = workaround_clang_bug.subtree_size;
auto InitAndCacheTrackSizes = [&](GridTrackSizingDirection track_direction) {
InitializeTrackCollection(opt_subgrid_data, track_direction, &layout_data);

View file

@ -0,0 +1,16 @@
diff -up chromium-115.0.5790.32/chrome/browser/first_run/first_run_internal_linux.cc.me chromium-115.0.5790.32/chrome/browser/first_run/first_run_internal_linux.cc
--- chromium-115.0.5790.32/chrome/browser/first_run/first_run_internal_linux.cc.me 2023-06-17 19:43:08.481952671 +0200
+++ chromium-115.0.5790.32/chrome/browser/first_run/first_run_internal_linux.cc 2023-06-17 19:44:26.165349772 +0200
@@ -20,10 +20,8 @@ bool IsOrganicFirstRun() {
base::FilePath InitialPrefsPath() {
// The standard location of the initial prefs is next to the chrome binary.
- base::FilePath dir_exe;
- if (!base::PathService::Get(base::DIR_EXE, &dir_exe)) {
- return base::FilePath();
- }
+ // ...but we patch it to use /etc/chromium
+ base::FilePath dir_exe = base::FilePath("/etc/chromium");
return installer::InitialPreferences::Path(dir_exe);
}

View file

@ -15,8 +15,9 @@ diff -up chromium-108.0.5359.124/chrome/common/chrome_paths.cc.widevine-other-lo
+ cur = base::FilePath(FILE_PATH_LITERAL("/opt/google/chrome/WidevineCdm"));
+ break;
+ }
if (!GetComponentDirectory(&cur))
if (!GetComponentDirectory(&cur)) {
return false;
}
cur = cur.AppendASCII(kWidevineCdmBaseDirectory);
diff -up chromium-108.0.5359.124/third_party/widevine/cdm/BUILD.gn.widevine-other-locations chromium-108.0.5359.124/third_party/widevine/cdm/BUILD.gn
--- chromium-108.0.5359.124/third_party/widevine/cdm/BUILD.gn.widevine-other-locations 2023-01-02 11:10:45.953114153 +0100

View file

@ -0,0 +1,12 @@
diff -up chromium-117.0.5938.132/build/config/arm.gni.me chromium-117.0.5938.132/build/config/arm.gni
--- chromium-117.0.5938.132/build/config/arm.gni.me 2023-09-29 15:37:18.281122162 +0200
+++ chromium-117.0.5938.132/build/config/arm.gni 2023-09-29 15:38:24.855369796 +0200
@@ -140,7 +140,7 @@ if (current_cpu == "arm" || v8_current_c
# target_cpu == "arm64" filters out some cases (e.g. the ChromeOS x64
# MSAN build) where the target platform is x64, but V8 is configured to
# use the arm64 simulator.
- arm_control_flow_integrity = "standard"
+ arm_control_flow_integrity = "pac"
}
}
assert(arm_control_flow_integrity == "none" ||

View file

@ -0,0 +1,12 @@
diff -up chromium-118.0.5993.32/ui/gfx/linux/dmabuf_uapi.h.me chromium-118.0.5993.32/ui/gfx/linux/dmabuf_uapi.h
--- chromium-118.0.5993.32/ui/gfx/linux/dmabuf_uapi.h.me 2023-10-04 22:18:44.259800011 +0200
+++ chromium-118.0.5993.32/ui/gfx/linux/dmabuf_uapi.h 2023-10-04 22:28:17.068756669 +0200
@@ -28,7 +28,7 @@ constexpr unsigned long DMA_BUF_IOCTL_SY
_IOW(DMA_BUF_BASE, 0, struct dma_buf_sync);
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0)
+#if 0
struct dma_buf_export_sync_file {
__u32 flags;
__s32 fd;

View file

@ -0,0 +1,16 @@
fix tab crash with SIGTRAP when opening website like ge.globo.com
author: Than Ngo <than@redhat.com>
diff -up chromium-118.0.5993.70/media/filters/ffmpeg_glue.cc.me chromium-118.0.5993.70/media/filters/ffmpeg_glue.cc
--- chromium-118.0.5993.70/media/filters/ffmpeg_glue.cc.me 2023-10-16 12:52:01.716573884 +0200
+++ chromium-118.0.5993.70/media/filters/ffmpeg_glue.cc 2023-10-16 12:56:03.476075446 +0200
@@ -157,7 +157,7 @@ bool FFmpegGlue::OpenContext(bool is_loc
container_ = container_names::MediaContainerName::kContainerAVI;
// For a successfully opened file, we will get a container we've compiled in.
- CHECK_NE(container_, container_names::MediaContainerName::kContainerUnknown);
+ DCHECK_NE(container_, container_names::MediaContainerName::kContainerUnknown);
LogContainer(is_local_file, container_);
return true;

View file

@ -0,0 +1,24 @@
diff -up chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor.h.me chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor.h
--- chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor.h.me 2024-02-06 08:22:36.013021582 +0100
+++ chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor.h 2024-02-06 08:23:08.281607499 +0100
@@ -77,7 +77,7 @@ class XSLTProcessor final : public Scrip
void reset();
- static void ParseErrorFunc(void* user_data, const xmlError*);
+ static void ParseErrorFunc(void* user_data, xmlError*);
static void GenericErrorFunc(void* user_data, const char* msg, ...);
// Only for libXSLT callbacks
diff -up chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc.me chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
--- chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc.me 2024-02-06 08:14:32.368066214 +0100
+++ chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc 2024-02-06 08:23:08.282607518 +0100
@@ -66,7 +66,7 @@ void XSLTProcessor::GenericErrorFunc(voi
// It would be nice to do something with this error message.
}
-void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) {
+void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) {
FrameConsole* console = static_cast<FrameConsole*>(user_data);
if (!console)
return;

View file

@ -0,0 +1,17 @@
diff -up chromium-122.0.6261.57/build/config/compiler/BUILD.gn.me chromium-122.0.6261.57/build/config/compiler/BUILD.gn
--- chromium-122.0.6261.57/build/config/compiler/BUILD.gn.me 2024-02-23 12:32:11.248584653 +0100
+++ chromium-122.0.6261.57/build/config/compiler/BUILD.gn 2024-02-23 12:45:26.672302958 +0100
@@ -399,6 +399,13 @@ config("compiler") {
}
}
+ if (is_clang) {
+ cflags += [ "-ftrivial-auto-var-init=zero" ]
+ if (!is_ubsan && !is_ubsan_security) {
+ cflags += [ "-fwrapv" ]
+ }
+ }
+
# Linker warnings.
if (fatal_linker_warnings && !is_apple && current_os != "aix" &&
current_os != "zos") {

View file

@ -0,0 +1,12 @@
diff -up chromium-123.0.6312.46/build/config/compiler/BUILD.gn.fstack-protector-strong chromium-123.0.6312.46/build/config/compiler/BUILD.gn
--- chromium-123.0.6312.46/build/config/compiler/BUILD.gn.fstack-protector-strong 2024-03-15 11:46:34.542248116 +0100
+++ chromium-123.0.6312.46/build/config/compiler/BUILD.gn 2024-03-15 11:59:02.970849847 +0100
@@ -382,7 +382,7 @@ config("compiler") {
} else if ((is_posix && !is_chromeos && !is_nacl) || is_fuchsia) {
if (current_os != "aix") {
# Not available on aix.
- cflags += [ "-fstack-protector" ]
+ cflags += [ "-fstack-protector-strong" ]
}
}
}

View file

@ -0,0 +1,13 @@
diff -up chromium-123.0.6312.58/chrome/browser/component_updater/screen_ai_component_installer.cc.me chromium-123.0.6312.58/chrome/browser/component_updater/screen_ai_component_installer.cc
--- chromium-123.0.6312.58/chrome/browser/component_updater/screen_ai_component_installer.cc.me 2024-03-24 10:58:43.033885904 +0100
+++ chromium-123.0.6312.58/chrome/browser/component_updater/screen_ai_component_installer.cc 2024-03-24 11:00:38.861979740 +0100
@@ -143,8 +143,7 @@ void ScreenAIComponentInstallerPolicy::D
void ManageScreenAIComponentRegistration(ComponentUpdateService* cus,
PrefService* local_state) {
if (screen_ai::ScreenAIInstallState::ShouldInstall(local_state)) {
- RegisterScreenAIComponent(cus);
- return;
+ // don't register the screenn ai service
}
// Clean up.

View file

@ -0,0 +1,13 @@
diff -up chromium-124.0.6367.60/base/allocator/partition_allocator/partition_alloc.gni.me chromium-124.0.6367.60/base/allocator/partition_allocator/partition_alloc.gni
--- chromium-124.0.6367.60/base/allocator/partition_allocator/partition_alloc.gni.me 2024-04-18 15:12:34.007397489 +0200
+++ chromium-124.0.6367.60/base/allocator/partition_allocator/partition_alloc.gni 2024-04-18 15:13:06.166051954 +0200
@@ -32,8 +32,7 @@ if (is_nacl) {
# Increases the size of the empty slot span ring.
use_large_empty_slot_span_ring = is_mac
-has_memory_tagging =
- current_cpu == "arm64" && is_clang && !is_asan && (is_linux || is_android)
+has_memory_tagging = false
declare_args() {
# Causes all the allocations to be routed via allocator_shim.cc. Usually,

11
chromium-124-qt6.patch Normal file
View file

@ -0,0 +1,11 @@
diff -up chromium-124.0.6367.155/ui/qt/BUILD.gn.me chromium-124.0.6367.155/ui/qt/BUILD.gn
--- chromium-124.0.6367.155/ui/qt/BUILD.gn.me 2024-05-08 18:15:34.178627040 +0200
+++ chromium-124.0.6367.155/ui/qt/BUILD.gn 2024-05-08 18:29:31.162513709 +0200
@@ -61,6 +61,7 @@ template("qt_shim") {
packages = [
"Qt" + invoker.qt_version + "Core",
"Qt" + invoker.qt_version + "Widgets",
+ "Qt" + invoker.qt_version + "Gui",
]
}

View file

@ -0,0 +1,13 @@
diff -up chromium-127.0.6533.72/sandbox/linux/syscall_broker/broker_process.cc.me chromium-127.0.6533.72/sandbox/linux/syscall_broker/broker_process.cc
--- chromium-127.0.6533.72/sandbox/linux/syscall_broker/broker_process.cc.me 2024-07-30 18:09:59.483141522 +0200
+++ chromium-127.0.6533.72/sandbox/linux/syscall_broker/broker_process.cc 2024-07-30 19:42:47.122708543 +0200
@@ -163,9 +163,6 @@ bool BrokerProcess::IsSyscallBrokerable(
case __NR_stat:
case __NR_lstat:
#endif
-#if defined(__NR_fstatat)
- case __NR_fstatat:
-#endif
#if defined(__NR_fstatat64)
case __NR_fstatat64:
#endif

View file

@ -0,0 +1,15 @@
diff -up chromium-127.0.6533.72/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h.me chromium-127.0.6533.72/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h
--- chromium-127.0.6533.72/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h.me 2024-07-25 23:58:19.751616508 +0200
+++ chromium-127.0.6533.72/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h 2024-07-26 00:01:46.391800969 +0200
@@ -10,9 +10,11 @@
#include "partition_alloc/build_config.h"
#include "partition_alloc/partition_alloc_buildflags.h"
+#if 0
#if PA_BUILDFLAG(IS_ANDROID) || PA_BUILDFLAG(IS_LINUX)
#define HAS_HW_CAPS
#endif
+#endif
#if PA_BUILDFLAG(PA_ARCH_CPU_ARM64) && defined(HAS_HW_CAPS)
#include <asm/hwcap.h>

View file

@ -0,0 +1,21 @@
diff -up chromium-130.0.6723.44/components/media_router/common/providers/cast/channel/enum_table.h.me chromium-130.0.6723.44/components/media_router/common/providers/cast/channel/enum_table.h
--- chromium-130.0.6723.44/components/media_router/common/providers/cast/channel/enum_table.h.me 2024-10-15 09:58:39.571798463 +0200
+++ chromium-130.0.6723.44/components/media_router/common/providers/cast/channel/enum_table.h 2024-10-15 09:59:46.209147226 +0200
@@ -12,7 +12,6 @@
#include <cstdint>
#include <cstring>
-#include <new>
#include <optional>
#include <ostream>
#include <string_view>
@@ -368,7 +367,8 @@ class EnumTable {
private:
#ifdef ARCH_CPU_64_BITS
- alignas(std::hardware_destructive_interference_size)
+ // Align the data on a cache line boundary.
+ alignas(64)
#endif
std::initializer_list<Entry> data_;
bool is_sorted_;

View file

@ -0,0 +1,19 @@
From b9075d0e1f687f9a5cf80a7778bde99cece9fdf7 Mon Sep 17 00:00:00 2001
From: Than Ngo <than@redhat.com>
Date: Sat, 23 Nov 2024 12:33:22 +0100
Subject: [PATCH] Enable qt-ui
diff -up chromium-131.0.6778.85/ui/qt/qt_shim.cc.me chromium-131.0.6778.85/ui/qt/qt_shim.cc
--- chromium-131.0.6778.85/ui/qt/qt_shim.cc.me 2024-11-23 10:04:16.789121846 +0100
+++ chromium-131.0.6778.85/ui/qt/qt_shim.cc 2024-11-23 11:40:02.905064702 +0100
@@ -265,7 +265,7 @@ FontRenderParams QtShim::GetFontRenderPa
FontDescription QtShim::GetFontDescription() const {
QFont font = app_.font();
return {
- .family = String(font.family().toStdString().c_str()),
+ .family = String(font.family().toUtf8().constData()),
.size_pixels = font.pixelSize(),
.size_points = font.pointSize(),
.is_italic = IsStyleItalic(font.style()),

View file

@ -0,0 +1,32 @@
commit 1ab1a14ad97394d384d8dc6de51bb229625e66d6
Author: Benoît Lizé <lizeb@chromium.org>
Date: Mon Sep 16 12:01:14 2024 +0200
[cppgc] Decommit pooled pages by default
This reduces committed memory by a large amount, which matters on
Windows. See the field trial results, which measure committed memory:
https://screenshot.googleplex.com/kEBAScqJSEXuRoy
Bug: chromium:326303884
Change-Id: I619257871bcdb7ed50a71f41af341d0df634428a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5864909
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Auto-Submit: Benoit Lize <lizeb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#96107}
diff --git a/v8/src/flags/flag-definitions.h b/v8/src/flags/flag-definitions.h
index 69946faf5ed..85c4b68612e 100644
--- a/v8/src/flags/flag-definitions.h
+++ b/v8/src/flags/flag-definitions.h
@@ -821,7 +821,7 @@ DEFINE_BOOL(trace_block_coverage, false,
"trace collected block coverage information")
DEFINE_BOOL(trace_protector_invalidation, false,
"trace protector cell invalidations")
-DEFINE_BOOL(decommit_pooled_pages, false,
+DEFINE_BOOL(decommit_pooled_pages, true,
"decommit, rather than discard pooled pages")
#ifdef V8_MINORMS_STRING_SHORTCUTTING

View file

@ -0,0 +1,11 @@
diff -up chromium-132.0.6834.57/build/config/gcc/BUILD.gn.me chromium-132.0.6834.57/build/config/gcc/BUILD.gn
--- chromium-132.0.6834.57/build/config/gcc/BUILD.gn.me 2025-01-01 18:59:29.670002052 +0100
+++ chromium-132.0.6834.57/build/config/gcc/BUILD.gn 2025-01-01 20:51:11.798696436 +0100
@@ -32,7 +32,6 @@ declare_args() {
# See http://gcc.gnu.org/wiki/Visibility
config("symbol_visibility_hidden") {
cflags = [ "-fvisibility=hidden" ]
- rustflags = [ "-Zdefault-visibility=hidden" ]
# Visibility attribute is not supported on AIX.
if (current_os != "aix") {

View file

@ -0,0 +1,12 @@
diff -up chromium-133.0.6943.53/media/filters/ffmpeg_glue.cc.me chromium-133.0.6943.53/media/filters/ffmpeg_glue.cc
--- chromium-133.0.6943.53/media/filters/ffmpeg_glue.cc.me 2025-02-05 13:28:17.782881439 +0100
+++ chromium-133.0.6943.53/media/filters/ffmpeg_glue.cc 2025-02-05 13:33:15.256928027 +0100
@@ -111,7 +111,7 @@ FFmpegGlue::FFmpegGlue(FFmpegURLProtocol
// We don't allow H.264 parsing during demuxing since we have our own parser
// and the ffmpeg one increases memory usage unnecessarily.
- format_context_->flags |= AVFMT_FLAG_NOH264PARSE;
+ // format_context_->flags |= AVFMT_FLAG_NOH264PARSE;
// 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.

View file

@ -0,0 +1,34 @@
diff -up chromium-133.0.6943.98/media/ffmpeg/ffmpeg_common.cc.than chromium-133.0.6943.98/media/ffmpeg/ffmpeg_common.cc
--- chromium-133.0.6943.98/media/ffmpeg/ffmpeg_common.cc.than 2025-02-13 11:59:31.035724118 +0100
+++ chromium-133.0.6943.98/media/ffmpeg/ffmpeg_common.cc 2025-02-14 10:39:07.825746076 +0100
@@ -76,6 +76,8 @@ const char* GetAllowedVideoDecoders() {
void ApplyCodecContextSecuritySettings(AVCodecContext* codec_context) {
// Future versions of ffmpeg may copy the allow list from the format
// context.
+ // Workaround for codec whitelist with system ffmpeg
+#if 0
if (!codec_context->codec_whitelist) {
// Note: FFmpeg will try to free this string, so we must duplicate it.
codec_context->codec_whitelist =
@@ -83,6 +85,7 @@ void ApplyCodecContextSecuritySettings(A
? GetAllowedAudioDecoders()
: GetAllowedVideoDecoders());
}
+#endif
// Note: This is security sensitive. FFmpeg may not always continue safely
// in the presence of errors. See https://crbug.com/379418979
diff -up chromium-133.0.6943.98/media/filters/ffmpeg_glue.cc.than chromium-133.0.6943.98/media/filters/ffmpeg_glue.cc
--- chromium-133.0.6943.98/media/filters/ffmpeg_glue.cc.than 2025-02-14 10:14:13.360398193 +0100
+++ chromium-133.0.6943.98/media/filters/ffmpeg_glue.cc 2025-02-14 10:36:46.762332912 +0100
@@ -131,8 +131,10 @@ FFmpegGlue::FFmpegGlue(FFmpegURLProtocol
// memory usage.
//
// Note: FFmpeg will try to free these strings, so we must duplicate them.
+#if 0
format_context_->codec_whitelist = av_strdup(GetAllowedAudioDecoders());
format_context_->format_whitelist = av_strdup(GetAllowedDemuxers());
+#endif
}
bool FFmpegGlue::OpenContext(bool is_local_file) {

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,13 @@
diff -up chromium-134.0.6998.23/base/containers/to_value_list.h.me chromium-134.0.6998.23/base/containers/to_value_list.h
--- chromium-134.0.6998.23/base/containers/to_value_list.h.me 2025-02-23 22:39:33.369668072 +0100
+++ chromium-134.0.6998.23/base/containers/to_value_list.h 2025-02-23 22:42:42.653990901 +0100
@@ -36,8 +36,7 @@ Value::List ToValueList(Range&& range, P
auto container = Value::List::with_capacity(std::ranges::size(range));
std::ranges::for_each(
std::forward<Range>(range),
- [&]<typename T>(T&& value) { container.Append(std::forward<T>(value)); },
- std::move(proj));
+ [&](auto&& value) { container.Append(std::invoke(proj, std::forward<decltype(*std::ranges::begin(range))>(value))); });
return container;
}

View file

@ -0,0 +1,20 @@
diff -up chromium-136.0.7103.33/third_party/node/node.gni.than chromium-136.0.7103.33/third_party/node/node.gni
--- chromium-136.0.7103.33/third_party/node/node.gni.than 2025-04-21 17:53:06.742517984 +0200
+++ chromium-136.0.7103.33/third_party/node/node.gni 2025-04-21 17:54:05.452645652 +0200
@@ -35,16 +35,5 @@ template("node") {
inputs += [ "//third_party/node/mac/node-darwin-x64/bin/node" ]
}
}
-
- # Automatically add a dependency to ":check_version" to ensure NodeJS is
- # always running the expected version, except when the ':check_version'
- # target itself is running in which case it shouldn't depend on itself.
- if (get_label_info(":" + target_name, "label_no_toolchain") !=
- "//third_party/node:check_version") {
- if (!defined(deps)) {
- deps = []
- }
- deps += [ "//third_party/node:check_version" ]
- }
}
}

View file

@ -0,0 +1,12 @@
diff -up chromium-136.0.7103.48/third_party/rust/chromium_crates_io/vendor/skrifa-0.29.2/src/glyph_name.rs.than chromium-136.0.7103.48/third_party/rust/chromium_crates_io/vendor/skrifa-0.29.2/src/glyph_name.rs
--- chromium-136.0.7103.48/third_party/rust/chromium_crates_io/vendor/skrifa-0.29.2/src/glyph_name.rs.than 2025-04-29 08:36:33.385071420 +0200
+++ chromium-136.0.7103.48/third_party/rust/chromium_crates_io/vendor/skrifa-0.29.2/src/glyph_name.rs 2025-04-29 08:42:21.465525421 +0200
@@ -94,7 +94,7 @@ impl<'a> GlyphNames<'a> {
_ => None,
};
// If name is empty string, synthesize it
- if name.as_ref().is_none_or(|s| s.is_empty()) {
+ if name.is_none() || name.as_ref().map_or(false, |s| s.is_empty()) {
return Some(GlyphName::synthesize(glyph_id));
}
Some(name.unwrap_or_else(|| GlyphName::synthesize(glyph_id)))

View file

@ -0,0 +1,17 @@
diff -up chromium-136.0.7103.48/build/config/compiler/BUILD.gn.than chromium-136.0.7103.48/build/config/compiler/BUILD.gn
--- chromium-136.0.7103.48/build/config/compiler/BUILD.gn.than 2025-04-28 15:44:08.883499599 +0200
+++ chromium-136.0.7103.48/build/config/compiler/BUILD.gn 2025-04-28 15:44:47.624639772 +0200
@@ -622,12 +622,6 @@ config("compiler") {
cflags += [ "-ffp-contract=off" ]
}
- # Enable ELF CREL (see crbug.com/357878242) for all platforms that use ELF
- # (excluding toolchains that use an older version of LLVM).
- if (is_linux && !llvm_android_mainline &&
- default_toolchain != "//build/toolchain/cros:target") {
- cflags += [ "-Wa,--crel,--allow-experimental-crel" ]
- }
}
# C11/C++11 compiler flags setup.
diff -up chromium-136.0.7103.48/tools/licenses/licenses.py.than chromium-136.0.7103.48/tools/licenses/licenses.py

View file

@ -0,0 +1,23 @@
diff -up chromium-138.0.7204.15/third_party/node/node.gni.me chromium-138.0.7204.15/third_party/node/node.gni
--- chromium-138.0.7204.15/third_party/node/node.gni.me 2025-06-03 23:20:09.000000000 +0200
+++ chromium-138.0.7204.15/third_party/node/node.gni 2025-06-09 09:59:21.788545159 +0200
@@ -44,7 +44,6 @@ template("node") {
if (!defined(deps)) {
deps = []
}
- deps += [ "//third_party/node:check_version" ]
}
}
}
diff -up chromium-138.0.7204.15/third_party/node/BUILD.gn.me chromium-138.0.7204.15/third_party/node/BUILD.gn
diff -up chromium-138.0.7204.15/third_party/protobuf/proto_library.gni.me chromium-138.0.7204.15/third_party/protobuf/proto_library.gni
--- chromium-138.0.7204.15/third_party/protobuf/proto_library.gni.me 2025-06-09 11:33:08.279645775 +0200
+++ chromium-138.0.7204.15/third_party/protobuf/proto_library.gni 2025-06-09 12:10:07.040045476 +0200
@@ -562,7 +562,6 @@ template("proto_library") {
_protoc_gen_ts_path,
"//tools/protoc_wrapper/protoc-gen-ts_proto.py",
] + _protoc_gen_ts_runtime_deps
- deps += [ "//third_party/node:check_version" ]
}
if (_generate_with_plugin) {

View file

@ -0,0 +1,158 @@
https://chromium-review.googlesource.com/c/chromium/src/+/6506529
Revert CL rolls ffmpeg for M138 as it breaks the build due to old ffmpeg version on EL9
diff -up chromium-138.0.7204.49/media/ffmpeg/ffmpeg_common.cc.me chromium-138.0.7204.49/media/ffmpeg/ffmpeg_common.cc
--- chromium-138.0.7204.49/media/ffmpeg/ffmpeg_common.cc.me 2025-06-23 23:34:26.000000000 +0200
+++ chromium-138.0.7204.49/media/ffmpeg/ffmpeg_common.cc 2025-06-25 15:13:17.958054182 +0200
@@ -263,22 +263,22 @@ AVCodecID VideoCodecToCodecID(VideoCodec
static VideoCodecProfile ProfileIDToVideoCodecProfile(int profile) {
// Clear out the CONSTRAINED & INTRA flags which are strict subsets of the
// corresponding profiles with which they're used.
- profile &= ~AV_PROFILE_H264_CONSTRAINED;
- profile &= ~AV_PROFILE_H264_INTRA;
+ profile &= ~FF_PROFILE_H264_CONSTRAINED;
+ profile &= ~FF_PROFILE_H264_INTRA;
switch (profile) {
- case AV_PROFILE_H264_BASELINE:
+ case FF_PROFILE_H264_BASELINE:
return H264PROFILE_BASELINE;
- case AV_PROFILE_H264_MAIN:
+ case FF_PROFILE_H264_MAIN:
return H264PROFILE_MAIN;
- case AV_PROFILE_H264_EXTENDED:
+ case FF_PROFILE_H264_EXTENDED:
return H264PROFILE_EXTENDED;
- case AV_PROFILE_H264_HIGH:
+ case FF_PROFILE_H264_HIGH:
return H264PROFILE_HIGH;
- case AV_PROFILE_H264_HIGH_10:
+ case FF_PROFILE_H264_HIGH_10:
return H264PROFILE_HIGH10PROFILE;
- case AV_PROFILE_H264_HIGH_422:
+ case FF_PROFILE_H264_HIGH_422:
return H264PROFILE_HIGH422PROFILE;
- case AV_PROFILE_H264_HIGH_444_PREDICTIVE:
+ case FF_PROFILE_H264_HIGH_444_PREDICTIVE:
return H264PROFILE_HIGH444PREDICTIVEPROFILE;
default:
DVLOG(1) << "Unknown profile id: " << profile;
@@ -289,23 +289,23 @@ static VideoCodecProfile ProfileIDToVide
static int VideoCodecProfileToProfileID(VideoCodecProfile profile) {
switch (profile) {
case H264PROFILE_BASELINE:
- return AV_PROFILE_H264_BASELINE;
+ return FF_PROFILE_H264_BASELINE;
case H264PROFILE_MAIN:
- return AV_PROFILE_H264_MAIN;
+ return FF_PROFILE_H264_MAIN;
case H264PROFILE_EXTENDED:
- return AV_PROFILE_H264_EXTENDED;
+ return FF_PROFILE_H264_EXTENDED;
case H264PROFILE_HIGH:
- return AV_PROFILE_H264_HIGH;
+ return FF_PROFILE_H264_HIGH;
case H264PROFILE_HIGH10PROFILE:
- return AV_PROFILE_H264_HIGH_10;
+ return FF_PROFILE_H264_HIGH_10;
case H264PROFILE_HIGH422PROFILE:
- return AV_PROFILE_H264_HIGH_422;
+ return FF_PROFILE_H264_HIGH_422;
case H264PROFILE_HIGH444PREDICTIVEPROFILE:
- return AV_PROFILE_H264_HIGH_444_PREDICTIVE;
+ return FF_PROFILE_H264_HIGH_444_PREDICTIVE;
default:
DVLOG(1) << "Unknown VideoCodecProfile: " << profile;
}
- return AV_PROFILE_UNKNOWN;
+ return FF_PROFILE_UNKNOWN;
}
SampleFormat AVSampleFormatToSampleFormat(AVSampleFormat sample_format,
@@ -441,7 +441,7 @@ bool AVCodecContextToAudioDecoderConfig(
// TODO(dalecurtis): Just use the profile from the codec context if ffmpeg
// ever starts supporting xHE-AAC.
// FFmpeg provides the (defined_profile - 1) for AVCodecContext::profile
- if (codec_context->profile == AV_PROFILE_UNKNOWN ||
+ if (codec_context->profile == FF_PROFILE_UNKNOWN ||
codec_context->profile == mp4::AAC::kXHeAAcType - 1) {
// Errors aren't fatal here, so just drop any MediaLog messages.
NullMediaLog media_log;
@@ -659,16 +659,16 @@ bool AVStreamToVideoDecoderConfig(const
break;
case VideoCodec::kVP9:
switch (codec_context->profile) {
- case AV_PROFILE_VP9_0:
+ case FF_PROFILE_VP9_0:
profile = VP9PROFILE_PROFILE0;
break;
- case AV_PROFILE_VP9_1:
+ case FF_PROFILE_VP9_1:
profile = VP9PROFILE_PROFILE1;
break;
- case AV_PROFILE_VP9_2:
+ case FF_PROFILE_VP9_2:
profile = VP9PROFILE_PROFILE2;
break;
- case AV_PROFILE_VP9_3:
+ case FF_PROFILE_VP9_3:
profile = VP9PROFILE_PROFILE3;
break;
default:
diff -up chromium-138.0.7204.49/media/filters/ffmpeg_aac_bitstream_converter.cc.me chromium-138.0.7204.49/media/filters/ffmpeg_aac_bitstream_converter.cc
--- chromium-138.0.7204.49/media/filters/ffmpeg_aac_bitstream_converter.cc.me 2025-06-23 23:34:26.000000000 +0200
+++ chromium-138.0.7204.49/media/filters/ffmpeg_aac_bitstream_converter.cc 2025-06-25 15:13:17.958541707 +0200
@@ -68,17 +68,17 @@ bool GenerateAdtsHeader(int codec,
hdr[1] |= 1;
switch (audio_profile) {
- case AV_PROFILE_AAC_MAIN:
+ case FF_PROFILE_AAC_MAIN:
break;
- case AV_PROFILE_AAC_HE:
- case AV_PROFILE_AAC_HE_V2:
- case AV_PROFILE_AAC_LOW:
+ case FF_PROFILE_AAC_HE:
+ case FF_PROFILE_AAC_HE_V2:
+ case FF_PROFILE_AAC_LOW:
hdr[2] |= (1 << 6);
break;
- case AV_PROFILE_AAC_SSR:
+ case FF_PROFILE_AAC_SSR:
hdr[2] |= (2 << 6);
break;
- case AV_PROFILE_AAC_LTP:
+ case FF_PROFILE_AAC_LTP:
hdr[2] |= (3 << 6);
break;
default:
diff -up chromium-138.0.7204.49/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc.me chromium-138.0.7204.49/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc
--- chromium-138.0.7204.49/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc.me 2025-06-23 23:34:26.000000000 +0200
+++ chromium-138.0.7204.49/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc 2025-06-25 15:13:17.958839001 +0200
@@ -41,7 +41,7 @@ class FFmpegAACBitstreamConverterTest :
// Set up reasonable aac parameters
memset(&test_parameters_, 0, sizeof(AVCodecParameters));
test_parameters_.codec_id = AV_CODEC_ID_AAC;
- test_parameters_.profile = AV_PROFILE_AAC_MAIN;
+ test_parameters_.profile = FF_PROFILE_AAC_MAIN;
test_parameters_.ch_layout.nb_channels = 2;
test_parameters_.extradata = extradata_header_;
test_parameters_.extradata_size = sizeof(extradata_header_);
@@ -131,7 +131,7 @@ TEST_F(FFmpegAACBitstreamConverterTest,
EXPECT_EQ(profile, kAacMainProfile);
- test_parameters_.profile = AV_PROFILE_AAC_HE;
+ test_parameters_.profile = FF_PROFILE_AAC_HE;
FFmpegAACBitstreamConverter converter_he(&test_parameters_);
test_packet = ScopedAVPacket::Allocate();
@@ -143,7 +143,7 @@ TEST_F(FFmpegAACBitstreamConverterTest,
EXPECT_EQ(profile, kAacLowComplexityProfile);
- test_parameters_.profile = AV_PROFILE_AAC_ELD;
+ test_parameters_.profile = FF_PROFILE_AAC_ELD;
FFmpegAACBitstreamConverter converter_eld(&test_parameters_);
test_packet = ScopedAVPacket::Allocate();

View file

@ -0,0 +1,13 @@
diff -up chromium-139.0.7258.127/build/rust/cargo_crate.gni.than chromium-139.0.7258.127/build/rust/cargo_crate.gni
--- chromium-139.0.7258.127/build/rust/cargo_crate.gni.than 2025-08-14 09:44:51.783560032 +0200
+++ chromium-139.0.7258.127/build/rust/cargo_crate.gni 2025-08-14 09:48:37.407051268 +0200
@@ -310,6 +310,9 @@ template("cargo_crate") {
rustflags +=
[ "-Awarnings" ] # Suppress other warnings in 3rd-party crates.
+ rustflags +=
+ [ "--cap-lints=warn" ] # Suppress other warnings, causes FTBFS in Fedora build rhbz#2387446
+
if (!defined(build_native_rust_unit_tests)) {
build_native_rust_unit_tests = _crate_type != "proc-macro"
}

View file

@ -0,0 +1,16 @@
Fix ftbfs
v8/include/cppgc/visitor.h:440:19: error: invalid application of 'sizeof' to an incomplete type 'blink::CSSStyleSheet'
440 | static_assert(sizeof(T), "Pointee type must be fully defined.");
diff -up chromium-141.0.7390.37/third_party/blink/renderer/bindings/scripts/bind_gen/observable_array.py.ftbfs-csss_style_sheet chromium-141.0.7390.37/third_party/blink/renderer/bindings/scripts/bind_gen/observable_array.py
--- chromium-141.0.7390.37/third_party/blink/renderer/bindings/scripts/bind_gen/observable_array.py.ftbfs-csss_style_sheet 2025-09-23 22:21:14.000000000 +0200
+++ chromium-141.0.7390.37/third_party/blink/renderer/bindings/scripts/bind_gen/observable_array.py 2025-10-01 17:55:51.303926035 +0200
@@ -433,6 +433,7 @@ def generate_observable_array(observable
header_node.accumulator.add_include_headers([
component_export_header(api_component, for_testing),
"third_party/blink/renderer/bindings/core/v8/idl_types.h",
+ "third_party/blink/renderer/core/css/css_style_sheet.h",
"third_party/blink/renderer/platform/bindings/observable_array.h",
])
source_node.accumulator.add_include_headers([

View file

@ -0,0 +1,29 @@
Fix FTBFS
/usr/include/bits/siginfo-consts.h:219:3: error: expected identifier
219 | SYS_SECCOMP = 1, /* Seccomp triggered. */
| ^
../../sandbox/linux/system_headers/linux_seccomp.h:220:39: note: expanded from macro 'SYS_SECCOMP'
220 | #define SYS_SECCOMP 1
| ^
../../sandbox/linux/seccomp-bpf/trap.cc:159:46: error: use of undeclared identifier 'SYS_SECCOMP'
159 | if (nr != LINUX_SIGSYS || info->si_code != SYS_SECCOMP || !ctx ||
| ^~~~~~~~~~~
/usr/include/bits/siginfo-consts.h:220:23: note: expanded from macro 'SYS_SECCOMP'
220 | # define SYS_SECCOMP SYS_SECCOMP
diff -up chromium-141.0.7390.122/sandbox/linux/system_headers/linux_seccomp.h.me chromium-141.0.7390.122/sandbox/linux/system_headers/linux_seccomp.h
--- chromium-141.0.7390.122/sandbox/linux/system_headers/linux_seccomp.h.me 2025-10-28 10:05:44.970248151 +0100
+++ chromium-141.0.7390.122/sandbox/linux/system_headers/linux_seccomp.h 2025-10-28 10:05:52.291345772 +0100
@@ -214,8 +214,11 @@ struct seccomp_notif_addfd {
#define SECCOMP_RET_INVALID 0x00010000U // Illegal return value
#endif
+// check glibc version < 2.42
+#if (__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 42)
#ifndef SYS_SECCOMP
#define SYS_SECCOMP 1
#endif
+#endif
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SECCOMP_H_

View file

@ -0,0 +1,28 @@
Fix FTBFS
../../build/modules/linux-x64/module.modulemap:11:12: error: header '../../linux/debian_bullseye_amd64-sysroot/usr/include/alloca.h' not found
11 | header "../../linux/debian_bullseye_amd64-sysroot/usr/include/alloca.h"
| ^
1 error generated
diff -up chromium-141.0.7390.37/build/config/BUILDCONFIG.gn.me chromium-141.0.7390.37/build/config/BUILDCONFIG.gn
--- chromium-141.0.7390.37/build/config/BUILDCONFIG.gn.me 2025-10-01 17:39:47.242174153 +0200
+++ chromium-141.0.7390.37/build/config/BUILDCONFIG.gn 2025-10-01 17:49:54.736578295 +0200
@@ -557,6 +557,8 @@ foreach(_target_type,
]) {
template(_target_type) {
target(_target_type, target_name) {
+ use_libcxx_modules = false
+
forward_variables_from(invoker, "*", TESTONLY_AND_VISIBILITY)
forward_variables_from(invoker, TESTONLY_AND_VISIBILITY)
if (!defined(inputs)) {
@@ -660,6 +662,8 @@ foreach(_target_type,
# TODO(crbug.com/326584510): Reclient doesn't respect this variable, see
# rbe_bug_326584510_missing_inputs in //build/config/clang/clang.gni
_uses_cflags = false
+ use_libcxx_modules = false
+
if (defined(sources)) {
foreach(f, sources) {
if (string_replace(f + ".END", ".cc.END", "") != f + ".END" ||

View file

@ -0,0 +1,13 @@
diff -up chromium-142.0.7444.52/build/config/compiler/BUILD.gn.clang++-unsupported-argument chromium-142.0.7444.52/build/config/compiler/BUILD.gn
--- chromium-142.0.7444.52/build/config/compiler/BUILD.gn.clang++-unsupported-argument 2025-10-28 19:41:59.131433882 +0100
+++ chromium-142.0.7444.52/build/config/compiler/BUILD.gn 2025-10-28 19:42:51.792779638 +0100
@@ -2160,9 +2160,6 @@ config("default_warnings") {
# TODO(crbug.com/40284799): Fix and re-enable.
"-Wno-thread-safety-reference-return",
- # TODO(crbug.com/376641662): Fix and re-enable.
- "-Wno-nontrivial-memcall",
-
# TODO(crbug.com/432275627): Fix and re-enable.
"-Wno-uninitialized-const-pointer",
]

View file

@ -0,0 +1,24 @@
Workaround for FTBFS
error: cannot find attribute `sanitize` in this scope
--> ../../third_party/crabbyavif/src/src/capi/io.rs:210:41
|
210 | #[cfg_attr(feature = "disable_cfi", sanitize(cfi = "off"))]
diff -up chromium-142.0.7444.52/third_party/crabbyavif/BUILD.gn.me chromium-142.0.7444.52/third_party/crabbyavif/BUILD.gn
--- chromium-142.0.7444.52/third_party/crabbyavif/BUILD.gn.me 2025-10-27 10:40:59.373768499 +0100
+++ chromium-142.0.7444.52/third_party/crabbyavif/BUILD.gn 2025-10-27 10:45:12.142749942 +0100
@@ -197,12 +197,11 @@ rust_static_library("crabbyavif") {
"dav1d",
"libyuv",
"capi",
- "disable_cfi",
]
# Required for disable_cfi feature.
configs -= [ "//build/config/compiler:disallow_unstable_features" ]
- rustflags = [ "-Zallow-features=sanitize" ]
+ rustflags = [ "-Zallow-features=no_sanitize" ]
public_deps = [ ":header_files" ]
deps = [

View file

@ -0,0 +1,136 @@
diff -up chromium-142.0.7444.59/media/ffmpeg/ffmpeg_common.cc.el9-ffmpeg-5.1.x chromium-142.0.7444.59/media/ffmpeg/ffmpeg_common.cc
--- chromium-142.0.7444.59/media/ffmpeg/ffmpeg_common.cc.el9-ffmpeg-5.1.x 2025-11-01 22:14:10.116779876 +0100
+++ chromium-142.0.7444.59/media/ffmpeg/ffmpeg_common.cc 2025-11-01 22:14:10.134140132 +0100
@@ -800,8 +803,13 @@ bool AVStreamToVideoDecoderConfig(const
}
VideoTransformation video_transformation = VideoTransformation();
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(60, 31, 102)
+ for (int i = 0; i < stream->nb_side_data; i++) {
+ const auto& side_data = stream->side_data[i];
+#else
for (const auto& side_data :
AVCodecParametersCodedSideToSpan(stream->codecpar)) {
+#endif
switch (side_data.type) {
case AV_PKT_DATA_DISPLAYMATRIX: {
CHECK_EQ(side_data.size, sizeof(int32_t) * 3 * 3);
diff -up chromium-142.0.7444.59/media/ffmpeg/ffmpeg_common.h.el9-ffmpeg-5.1.x chromium-142.0.7444.59/media/ffmpeg/ffmpeg_common.h
--- chromium-142.0.7444.59/media/ffmpeg/ffmpeg_common.h.el9-ffmpeg-5.1.x 2025-10-24 18:42:30.000000000 +0200
+++ chromium-142.0.7444.59/media/ffmpeg/ffmpeg_common.h 2025-11-02 08:06:48.997329630 +0100
@@ -111,9 +111,13 @@ inline base::span<AVPacketSideData> AVCo
// https://ffmpeg.org/doxygen/trunk/structAVCodecParameters.html#a29643cfd94231e2d148a5d17b08d115b
// ffmpeg documentation: `nb_coded_side_data` is the amount of entries in
// `coded_side_data`.
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(60, 31, 102)
return UNSAFE_BUFFERS(
base::span(codecpar->coded_side_data,
base::checked_cast<size_t>(codecpar->nb_coded_side_data)));
+#else
+ return base::span<AVPacketSideData>();
+#endif
}
// Converts an int64_t timestamp in |time_base| units to a base::TimeDelta.
diff -up chromium-142.0.7444.59/media/filters/audio_video_metadata_extractor.cc.el9-ffmpeg-5.1.x chromium-142.0.7444.59/media/filters/audio_video_metadata_extractor.cc
--- chromium-142.0.7444.59/media/filters/audio_video_metadata_extractor.cc.el9-ffmpeg-5.1.x 2025-10-24 18:42:30.000000000 +0200
+++ chromium-142.0.7444.59/media/filters/audio_video_metadata_extractor.cc 2025-11-01 22:14:10.124748634 +0100
@@ -109,17 +109,33 @@ bool AudioVideoMetadataExtractor::Extrac
container_info.type = format_context->iformat->name;
ExtractDictionary(format_context->metadata, &container_info.tags);
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(60, 31, 102)
+ for (unsigned int i = 0; i < format_context->nb_streams; ++i) {
+ stream_infos_.push_back(StreamInfo());
+#else
base::span<AVStream*> format_context_span =
AVFormatContextToSpan(format_context);
std::ranges::for_each(format_context_span, [&](AVStream* stream) {
stream_infos_.emplace_back();
+#endif
StreamInfo& info = stream_infos_.back();
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(60, 31, 102)
+ AVStream* stream = format_context->streams[i];
+ if (!stream)
+ continue;
+#else
if (!stream) {
return;
}
+#endif
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(60, 31, 102)
+ for (int j = 0; j < stream->nb_side_data; j++) {
+ const AVPacketSideData& sd = stream->side_data[j];
+#else
for (const auto& sd : AVCodecParametersCodedSideToSpan(stream->codecpar)) {
+#endif
if (sd.type == AV_PKT_DATA_DISPLAYMATRIX) {
CHECK_EQ(sd.size, sizeof(int32_t) * 3 * 3);
rotation_ = VideoTransformation::FromFFmpegDisplayMatrix(
@@ -135,7 +151,11 @@ bool AudioVideoMetadataExtractor::Extrac
ExtractDictionary(stream->metadata, &info.tags);
if (!stream->codecpar) {
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(60, 31, 102)
+ continue;
+#else
return;
+#endif
}
info.type = avcodec_get_name(stream->codecpar->codec_id);
@@ -158,7 +178,11 @@ bool AudioVideoMetadataExtractor::Extrac
reinterpret_cast<const char*>(stream->attached_pic.data),
stream->attached_pic.size);
}
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(60, 31, 102)
+ }
+#else
});
+#endif
extracted_ = true;
return true;
diff -up chromium-142.0.7444.59/media/filters/media_file_checker.cc.el9-ffmpeg-5.1.x chromium-142.0.7444.59/media/filters/media_file_checker.cc
--- chromium-142.0.7444.59/media/filters/media_file_checker.cc.el9-ffmpeg-5.1.x 2025-10-24 18:42:30.000000000 +0200
+++ chromium-142.0.7444.59/media/filters/media_file_checker.cc 2025-11-01 22:14:10.125099595 +0100
@@ -64,6 +64,10 @@ bool MediaFileChecker::Start(base::TimeD
// Remember the codec context for any decodable audio or video streams.
bool found_streams = false;
std::vector<Decoder> stream_contexts(format_context->nb_streams);
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(60, 31, 102)
+ for (size_t i = 0; i < format_context->nb_streams; ++i) {
+ AVCodecParameters* cp = format_context->streams[i]->codecpar;
+#else
base::span<AVStream*> format_context_span =
AVFormatContextToSpan(format_context);
std::ranges::transform(
@@ -85,9 +89,26 @@ bool MediaFileChecker::Start(base::TimeD
}
}
+#endif
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(60, 31, 102)
+ if (cp->codec_type == AVMEDIA_TYPE_AUDIO ||
+ cp->codec_type == AVMEDIA_TYPE_VIDEO) {
+ auto context = AVStreamToAVCodecContext(format_context->streams[i]);
+ if (!context)
+ continue;
+ 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)};
+ found_streams = true;
+ }
+ }
+ }
+#else
return Decoder{};
});
+#endif
if (!found_streams)
return false;

View file

@ -1,14 +1,16 @@
diff -up chromium-107.0.5304.121/media/filters/audio_file_reader.cc.me chromium-107.0.5304.121/media/filters/audio_file_reader.cc
--- chromium-107.0.5304.121/media/filters/audio_file_reader.cc.me 2022-12-17 08:27:12.204753071 +0100
+++ chromium-107.0.5304.121/media/filters/audio_file_reader.cc 2022-12-17 08:28:40.908211808 +0100
@@ -243,10 +243,10 @@ bool AudioFileReader::OnNewFrame(
Fix FTBFS on EL9 due to old ffmpeg-5.x
diff -up chromium-142.0.7444.59/media/filters/legacy_audio_file_reader.cc.me chromium-142.0.7444.59/media/filters/legacy_audio_file_reader.cc
--- chromium-142.0.7444.59/media/filters/legacy_audio_file_reader.cc.me 2025-11-02 08:20:16.949092776 +0100
+++ chromium-142.0.7444.59/media/filters/legacy_audio_file_reader.cc 2025-11-02 08:22:01.331132435 +0100
@@ -273,10 +273,10 @@ bool LegacyAudioFileReader::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_ == AudioCodec::kAAC && frame->duration) {
+ if (audio_codec_ == AudioCodec::kAAC && frame->pkt_duration) {
const base::TimeDelta pkt_duration = ConvertFromTimeBase(
glue_->format_context()->streams[stream_index_]->time_base,
UNSAFE_TODO(glue_->format_context()->streams[stream_index_])->time_base,
- frame->duration + std::min(static_cast<int64_t>(0), frame->pts));
+ frame->pkt_duration + std::min(static_cast<int64_t>(0), frame->pts));
const base::TimeDelta frame_duration =

View file

@ -0,0 +1,32 @@
commit 069d424e41f42c6f4a4551334eafc7cfaed6e880
Author: Nathan Pratta Teodosio <nathan.teodosio@canonical.com>
Date: Mon Oct 13 02:29:29 2025 -0700
Add missing include for FormFieldData type completeness.
Bug: 450752866
Change-Id: I25b2d6cd627063e006014289de68d2ecc70a2db7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7030724
Reviewed-by: Christoph Schwering <schwering@google.com>
Reviewed-by: Jihad Hanna <jihadghanna@google.com>
Commit-Queue: Jihad Hanna <jihadghanna@google.com>
Reviewed-by: Matthias Körber <koerber@google.com>
Cr-Commit-Position: refs/heads/main@{#1528799}
diff --git a/components/autofill/core/browser/form_parsing/autofill_scanner.h b/components/autofill/core/browser/form_parsing/autofill_scanner.h
index 844526a5f77..eab073266e8 100644
--- a/components/autofill/core/browser/form_parsing/autofill_scanner.h
+++ b/components/autofill/core/browser/form_parsing/autofill_scanner.h
@@ -10,11 +10,10 @@
#include "base/compiler_specific.h"
#include "base/containers/span.h"
#include "base/memory/raw_span.h"
+#include "components/autofill/core/common/form_field_data.h"
namespace autofill {
-class FormFieldData;
-
// A helper class for parsing a stream of |FormFieldData|'s with lookahead.
class AutofillScanner {
private:

View file

@ -0,0 +1,26 @@
diff -up chromium-142.0.7444.52/build/config/compiler/BUILD.gn.split-threshold-for-reg-with-hint chromium-142.0.7444.52/build/config/compiler/BUILD.gn
--- chromium-142.0.7444.52/build/config/compiler/BUILD.gn.split-threshold-for-reg-with-hint 2025-10-28 19:31:53.885979941 +0100
+++ chromium-142.0.7444.52/build/config/compiler/BUILD.gn 2025-10-28 19:39:50.279574752 +0100
@@ -680,22 +680,6 @@ config("compiler") {
}
}
- # TODO(crbug.com/40283598): This causes binary size growth and potentially
- # other problems.
- if (default_toolchain != "//build/toolchain/cros:target") {
- cflags += [
- "-mllvm",
- "-split-threshold-for-reg-with-hint=0",
- ]
- if (use_thin_lto && is_a_target_toolchain) {
- if (is_win) {
- ldflags += [ "-mllvm:-split-threshold-for-reg-with-hint=0" ]
- } else {
- ldflags += [ "-Wl,-mllvm,-split-threshold-for-reg-with-hint=0" ]
- }
- }
- }
-
# TODO(crbug.com/40192287): Investigate why/if this should be needed.
if (is_win) {
cflags += [ "/clang:-ffp-contract=off" ]

View file

@ -0,0 +1,38 @@
diff -up chromium-142.0.7444.52/net/filter/brotli_source_stream.cc.system-brotli chromium-142.0.7444.52/net/filter/brotli_source_stream.cc
--- chromium-142.0.7444.52/net/filter/brotli_source_stream.cc.system-brotli 2025-10-21 22:19:54.000000000 +0200
+++ chromium-142.0.7444.52/net/filter/brotli_source_stream.cc 2025-10-26 16:55:51.220605842 +0100
@@ -14,8 +14,8 @@
#include "base/metrics/histogram_macros.h"
#include "net/base/io_buffer.h"
#include "net/filter/source_stream_type.h"
-#include "third_party/brotli/include/brotli/decode.h"
-#include "third_party/brotli/include/brotli/shared_dictionary.h"
+#include <brotli/decode.h>
+#include <brotli/shared_dictionary.h>
namespace net {
diff -up chromium-142.0.7444.52/net/ssl/cert_compression.cc.system-brotli chromium-142.0.7444.52/net/ssl/cert_compression.cc
--- chromium-142.0.7444.52/net/ssl/cert_compression.cc.system-brotli 2025-10-21 22:19:54.000000000 +0200
+++ chromium-142.0.7444.52/net/ssl/cert_compression.cc 2025-10-26 16:55:51.220845216 +0100
@@ -9,7 +9,7 @@
#include "third_party/boringssl/src/include/openssl/ssl.h"
#if !defined(NET_DISABLE_BROTLI)
-#include "third_party/brotli/include/brotli/decode.h"
+#include <brotli/decode.h>
#endif
namespace net {
diff -up chromium-142.0.7444.52/ui/base/resource/resource_bundle.cc.system-brotli chromium-142.0.7444.52/ui/base/resource/resource_bundle.cc
--- chromium-142.0.7444.52/ui/base/resource/resource_bundle.cc.system-brotli 2025-10-21 22:19:54.000000000 +0200
+++ chromium-142.0.7444.52/ui/base/resource/resource_bundle.cc 2025-10-26 17:04:17.085726059 +0100
@@ -37,7 +37,7 @@
#include "build/build_config.h"
#include "net/filter/gzip_header.h"
#include "skia/ext/image_operations.h"
-#include "third_party/brotli/include/brotli/decode.h"
+#include <brotli/decode.h>
#include "third_party/skia/include/codec/SkPngRustDecoder.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkColor.h"

View file

@ -0,0 +1,26 @@
Workaround auto darkmode issue, image are not inverted correctly in darkmode
diff -up chromium-143.0.7499.40/third_party/blink/renderer/platform/graphics/dark_mode_image_classifier.cc.than chromium-143.0.7499.40/third_party/blink/renderer/platform/graphics/dark_mode_image_classifier.cc
--- chromium-143.0.7499.40/third_party/blink/renderer/platform/graphics/dark_mode_image_classifier.cc.than 2025-12-09 12:28:52.592092242 +0100
+++ chromium-143.0.7499.40/third_party/blink/renderer/platform/graphics/dark_mode_image_classifier.cc 2025-12-09 12:42:57.776716951 +0100
@@ -276,16 +276,20 @@ DarkModeResult DarkModeImageClassifier::
float high_color_count_threshold =
kHighColorCountThreshold[features.is_colorful];
+#if 0
// Very few colors means it's not a photo, apply the filter.
if (features.color_buckets_ratio < low_color_count_threshold)
return DarkModeResult::kApplyFilter;
+#endif
// Too many colors means it's probably photorealistic, do not apply it.
if (features.color_buckets_ratio > high_color_count_threshold)
return DarkModeResult::kDoNotApplyFilter;
+#if 0
// In-between, decision tree cannot give a precise result.
return DarkModeResult::kNotClassified;
+#endif
}
} // namespace blink

View file

@ -0,0 +1,22 @@
Fix build errors:
error[E0428]: the name `__rust_alloc_error_handler_should_panic_v2` is defined multiple times
--> ../../build/rust/allocator/lib.rs:101:5
error: undefined symbol: __rust_no_alloc_shim_is_unstable
diff -up chromium-141.0.7390.37/build/rust/allocator/lib.rs.rust-no-alloc-shim-is-unstable chromium-141.0.7390.37/build/rust/allocator/lib.rs
--- chromium-141.0.7390.37/build/rust/allocator/lib.rs.rust-no-alloc-shim-is-unstable 2025-09-23 22:21:14.000000000 +0200
+++ chromium-141.0.7390.37/build/rust/allocator/lib.rs 2025-09-27 15:14:54.661952048 +0200
@@ -103,6 +103,11 @@ mod both_allocators {
#[linkage = "weak"]
static __rust_alloc_error_handler_should_panic: u8 = 0;
+ // Mangle the symbol name as rustc (1.84) expects on EL9
+ #[unsafe(no_mangle)]
+ #[linkage = "weak"]
+ static __rust_no_alloc_shim_is_unstable: u8 = 0;
+
// Mangle the symbol name as rustc expects.
#[rustc_std_internal_symbol]
#[allow(non_upper_case_globals)]

View file

@ -0,0 +1,17 @@
diff -up chromium-142.0.7444.162/build/rust/allocator/lib.rs.el9-rust_alloc_error_handler_should_panic chromium-142.0.7444.162/build/rust/allocator/lib.rs
--- chromium-142.0.7444.162/build/rust/allocator/lib.rs.el9-rust_alloc_error_handler_should_panic 2025-11-12 09:39:31.616713829 +0100
+++ chromium-142.0.7444.162/build/rust/allocator/lib.rs 2025-11-14 11:43:32.115426831 +0100
@@ -96,6 +96,13 @@ mod both_allocators {
0
}
+ // Mangle the symbol name as rustc (1.88) expects on EL9
+ #[rustc_std_internal_symbol]
+ #[linkage = "weak"]
+ fn __rust_alloc_error_handler_should_panic() -> u8 {
+ 0
+ }
+
// Mangle the symbol name as rustc (1.84) expects on EL9
#[unsafe(no_mangle)]
#[linkage = "weak"]

View file

@ -0,0 +1,73 @@
Author: <than@redhat.com>
Fix build error caused by python-3.9 on EL9
Traceback (most recent call last):
File "/builddir/build/BUILD/chromium-143.0.7499.40/out/Release/../../tools/metrics/histograms/generate_allowlist_from_histograms_file.py", line 10, in <module>
import extract_histograms
File "/builddir/build/BUILD/chromium-143.0.7499.40/tools/metrics/histograms/extract_histograms.py", line 24, in <module>
import xml_utils
File "/builddir/build/BUILD/chromium-143.0.7499.40/tools/metrics/histograms/../common/xml_utils.py", line 14, in <module>
DomTree = minidom.Element | minidom.Document
TypeError: unsupported operand type(s) for |: 'type' and 'type'
diff -up chromium-143.0.7499.40/tools/metrics/histograms/extract_histograms.py.python-3.9-ftbfs chromium-143.0.7499.40/tools/metrics/histograms/extract_histograms.py
--- chromium-143.0.7499.40/tools/metrics/histograms/extract_histograms.py.python-3.9-ftbfs 2025-11-19 22:40:05.000000000 +0100
+++ chromium-143.0.7499.40/tools/metrics/histograms/extract_histograms.py 2025-12-02 17:23:41.996802101 +0100
@@ -18,6 +18,7 @@ import re
import sys
from typing import TypedDict
import xml.dom.minidom
+from typing import Optional, Union
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'common'))
import xml_utils
@@ -84,7 +85,7 @@ class EnumDict(TypedDict, total=False):
"""A dict representing an enum."""
name: str
- type: str | None
+ type: Optional[str]
buckets: list[_BucketDict]
summary: str
@@ -108,7 +109,7 @@ def ExpandHistogramNameWithSuffixes(
suffix_name: str,
histogram_name: str,
histogram_suffixes_node: xml.dom.minidom.Element,
-) -> tuple[str | None, ExtractionErrors]:
+) -> tuple[Optional[str], ExtractionErrors]:
"""Creates a new histogram name based on a histogram suffix.
Args:
@@ -310,7 +311,7 @@ def _ExtractOwners(node: xml.dom.minidom
def _ExtractImprovementDirection(
histogram_node: xml.dom.minidom.Element,
-) -> tuple[str | None, ExtractionErrors]:
+) -> tuple[Union[str, None], ExtractionErrors]:
"""Extracts improvement direction from the given histogram element, if any.
Args:
@@ -644,7 +645,7 @@ def ExtractVariantsFromXmlTree(
return variants_dict, errors
-def _GetObsoleteReason(node: xml.dom.minidom.Element) -> str | None:
+def _GetObsoleteReason(node: xml.dom.minidom.Element) -> Optional[str]:
"""If the node's histogram is obsolete, returns a string explanation.
Otherwise, returns None.
diff -up chromium-143.0.7499.40/tools/metrics/common/xml_utils.py.than chromium-143.0.7499.40/tools/metrics/common/xml_utils.py
--- chromium-143.0.7499.40/tools/metrics/common/xml_utils.py.than 2025-12-04 17:48:11.924111675 +0100
+++ chromium-143.0.7499.40/tools/metrics/common/xml_utils.py 2025-12-04 17:49:42.451979769 +0100
@@ -11,7 +11,8 @@ from xml.dom import minidom
# The implementation of Node type is possible with extra runtime checks, however
# using a more specific type makes the intent clearer and avoids potential
# warnings about attributes like `tagName` not being present on all Node types.
-DomTree = minidom.Element | minidom.Document
+from typing import Union
+DomTree = Union[minidom.Element, minidom.Document]
_ELEMENT_NODE = minidom.Node.ELEMENT_NODE

View file

@ -0,0 +1,137 @@
commit 4f7637304eca894adf2e70078a55654a88224a30
Author: Lukasz Anforowicz <lukasza@chromium.org>
Date: Tue Sep 30 07:08:03 2025 -0700
[rust png] Reland: Reinforce `testonly`-ness of some users of `libpng`.
This reverts commit 7fa4c2d7ab42a48247ce8e0290cbb7e854990f1e and
effectively relands https://crrev.com/c/6976870. The reland is
attempted after using wildcards to cover extra gni-generated targets.
`Cq-Include-Trybots` directives in the CL description should verify
correctness of the reland. Original CL description follows:
This CL extracts a separate `third_party/libpng:libpng_for_testonly`
target which:
1) Is a `group` that proxies/forwards to the `libpng` target by listing
it as its `public_deps`
2) Has limited visibility (based on the new `libpng_testonly_visibility`
introduced in the refactored `third_party/libpng/visibility.gni`).
The new visibility is almost unchanged, except for explicitly
spelling out some targets instead of using wildcards
3) Is marked as `testonly`
Bug: 443128323
Change-Id: If7ba0d184324a5c662aaf2d52122994ea778d452
Cq-Include-Trybots: luci.chromium.try:ios-catalyst
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6991491
Auto-Submit: Łukasz Anforowicz <lukasza@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1522830}
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index a4703c3692d..2d70f7a5fe9 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -11152,7 +11152,7 @@ if (!is_android) {
"//testing/gtest",
"//third_party/hunspell",
"//third_party/icu",
- "//third_party/libpng",
+ "//third_party/libpng:libpng_for_testonly",
"//ui/base:test_support",
"//ui/events:test_support",
"//ui/ozone",
@@ -11512,7 +11512,7 @@ if (!is_android && !is_chromeos_device) {
"//testing/gtest",
"//third_party/hunspell",
"//third_party/icu",
- "//third_party/libpng",
+ "//third_party/libpng:libpng_for_testonly",
"//ui/base:base_interactive_ui_tests",
"//ui/base:ozone_buildflags",
"//ui/base:test_support",
@@ -12470,7 +12470,7 @@ if (!is_android) {
"//testing/gtest",
"//third_party/hunspell",
"//third_party/icu",
- "//third_party/libpng",
+ "//third_party/libpng:libpng_for_testonly",
"//ui/base:test_support",
"//ui/resources:ui_test_pak",
"//ui/views",
diff --git a/testing/libfuzzer/fuzzers/BUILD.gn b/testing/libfuzzer/fuzzers/BUILD.gn
index 7d242e177f0..1c67eee1598 100644
--- a/testing/libfuzzer/fuzzers/BUILD.gn
+++ b/testing/libfuzzer/fuzzers/BUILD.gn
@@ -104,7 +104,7 @@ fuzzer_test("libpng_progressive_read_fuzzer") {
sources = [ "libpng_read_fuzzer.cc" ]
deps = [
"//base",
- "//third_party/libpng",
+ "//third_party/libpng:libpng_for_testonly",
]
dict = "dicts/png.dict"
seed_corpuses = libpng_seed_corpuses
diff --git a/third_party/libpng/BUILD.gn b/third_party/libpng/BUILD.gn
index d4bdea1e33c..3e31348b94f 100644
--- a/third_party/libpng/BUILD.gn
+++ b/third_party/libpng/BUILD.gn
@@ -130,6 +130,14 @@ if (is_win) {
}
}
+group("libpng_for_testonly") {
+ testonly = true
+ public_deps = [ ":libpng" ]
+
+ visibility = []
+ visibility = libpng_testonly_visibility
+}
+
if (build_with_chromium) {
libpng_ossfuzz_seed_corpuses = [
"//components/test/data/viz",
diff --git a/tools/imagediff/BUILD.gn b/tools/imagediff/BUILD.gn
index d56651bedc7..2b5f3d38488 100644
--- a/tools/imagediff/BUILD.gn
+++ b/tools/imagediff/BUILD.gn
@@ -34,6 +34,7 @@ if (target_os == "win" && host_os != "win") {
# If the current toolchain is the test host toolchain, build the tool.
if (current_toolchain == imagediff_toolchain) {
executable("imagediff") {
+ testonly = true
output_name = "image_diff" # Different than dir name for historical
# reasons.
sources = [
@@ -47,7 +48,7 @@ if (current_toolchain == imagediff_toolchain) {
deps = [
"//base",
"//build/win:default_exe_manifest",
- "//third_party/libpng",
+ "//third_party/libpng:libpng_for_testonly",
"//third_party/zlib",
]
}
@@ -60,6 +61,7 @@ if (current_toolchain == imagediff_toolchain) {
} else if (current_toolchain == default_toolchain &&
default_toolchain != imagediff_toolchain) {
binary_symlink("imagediff") {
+ testonly = true
binary_label = ":$target_name($imagediff_toolchain)"
binary_output_name = "image_diff"
diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn
index f6a40abfe99..83d8f55027a 100644
--- a/ui/gfx/BUILD.gn
+++ b/ui/gfx/BUILD.gn
@@ -906,7 +906,7 @@ test("gfx_unittests") {
"//skia:skcms",
"//testing/gtest",
"//third_party/icu:icuuc",
- "//third_party/libpng",
+ "//third_party/libpng:libpng_for_testonly",
"//third_party/zlib",
"//ui/base",
"//ui/gfx/animation",

View file

@ -0,0 +1,12 @@
diff -up chromium-143.0.7499.40/third_party/swiftshader/src/Reactor/BUILD.gn.llvm-16 chromium-143.0.7499.40/third_party/swiftshader/src/Reactor/BUILD.gn
--- chromium-143.0.7499.40/third_party/swiftshader/src/Reactor/BUILD.gn.llvm-16 2025-12-02 23:25:25.379315827 +0100
+++ chromium-143.0.7499.40/third_party/swiftshader/src/Reactor/BUILD.gn 2025-12-02 23:25:58.697291861 +0100
@@ -307,7 +307,7 @@ if (supports_subzero) {
if (supports_llvm) {
swiftshader_source_set("swiftshader_llvm_reactor") {
- llvm_dir = "../../third_party/llvm-10.0"
+ llvm_dir = "../../third_party/llvm-16.0"
deps = [
":swiftshader_reactor_base",

Some files were not shown because too many files have changed in this diff Show more