Compare commits

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

247 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
171 changed files with 129329 additions and 19439 deletions

8
.gitignore vendored
View file

@ -35,3 +35,11 @@
/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

@ -8,11 +8,11 @@ Subject: [PATCH] Add ppc64 target to libaom
third_party/libaom/cmake_update.sh | 3 +++
2 files changed, 15 insertions(+)
Index: chromium-120.0.6099.71/third_party/libaom/BUILD.gn
Index: chromium-144.0.7559.59/third_party/libaom/BUILD.gn
===================================================================
--- chromium-120.0.6099.71.orig/third_party/libaom/BUILD.gn
+++ chromium-120.0.6099.71/third_party/libaom/BUILD.gn
@@ -248,6 +248,18 @@ if (current_cpu == "arm64") {
--- 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
}
}
@ -31,7 +31,7 @@ Index: chromium-120.0.6099.71/third_party/libaom/BUILD.gn
static_library("libaom") {
check_includes = false
if (!is_debug && is_win) {
@@ -312,6 +324,9 @@ static_library("libaom") {
@@ -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" ]
}
@ -41,17 +41,17 @@ Index: chromium-120.0.6099.71/third_party/libaom/BUILD.gn
if (is_android) {
deps += [ "//third_party/cpu_features:ndk_compat" ]
}
Index: chromium-120.0.6099.71/third_party/libaom/cmake_update.sh
Index: chromium-144.0.7559.59/third_party/libaom/cmake_update.sh
===================================================================
--- chromium-120.0.6099.71.orig/third_party/libaom/cmake_update.sh
+++ chromium-120.0.6099.71/third_party/libaom/cmake_update.sh
@@ -187,6 +187,9 @@ gen_config_files linux/arm64-cpu-detect
"${toolchain}/arm64-linux-gcc.cmake -DCONFIG_RUNTIME_CPU_DETECT=1 \
${all_platforms}"
--- 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/arm64-cpu-detect
cp "${CFG}/linux/arm64-cpu-detect/config"/* \
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

@ -8,20 +8,23 @@ Subject: [PATCH] Force baseline POWER8 / AltiVec / VSX CPU features when on a
BUILD.gn | 6 ++++++
1 file changed, 6 insertions(+)
Index: chromium-120.0.6099.71/v8/BUILD.gn
Index: chromium-144.0.7559.59/v8/BUILD.gn
===================================================================
--- chromium-120.0.6099.71.orig/v8/BUILD.gn
+++ chromium-120.0.6099.71/v8/BUILD.gn
@@ -1340,6 +1340,12 @@ config("toolchain") {
}
if (host_byteorder == "little") {
defines += [ "V8_TARGET_ARCH_PPC_LE" ]
--- 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 (host_byteorder == "big") {
defines += [ "V8_TARGET_ARCH_PPC_BE" ]
if (current_os == "aix") {
+ } else if (current_os == "aix") {
cflags += [
# Work around AIX ceil, trunc and round oddities.
"-mcpu=power5+",

View file

@ -40,21 +40,21 @@ This patch implements support for the PPC64 architecture on Linux hosts.
util/misc/capture_context_test_util_linux.cc | 6 +
36 files changed, 932 insertions(+), 12 deletions(-)
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/CONTRIBUTORS
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/CONTRIBUTORS
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/CONTRIBUTORS
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/CONTRIBUTORS
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/CONTRIBUTORS
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/CONTRIBUTORS
@@ -13,3 +13,5 @@ Mark Mentovai <mark@chromium.org>
Robert Sesek <rsesek@chromium.org>
Scott Graham <scottmg@chromium.org>
Joshua Peraza <jperaza@chromium.org>
+Shawn Anastasio <sanastasio@raptorengineering.com>
+Timothy Pearson <tpearson@raptorengineering.com>
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/minidump_context.h
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_context.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/minidump/minidump_context.h
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/minidump_context.h
@@ -687,6 +687,70 @@ struct MinidumpContextRISCV64 {
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/minidump/minidump_context.h
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_context.h
@@ -686,6 +686,70 @@ struct MinidumpContextRISCV64 {
uint32_t fcsr;
};
@ -125,10 +125,10 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/minidump_co
} // namespace crashpad
#endif // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_H_
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
@@ -110,6 +110,13 @@ MinidumpContextWriter::CreateFromSnapsho
break;
}
@ -143,7 +143,7 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/minidump_co
default: {
LOG(ERROR) << "unknown context architecture "
<< context_snapshot->architecture;
@@ -601,5 +608,48 @@ size_t MinidumpContextRISCV64Writer::Con
@@ -605,5 +612,48 @@ size_t MinidumpContextRISCV64Writer::Con
DCHECK_GE(state(), kStateFrozen);
return sizeof(context_);
}
@ -192,10 +192,10 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/minidump_co
+}
} // namespace crashpad
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
@@ -413,6 +413,49 @@ class MinidumpContextRISCV64Writer final
MinidumpContextRISCV64 context_;
};
@ -246,11 +246,11 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/minidump_co
} // namespace crashpad
#endif // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_WRITER_H_
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/minidump_context_writer_test.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_context_writer_test.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer_test.cc
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/minidump_context_writer_test.cc
@@ -328,6 +328,21 @@ TYPED_TEST(MinidumpContextWriter, RISCV6
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/minidump/minidump_context_writer_test.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_context_writer_test.cc
@@ -322,6 +322,21 @@ TYPED_TEST(MinidumpContextWriter, RISCV6
TypeParam>(context, ExpectMinidumpContextRISCV64, kSeed);
}
@ -272,10 +272,10 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/minidump_co
} // namespace
} // namespace test
} // namespace crashpad
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
@@ -177,6 +177,8 @@ std::string MinidumpMiscInfoDebugBuildSt
static constexpr char kCPU[] = "mips64";
#elif defined(ARCH_CPU_RISCV64)
@ -285,10 +285,10 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/minidump_mi
#else
#error define kCPU for this CPU
#endif
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.cc
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.cc
@@ -297,6 +297,40 @@ void InitializeMinidumpContextRISCV64(Mi
context->fcsr = value++;
}
@ -369,10 +369,10 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/test/minidu
+
} // namespace test
} // namespace crashpad
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.h
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.h
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.h
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.h
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.h
@@ -90,6 +90,9 @@ void ExpectMinidumpContextMIPS64(uint32_
void ExpectMinidumpContextRISCV64(uint32_t expect_seed,
const MinidumpContextRISCV64* observed,
@ -383,11 +383,11 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/minidump/test/minidu
//! \}
} // namespace test
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/capture_memory.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/capture_memory.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/capture_memory.cc
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/capture_memory.cc
@@ -122,6 +122,11 @@ void CaptureMemory::PointedToByContext(c
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/capture_memory.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/capture_memory.cc
@@ -123,6 +123,11 @@ void CaptureMemory::PointedToByContext(c
for (size_t i = 0; i < std::size(context.riscv64->regs); ++i) {
MaybeCaptureMemoryAround(delegate, context.riscv64->regs[i]);
}
@ -399,10 +399,10 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/capture_mem
#else
#error Port.
#endif
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
@@ -47,6 +47,9 @@ enum CPUArchitecture {
//! \brief 64-bit RISC-V.
@ -413,10 +413,10 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/cpu_archite
};
} // namespace crashpad
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/cpu_context.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/cpu_context.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/cpu_context.cc
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/cpu_context.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/cpu_context.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/cpu_context.cc
@@ -173,6 +173,8 @@ uint64_t CPUContext::InstructionPointer(
return arm64->pc;
case kCPUArchitectureRISCV64:
@ -425,8 +425,8 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/cpu_context
+ return ppc64->nip;
default:
NOTREACHED();
return ~0ull;
@@ -191,6 +193,8 @@ uint64_t CPUContext::StackPointer() cons
}
@@ -190,6 +192,8 @@ uint64_t CPUContext::StackPointer() cons
return arm64->sp;
case kCPUArchitectureRISCV64:
return riscv64->regs[1];
@ -434,8 +434,8 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/cpu_context
+ return ppc64->regs[1];
default:
NOTREACHED();
return ~0ull;
@@ -231,6 +235,7 @@ bool CPUContext::Is64Bit() const {
}
@@ -226,6 +230,7 @@ bool CPUContext::Is64Bit() const {
case kCPUArchitectureX86_64:
case kCPUArchitectureARM64:
case kCPUArchitectureMIPS64EL:
@ -443,10 +443,10 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/cpu_context
case kCPUArchitectureRISCV64:
return true;
case kCPUArchitectureX86:
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/cpu_context.h
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/cpu_context.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/cpu_context.h
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/cpu_context.h
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/cpu_context.h
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/cpu_context.h
@@ -371,6 +371,24 @@ struct CPUContextRISCV64 {
uint32_t fcsr;
};
@ -480,10 +480,10 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/cpu_context
};
};
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
@@ -15,6 +15,7 @@
#ifndef CRASHPAD_SNAPSHOT_LINUX_CPU_CONTEXT_LINUX_H_
#define CRASHPAD_SNAPSHOT_LINUX_CPU_CONTEXT_LINUX_H_
@ -571,11 +571,11 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/cpu_c
} // namespace internal
} // namespace crashpad
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/debug_rendezvous_test.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/debug_rendezvous_test.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/linux/debug_rendezvous_test.cc
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/debug_rendezvous_test.cc
@@ -195,12 +195,15 @@ void TestAgainstTarget(PtraceConnection*
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/debug_rendezvous_test.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/debug_rendezvous_test.cc
@@ -194,12 +194,15 @@ void TestAgainstTarget(PtraceConnection*
device == 0 && inode == 0 && mapping_name == "[vdso]";
#if defined(ARCH_CPU_X86)
static constexpr char kPrefix[] = "linux-gate.so.";
@ -592,10 +592,10 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/debug
},
module_mapping->name,
module_mapping->device,
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
@@ -367,6 +367,69 @@ bool ExceptionSnapshotLinux::ReadContext
return internal::ReadContext(reader, context_address, context_.riscv64);
}
@ -666,11 +666,11 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/excep
#endif // ARCH_CPU_X86_FAMILY
bool ExceptionSnapshotLinux::Initialize(
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
@@ -91,6 +91,8 @@ class ExceptionSnapshotLinux final : pub
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
@@ -94,6 +94,8 @@ class ExceptionSnapshotLinux final : pub
CPUContextMIPS64 mips64;
#elif defined(ARCH_CPU_RISCV64)
CPUContextRISCV64 riscv64;
@ -679,10 +679,10 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/excep
#endif
} context_union_;
CPUContext context_;
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux_test.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux_test.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux_test.cc
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux_test.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux_test.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux_test.cc
@@ -325,7 +325,28 @@ void ExpectContext(const CPUContext& act
sizeof(actual.riscv64->fpregs)),
0);
@ -712,10 +712,10 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/excep
#else
#error Port.
#endif
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
@@ -129,6 +129,8 @@ void ProcessReaderLinux::Thread::Initial
: thread_info.thread_context.t32.regs[29];
#elif defined(ARCH_CPU_RISCV64)
@ -725,10 +725,10 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/proce
#else
#error Port.
#endif
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
@@ -456,6 +456,89 @@ static_assert(offsetof(UContext<ContextT
offsetof(ucontext_t, uc_mcontext.__fpregs),
"context offset mismatch");
@ -819,11 +819,11 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/signa
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
@@ -208,6 +208,8 @@ CPUArchitecture SystemSnapshotLinux::Get
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
@@ -229,6 +229,8 @@ CPUArchitecture SystemSnapshotLinux::Get
: kCPUArchitectureMIPSEL;
#elif defined(ARCH_CPU_RISCV64)
return kCPUArchitectureRISCV64;
@ -832,7 +832,7 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/syste
#else
#error port to your architecture
#endif
@@ -226,6 +228,9 @@ uint32_t SystemSnapshotLinux::CPURevisio
@@ -247,6 +249,9 @@ uint32_t SystemSnapshotLinux::CPURevisio
#elif defined(ARCH_CPU_RISCV64)
// Not implemented
return 0;
@ -842,7 +842,7 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/syste
#else
#error port to your architecture
#endif
@@ -249,6 +254,9 @@ std::string SystemSnapshotLinux::CPUVend
@@ -270,6 +275,9 @@ std::string SystemSnapshotLinux::CPUVend
#elif defined(ARCH_CPU_RISCV64)
// Not implemented
return std::string();
@ -852,7 +852,7 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/syste
#else
#error port to your architecture
#endif
@@ -385,6 +393,9 @@ bool SystemSnapshotLinux::NXEnabled() co
@@ -401,6 +409,9 @@ bool SystemSnapshotLinux::NXEnabled() co
#elif defined(ARCH_CPU_RISCV64)
// Not implemented
return false;
@ -862,10 +862,10 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/syste
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
@@ -196,6 +196,14 @@ bool ThreadSnapshotLinux::Initialize(
InitializeCPUContextRISCV64(thread.thread_info.thread_context.t64,
thread.thread_info.float_context.f64,
@ -881,11 +881,11 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/threa
#else
#error Port.
#endif
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
@@ -76,6 +76,8 @@ class ThreadSnapshotLinux final : public
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
@@ -79,6 +79,8 @@ class ThreadSnapshotLinux final : public
CPUContextMIPS64 mips64;
#elif defined(ARCH_CPU_RISCV64)
CPUContextRISCV64 riscv64;
@ -894,10 +894,10 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/linux/threa
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.cc
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.cc
@@ -317,5 +317,38 @@ void InitializeCPUContextRISCV64(CPUCont
riscv64->fcsr = value++;
}
@ -937,10 +937,10 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/test/test_c
+
} // namespace test
} // namespace crashpad
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.h
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.h
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.h
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.h
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/snapshot/test/test_cpu_context.h
@@ -64,6 +64,7 @@ void InitializeCPUContextARM64(CPUContex
void InitializeCPUContextMIPS(CPUContext* context, uint32_t seed);
void InitializeCPUContextMIPS64(CPUContext* context, uint32_t seed);
@ -949,10 +949,10 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/snapshot/test/test_c
//! \}
} // namespace test
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/test/linux/get_tls.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/test/linux/get_tls.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/test/linux/get_tls.cc
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/test/linux/get_tls.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/test/linux/get_tls.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/test/linux/get_tls.cc
@@ -51,6 +51,8 @@ LinuxVMAddress GetTLS() {
: "$3");
#elif defined(ARCH_CPU_RISCV64)
@ -962,10 +962,10 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/test/linux/get_tls.c
#else
#error Port.
#endif // ARCH_CPU_ARMEL
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/test/multiprocess_posix.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/test/multiprocess_posix.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/test/multiprocess_posix.cc
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/test/multiprocess_posix.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/test/multiprocess_posix.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/test/multiprocess_posix.cc
@@ -162,7 +162,8 @@ void Multiprocess::SetExpectedChildTermi
}
@ -976,10 +976,10 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/test/multiprocess_po
SetExpectedChildTermination(kTerminationSignal, SIGTRAP);
#else
SetExpectedChildTermination(kTerminationSignal, SIGILL);
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/util/linux/auxiliary_vector.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/linux/auxiliary_vector.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/util/linux/auxiliary_vector.cc
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/util/linux/auxiliary_vector.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/util/linux/auxiliary_vector.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/util/linux/auxiliary_vector.cc
@@ -56,6 +56,11 @@ bool AuxiliaryVector::Read(PtraceConnect
if (type == AT_IGNORE) {
continue;
@ -992,10 +992,10 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/util/linux/auxiliary
if (!MapInsertOrReplace(&values_, type, value, nullptr)) {
LOG(ERROR) << "duplicate auxv entry";
return false;
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/util/linux/ptracer.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/linux/ptracer.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/util/linux/ptracer.cc
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/util/linux/ptracer.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/util/linux/ptracer.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/util/linux/ptracer.cc
@@ -430,6 +430,64 @@ bool GetThreadArea64(pid_t tid,
return true;
}
@ -1071,10 +1071,10 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/util/linux/ptracer.c
GetThreadArea64(tid,
info->thread_context,
&info->thread_specific_data_address,
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/util/linux/thread_info.h
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/linux/thread_info.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/util/linux/thread_info.h
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/util/linux/thread_info.h
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/util/linux/thread_info.h
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/util/linux/thread_info.h
@@ -34,6 +34,10 @@
#include <asm/ptrace.h>
#endif
@ -1193,10 +1193,10 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/util/linux/thread_in
//! \brief The thread-local storage address for the thread.
LinuxVMAddress thread_specific_data_address;
};
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/util/misc/capture_context.h
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/misc/capture_context.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/util/misc/capture_context.h
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/util/misc/capture_context.h
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/util/misc/capture_context.h
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/util/misc/capture_context.h
@@ -70,6 +70,7 @@ using NativeCPUContext = ucontext_t;
//! Linux | ARM/ARM64 | `r0`/`x0`
//! Linux | MIPS/MIPS64 | `$a0`
@ -1205,10 +1205,10 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/util/misc/capture_co
//!
//! Additionally, the value `LR` on ARM/ARM64 will be the return address of
//! this function.
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/util/misc/capture_context_linux.S
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/misc/capture_context_linux.S
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/util/misc/capture_context_linux.S
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/util/misc/capture_context_linux.S
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/util/misc/capture_context_linux.S
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/util/misc/capture_context_linux.S
@@ -30,7 +30,7 @@
.globl CAPTURECONTEXT_SYMBOL2
#if defined(__i386__) || defined(__x86_64__)
@ -1435,10 +1435,10 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/util/misc/capture_co
#elif defined(__riscv)
#define MCONTEXT_GREGS_OFFSET 176
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/util/misc/capture_context_test.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/misc/capture_context_test.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/util/misc/capture_context_test.cc
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/util/misc/capture_context_test.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/util/misc/capture_context_test.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/util/misc/capture_context_test.cc
@@ -48,7 +48,7 @@ void TestCaptureContext() {
uintptr_t pc = ProgramCounterFromContext(context_1);
@ -1448,10 +1448,10 @@ Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/util/misc/capture_co
// Sanitizers can cause enough code bloat that the “nearby” check would
// likely fail.
const uintptr_t kReferencePC =
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/util/misc/capture_context_test_util_linux.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/misc/capture_context_test_util_linux.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/util/misc/capture_context_test_util_linux.cc
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/util/misc/capture_context_test_util_linux.cc
--- chromium-144.0.7559.59.orig/third_party/crashpad/crashpad/util/misc/capture_context_test_util_linux.cc
+++ chromium-144.0.7559.59/third_party/crashpad/crashpad/util/misc/capture_context_test_util_linux.cc
@@ -38,6 +38,8 @@ void SanityCheckContext(const NativeCPUC
#elif defined(ARCH_CPU_RISCV64)
EXPECT_EQ(context.uc_mcontext.__gregs[10],

View file

@ -54,8 +54,10 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
src/tools/linux/md2core/minidump-2-core.cc | 45 +++++++++++++++
25 files changed, 281 insertions(+), 35 deletions(-)
--- a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
+++ b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
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"
@ -65,8 +67,10 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
#else
#error "This code has not been ported to your platform yet."
#endif
--- a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
+++ b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
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
@ -149,8 +153,10 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
+#endif
+
} // namespace google_breakpad
--- a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
+++ b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
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;
@ -174,8 +180,10 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
};
} // namespace google_breakpad
--- a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
+++ b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
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
@ -225,8 +233,10 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
#endif
} // namespace google_breakpad
--- a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
+++ b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
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,
@ -237,9 +247,11 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
#else
static void FillCPUContext(RawContextCPU* out, const ucontext_t* uc);
#endif
--- a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
+++ b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
@@ -464,6 +464,13 @@ bool ExceptionHandler::HandleSignal(int
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));
}
@ -253,7 +265,7 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
ucontext_t* uc_ptr = (ucontext_t*)uc;
if (uc_ptr->uc_mcontext.fpregs) {
@@ -701,10 +708,18 @@ bool ExceptionHandler::WriteMinidump() {
@@ -704,10 +711,18 @@ bool ExceptionHandler::WriteMinidump() {
}
#endif
@ -273,7 +285,7 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
context.tid = sys_gettid();
// Add an exception stream to the minidump for better reporting.
@@ -725,6 +740,9 @@ bool ExceptionHandler::WriteMinidump() {
@@ -728,6 +743,9 @@ bool ExceptionHandler::WriteMinidump() {
#elif defined(__mips__)
context.siginfo.si_addr =
reinterpret_cast<void*>(context.context.uc_mcontext.pc);
@ -283,9 +295,11 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
#elif defined(__riscv)
context.siginfo.si_addr =
reinterpret_cast<void*>(context.context.uc_mcontext.__gregs[REG_PC]);
--- a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
+++ b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
@@ -200,7 +200,11 @@ class ExceptionHandler {
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;
@ -298,9 +312,11 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
fpstate_t float_state;
#endif
};
--- a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
+++ b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
@@ -321,7 +321,7 @@ TEST(ExceptionHandlerTest, ParallelChild
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 {
@ -309,7 +325,7 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
}
}
@@ -576,6 +576,8 @@ const unsigned char kIllegalInstruction[
@@ -581,6 +581,8 @@ const unsigned char kIllegalInstruction[
#if defined(__mips__)
// mfc2 zero,Impl - usually illegal in userspace.
0x48, 0x00, 0x00, 0x48
@ -318,7 +334,7 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
#else
// This crashes with SIGILL on x86/x86-64/arm.
0xff, 0xff, 0xff, 0xff
@@ -771,10 +773,10 @@ TEST(ExceptionHandlerTest, InstructionPo
@@ -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.
@ -331,20 +347,22 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
const int kOffset = kMemorySize - sizeof(kIllegalInstruction);
const pid_t child = fork();
--- a/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
+++ b/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
@@ -141,7 +141,9 @@ class MicrodumpWriter {
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 : NULL),
: ucontext_(context ? &context->context : nullptr),
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
+#if defined(__powerpc64__)
+ vector_state_(context ? &context->vector_state : NULL),
+ vector_state_(context ? &context->vector_state : nullptr),
+#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
float_state_(context ? &context->float_state : NULL),
float_state_(context ? &context->float_state : nullptr),
#endif
dumper_(dumper),
@@ -348,6 +350,8 @@ class MicrodumpWriter {
@@ -350,6 +352,8 @@ class MicrodumpWriter {
# else
# error "Unexpected __riscv_xlen"
# endif
@ -353,7 +371,7 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
#else
# error "This code has not been ported to your platform yet"
#endif
@@ -420,7 +424,9 @@ class MicrodumpWriter {
@@ -422,7 +426,9 @@ class MicrodumpWriter {
void DumpCPUState() {
RawContextCPU cpu;
my_memset(&cpu, 0, sizeof(RawContextCPU));
@ -364,7 +382,7 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
UContextReader::FillCPUContext(&cpu, ucontext_, float_state_);
#else
UContextReader::FillCPUContext(&cpu, ucontext_);
@@ -616,7 +622,9 @@ class MicrodumpWriter {
@@ -618,7 +624,9 @@ class MicrodumpWriter {
void* Alloc(unsigned bytes) { return dumper_->allocator()->Alloc(bytes); }
const ucontext_t* const ucontext_;
@ -375,9 +393,11 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
const google_breakpad::fpstate_t* const float_state_;
#endif
LinuxDumper* dumper_;
--- a/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
+++ b/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
@@ -282,10 +282,19 @@ TEST(MicrodumpWriterTest, BasicWithMappi
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));
@ -400,8 +420,10 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
#else
ASSERT_NE(std::string::npos,
buf.find("M 00001000 0000002A 00001000 "
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
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*>(
@ -424,9 +446,11 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
# if defined(__ANDROID__)
for (int i = EF_R0; i <= EF_R31; i++)
info.mcontext.gregs[i - EF_R0] = status->pr_reg[i];
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
@@ -770,7 +770,9 @@ bool LinuxDumper::GetStackInfo(const voi
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.
@ -437,8 +461,10 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
const MappingInfo* mapping = FindMapping(stack_pointer);
if (!mapping)
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
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__) || \
@ -449,9 +475,11 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
typedef Elf64_auxv_t elf_aux_entry;
#endif
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
@@ -56,6 +56,8 @@
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"
@ -460,9 +488,11 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
#else
#error This test has not been ported to this platform.
#endif
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
@@ -189,12 +189,12 @@ bool LinuxPtraceDumper::ReadRegisterSet(
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);
@ -477,7 +507,7 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
// 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.
@@ -214,6 +214,15 @@ bool LinuxPtraceDumper::ReadRegisterSet(
@@ -233,6 +233,15 @@ bool LinuxPtraceDumper::ReadRegisterSet(
}
#endif // defined(__arm__)
}
@ -493,7 +523,7 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
return true;
#else
return false;
@@ -378,6 +387,9 @@ bool LinuxPtraceDumper::GetThreadInfoByI
@@ -397,6 +406,9 @@ bool LinuxPtraceDumper::GetThreadInfoByI
#elif defined(__riscv)
stack_pointer = reinterpret_cast<uint8_t*>(
info->mcontext.__gregs[MD_CONTEXT_RISCV_REG_SP]);
@ -503,9 +533,11 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
#else
# error "This code hasn't been ported to your platform yet."
#endif
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
@@ -470,6 +470,9 @@ TEST(LinuxPtraceDumperTest, VerifyStackR
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]);
@ -515,7 +547,7 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
#else
#error This test has not been ported to this platform.
#endif
@@ -569,6 +572,8 @@ TEST_F(LinuxPtraceDumperTest, SanitizeSt
@@ -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];
@ -524,20 +556,22 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
#else
#error This test has not been ported to this platform.
#endif
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
@@ -144,7 +144,9 @@ class MinidumpWriter {
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 : NULL),
ucontext_(context ? &context->context : nullptr),
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
+#if defined(__powerpc64__)
+ vector_state_(context ? &context->vector_state : NULL),
+ vector_state_(context ? &context->vector_state : nullptr),
+#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
float_state_(context ? &context->float_state : NULL),
float_state_(context ? &context->float_state : nullptr),
#endif
dumper_(dumper),
@@ -476,7 +478,9 @@ class MinidumpWriter {
@@ -477,7 +479,9 @@ class MinidumpWriter {
if (!cpu.Allocate())
return false;
my_memset(cpu.get(), 0, sizeof(RawContextCPU));
@ -548,7 +582,7 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
UContextReader::FillCPUContext(cpu.get(), ucontext_, float_state_);
#else
UContextReader::FillCPUContext(cpu.get(), ucontext_);
@@ -953,7 +957,7 @@ class MinidumpWriter {
@@ -954,7 +958,7 @@ class MinidumpWriter {
dirent->location.rva = 0;
}
@ -557,7 +591,7 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
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";
@@ -973,7 +977,9 @@ class MinidumpWriter {
@@ -974,7 +978,9 @@ class MinidumpWriter {
// processor_architecture should always be set, do this first
sys_info->processor_architecture =
@ -568,7 +602,7 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
# if _MIPS_SIM == _ABIO32
MD_CPU_ARCHITECTURE_MIPS;
# elif _MIPS_SIM == _ABI64
@@ -1440,7 +1446,9 @@ class MinidumpWriter {
@@ -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
@ -579,8 +613,10 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
const google_breakpad::fpstate_t* const float_state_; // ditto
#endif
LinuxDumper* dumper_;
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
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__)
@ -590,8 +626,10 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
#elif !defined(__ARM_EABI__) && !defined(__mips__)
typedef std::remove_pointer<fpregset_t>::type fpstate_t;
#endif
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc
+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc
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] =
@ -602,8 +640,10 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
#else
# error "This code has not been ported to your platform yet."
#endif
--- a/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
+++ b/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
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__) || \
@ -614,9 +654,11 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
struct kernel_stat st;
if (sys_fstat(fd, &st) == -1 || st.st_size < 0) {
#else
--- a/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
+++ b/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
@@ -179,9 +179,10 @@ TEST_F(MemoryMappedFileTest, RemapAfterM
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.
@ -630,21 +672,25 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
for (size_t i = 0; i < data1_size; ++i) {
data1[i] = i & 0x7f;
}
--- a/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
+++ b/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
@@ -60,8 +60,9 @@ TEST(PageAllocatorTest, LargeObject) {
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 == NULL);
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 == NULL);
--- a/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc
+++ b/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc
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)
@ -663,7 +709,7 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
#endif
using google_breakpad::MDTypeHelper;
@@ -324,6 +328,9 @@ struct CrashedProcess {
@@ -325,6 +329,9 @@ struct CrashedProcess {
#if defined(__aarch64__)
user_fpsimd_struct fpregs;
#endif
@ -673,7 +719,7 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
uintptr_t stack_addr;
const uint8_t* stack;
size_t stack_length;
@@ -599,6 +606,38 @@ ParseThreadRegisters(CrashedProcess::Thr
@@ -628,6 +635,38 @@ ParseThreadRegisters(CrashedProcess::Thr
#error "Unexpected __riscv_xlen"
#endif
}
@ -712,7 +758,7 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
#else
#error "This code has not been ported to your platform yet"
#endif
@@ -704,6 +743,12 @@ ParseSystemInfo(const Options& options,
@@ -733,6 +772,12 @@ ParseSystemInfo(const Options& options,
# else
# error "Unexpected __riscv_xlen"
# 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")

View file

@ -1,37 +0,0 @@
From b3a14db7637232d30c878cc1f1ad6d8037e81379 Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawn@anastas.io>
Date: Tue, 15 Jan 2019 22:42:21 -0600
Subject: [PATCH] linux/seccomp-bpf: ppc64+glibc workaround in SIGSYS handler
Workaround for an apparent issue with glibc negating syscall
parameters. Observed on a ppc64le machine with glibc.
More investigation required.
---
sandbox/linux/seccomp-bpf/trap.cc | 14 ++++++++++++++
1 file changed, 14 insertions(+)
Index: chromium-120.0.6099.71/sandbox/linux/seccomp-bpf/trap.cc
===================================================================
--- chromium-120.0.6099.71.orig/sandbox/linux/seccomp-bpf/trap.cc
+++ chromium-120.0.6099.71/sandbox/linux/seccomp-bpf/trap.cc
@@ -232,6 +232,20 @@ void Trap::SigSys(int nr, LinuxSigInfo*
SetIsInSigHandler();
}
+#if defined(__powerpc64__)
+ // On ppc64+glibc, some syscalls seem to accidentally negate the first
+ // parameter which causes checks against it to fail. For now, manually
+ // negate them back.
+ // TODO(shawn@anastas.io): investigate this issue further
+ auto nr = SECCOMP_SYSCALL(ctx);
+ if (nr == __NR_openat || nr == __NR_mkdirat || nr == __NR_faccessat || nr == __NR_readlinkat ||
+ nr == __NR_renameat || nr == __NR_renameat2 || nr == __NR_newfstatat || nr == __NR_unlinkat) {
+ if (static_cast<int>(SECCOMP_PARM1(ctx)) > 0) {
+ SECCOMP_PARM1(ctx) = -SECCOMP_PARM1(ctx);
+ }
+ }
+#endif
+
// Copy the seccomp-specific data into a arch_seccomp_data structure. This
// is what we are showing to TrapFnc callbacks that the system call
// evaluator registered with the sandbox.

File diff suppressed because it is too large Load diff

View file

@ -1,80 +0,0 @@
From 036d209a3f1a771de9aed31dfbe804aaf91d1c27 Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawnanastasio@yahoo.com>
Date: Thu, 9 Aug 2018 23:35:21 -0500
Subject: [PATCH] sandbox/linux: Implement partial support for ppc64 syscalls
and ucontext
Unlike other architectures, the ppc64 files currently rely on applicable
headers being provided by the system. It is sufficient for standard
GNU/Linux environments, but may require expansion elsewhere.
---
sandbox/linux/BUILD.gn | 2 ++
sandbox/linux/system_headers/linux_syscalls.h | 4 ++++
sandbox/linux/system_headers/linux_ucontext.h | 2 ++
sandbox/linux/system_headers/ppc64_linux_syscalls.h | 12 ++++++++++++
sandbox/linux/system_headers/ppc64_linux_ucontext.h | 12 ++++++++++++
5 files changed, 32 insertions(+)
create mode 100644 sandbox/linux/system_headers/ppc64_linux_syscalls.h
create mode 100644 sandbox/linux/system_headers/ppc64_linux_ucontext.h
Index: chromium-120.0.6099.71/sandbox/linux/BUILD.gn
===================================================================
--- chromium-120.0.6099.71.orig/sandbox/linux/BUILD.gn
+++ chromium-120.0.6099.71/sandbox/linux/BUILD.gn
@@ -383,6 +383,8 @@ component("sandbox_services") {
source_set("sandbox_services_headers") {
sources = [
+ "system_headers/ppc64_linux_syscalls.h",
+ "system_headers/ppc64_linux_ucontext.h",
"system_headers/arm64_linux_syscalls.h",
"system_headers/arm_linux_syscalls.h",
"system_headers/arm_linux_ucontext.h",
Index: chromium-120.0.6099.71/sandbox/linux/system_headers/linux_syscalls.h
===================================================================
--- chromium-120.0.6099.71.orig/sandbox/linux/system_headers/linux_syscalls.h
+++ chromium-120.0.6099.71/sandbox/linux/system_headers/linux_syscalls.h
@@ -35,5 +35,9 @@
#include "sandbox/linux/system_headers/arm64_linux_syscalls.h"
#endif
+#if defined(__powerpc64__)
+#include "sandbox/linux/system_headers/ppc64_linux_syscalls.h"
+#endif
+
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SYSCALLS_H_
Index: chromium-120.0.6099.71/sandbox/linux/system_headers/ppc64_linux_syscalls.h
===================================================================
--- /dev/null
+++ chromium-120.0.6099.71/sandbox/linux/system_headers/ppc64_linux_syscalls.h
@@ -0,0 +1,12 @@
+// Copyright 2014 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.
+
+#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_SYSCALLS_H_
+#define SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_SYSCALLS_H_
+
+#include <asm/unistd.h>
+
+//TODO: is it necessary to redefine syscall numbers for PPC64?
+
+#endif // SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_SYSCALLS_H_
Index: chromium-120.0.6099.71/sandbox/linux/system_headers/ppc64_linux_ucontext.h
===================================================================
--- /dev/null
+++ chromium-120.0.6099.71/sandbox/linux/system_headers/ppc64_linux_ucontext.h
@@ -0,0 +1,12 @@
+// Copyright 2014 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.
+
+#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_
+#define SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_
+
+#include <sys/ucontext.h>
+
+//TODO: is it necessary to redefine ucontext on PPC64?
+
+#endif // SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_

View file

@ -1,22 +0,0 @@
From c41cd6ac927f592b161abc04468d3c7a4be91995 Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawnanastasio@yahoo.com>
Date: Tue, 23 Oct 2018 15:49:31 -0500
Subject: [PATCH] sandbox/linux: Update IsSyscallAllowed in broker_process.cc
---
sandbox/linux/syscall_broker/broker_process.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: chromium-120.0.6099.71/sandbox/linux/syscall_broker/broker_process.cc
===================================================================
--- chromium-120.0.6099.71.orig/sandbox/linux/syscall_broker/broker_process.cc
+++ chromium-120.0.6099.71/sandbox/linux/syscall_broker/broker_process.cc
@@ -169,7 +169,7 @@ bool BrokerProcess::IsSyscallBrokerable(
#if defined(__NR_fstatat64)
case __NR_fstatat64:
#endif
-#if defined(__x86_64__) || defined(__aarch64__)
+#if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__)
case __NR_newfstatat:
#endif
return !fast_check || policy_->allowed_command_set.test(COMMAND_STAT);

View file

@ -1,638 +0,0 @@
From da52663deec77f705d7d58b18484c3e28e563f10 Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawnanastasio@yahoo.com>
Date: Tue, 18 Sep 2018 18:39:28 -0500
Subject: [PATCH] sandbox/linux: Update syscall helpers/lists for ppc64
---
.../seccomp-bpf-helpers/baseline_policy.cc | 8 +-
.../syscall_parameters_restrictions.cc | 2 +-
.../syscall_parameters_restrictions.h | 2 +-
.../linux/seccomp-bpf-helpers/syscall_sets.cc | 108 ++++++++++--------
.../linux/seccomp-bpf-helpers/syscall_sets.h | 6 +-
sandbox/linux/services/syscall_wrappers.cc | 2 +-
6 files changed, 73 insertions(+), 55 deletions(-)
Index: chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
===================================================================
--- chromium-120.0.6099.71.orig/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
+++ chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
@@ -90,7 +90,8 @@ bool IsBaselinePolicyWatched(int sysno)
SyscallSets::IsPrctl(sysno) ||
SyscallSets::IsProcessGroupOrSession(sysno) ||
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
SyscallSets::IsSocketCall(sysno) ||
#endif
#if defined(__arm__)
@@ -255,7 +256,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de
}
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
- defined(__aarch64__)
+ defined(__aarch64__) || defined(__powerpc64__)
if (sysno == __NR_mmap)
return RestrictMmapFlags();
#endif
@@ -276,7 +277,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de
return RestrictPrctl();
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
- defined(__aarch64__)
+ defined(__aarch64__) || defined(__powerpc64__)
if (sysno == __NR_socketpair) {
// Only allow AF_UNIX, PF_UNIX. Crash if anything else is seen.
static_assert(AF_UNIX == PF_UNIX,
@@ -340,7 +341,8 @@ ResultExpr EvaluateSyscallImpl(int fs_de
}
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
if (SyscallSets::IsSocketCall(sysno))
return RestrictSocketcallCommand();
#endif
Index: chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
===================================================================
--- chromium-120.0.6099.71.orig/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
+++ chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
@@ -36,7 +36,7 @@
#include "sandbox/linux/system_headers/linux_time.h"
#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \
- !defined(__arm__) && !defined(__aarch64__) && \
+ !defined(__arm__) && !defined(__aarch64__) && !defined(__powerpc64__) && \
!defined(PTRACE_GET_THREAD_AREA)
// Also include asm/ptrace-abi.h since ptrace.h in older libc (for instance
// the one in Ubuntu 16.04 LTS) is missing PTRACE_GET_THREAD_AREA.
@@ -45,6 +45,11 @@
#include <asm/ptrace-abi.h>
#endif
+// On PPC64, TCGETS is defined in terms of struct termios, so we must include termios.h
+#ifdef __powerpc64__
+#include <termios.h>
+#endif
+
#if BUILDFLAG(IS_ANDROID)
#if !defined(F_DUPFD_CLOEXEC)
@@ -102,6 +107,15 @@ inline bool IsArchitectureMips() {
#endif
}
+inline bool IsArchitecturePPC64() {
+#if defined(__powerpc64__)
+ return true;
+#else
+ return false;
+#endif
+}
+
+
// Ubuntu's version of glibc has a race condition in sem_post that can cause
// it to call futex(2) with bogus op arguments. To workaround this, we need
// to allow those futex(2) calls to fail with EINVAL, instead of crashing the
@@ -269,9 +283,11 @@ ResultExpr RestrictFcntlCommands() {
// operator.
// Glibc overrides the kernel's O_LARGEFILE value. Account for this.
uint64_t kOLargeFileFlag = O_LARGEFILE;
- if (IsArchitectureX86_64() || IsArchitectureI386() || IsArchitectureMips())
+ if (IsArchitectureX86_64() || IsArchitectureI386() || IsArchitectureMips() \
+ || IsArchitecturePPC64())
kOLargeFileFlag = 0100000;
+
const Arg<int> cmd(1);
const Arg<long> long_arg(2);
@@ -294,8 +310,17 @@ ResultExpr RestrictFcntlCommands() {
F_SETLKW,
F_GETLK,
F_DUPFD,
- F_DUPFD_CLOEXEC},
- Allow())
+ F_DUPFD_CLOEXEC
+#if defined(__powerpc64__)
+// On PPC64, F_SETLK, F_GETLK, F_SETLKW are defined as the 64-bit variants
+// but glibc will sometimes still use the 32-bit versions. Allow both.
+ ,
+ 5, /* F_GETLK (32) */
+ 6, /* F_SETLK (32) */
+ 7 /* F_SETLKW (32) */
+#endif
+ },
+ Allow())
.Case(F_SETFL,
If((long_arg & ~kAllowedMask) == 0, Allow()).Else(CrashSIGSYS()))
.Case(F_ADD_SEALS,
@@ -304,7 +329,7 @@ ResultExpr RestrictFcntlCommands() {
// clang-format on
}
-#if defined(__i386__) || defined(__mips__)
+#if defined(__i386__) || defined(__mips__) || defined(__powerpc64__)
ResultExpr RestrictSocketcallCommand() {
// Unfortunately, we are unable to restrict the first parameter to
// socketpair(2). Whilst initially sounding bad, it's noteworthy that very
@@ -459,7 +484,7 @@ ResultExpr RestrictPtrace() {
#endif
return Switch(request)
.Cases({
-#if !defined(__aarch64__)
+#if !defined(__aarch64__) && !defined(__powerpc64__)
PTRACE_GETREGS, PTRACE_GETFPREGS, PTRACE_GET_THREAD_AREA,
PTRACE_GETREGSET,
#endif
Index: chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h
===================================================================
--- chromium-120.0.6099.71.orig/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h
+++ chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h
@@ -52,7 +52,7 @@ SANDBOX_EXPORT bpf_dsl::ResultExpr Restr
// O_NONBLOCK | O_SYNC | O_LARGEFILE | O_CLOEXEC | O_NOATIME.
SANDBOX_EXPORT bpf_dsl::ResultExpr RestrictFcntlCommands();
-#if defined(__i386__) || defined(__mips__)
+#if defined(__i386__) || defined(__mips__) || defined(__powerpc64__)
// Restrict socketcall(2) to only allow socketpair(2), send(2), recv(2),
// sendto(2), recvfrom(2), shutdown(2), sendmsg(2) and recvmsg(2).
SANDBOX_EXPORT bpf_dsl::ResultExpr RestrictSocketcallCommand();
Index: chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
===================================================================
--- chromium-120.0.6099.71.orig/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+++ chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
@@ -29,7 +29,8 @@ bool SyscallSets::IsAllowedGettime(int s
switch (sysno) {
case __NR_gettimeofday:
#if defined(__i386__) || defined(__x86_64__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_time:
#endif
return true;
@@ -52,12 +53,14 @@ bool SyscallSets::IsAllowedGettime(int s
case __NR_clock_nanosleep_time64: // Parameters filtered by RestrictClockID().
#endif
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_ftime: // Obsolete.
#endif
case __NR_settimeofday: // Privileged.
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_stime:
#endif
default:
@@ -136,7 +139,7 @@ bool SyscallSets::IsFileSystem(int sysno
case __NR_faccessat2:
case __NR_fchmodat:
case __NR_fchownat: // Should be called chownat ?
-#if defined(__x86_64__) || defined(__aarch64__)
+#if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__)
case __NR_newfstatat: // fstatat(). EPERM not a valid errno.
#elif defined(__i386__) || defined(__arm__) || \
(defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
@@ -155,7 +158,7 @@ bool SyscallSets::IsFileSystem(int sysno
case __NR_memfd_create:
case __NR_mkdirat:
case __NR_mknodat:
-#if defined(__i386__)
+#if defined(__i386__) || defined(__powerpc64__)
case __NR_oldlstat:
case __NR_oldstat:
#endif
@@ -169,7 +172,8 @@ bool SyscallSets::IsFileSystem(int sysno
#endif
case __NR_statfs: // EPERM not a valid errno.
#if defined(__i386__) || defined(__arm__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_statfs64:
#endif
case __NR_statx: // EPERM not a valid errno.
@@ -180,7 +184,8 @@ bool SyscallSets::IsFileSystem(int sysno
case __NR_truncate64:
#endif
case __NR_unlinkat:
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+ defined(__powerpc64__)
case __NR_utime:
#endif
case __NR_utimensat: // New.
@@ -220,7 +225,8 @@ bool SyscallSets::IsAllowedFileSystemAcc
#endif
return true;
// TODO(jln): these should be denied gracefully as well (moved below).
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+ defined(__powerpc64__)
case __NR_fadvise64: // EPERM not a valid errno.
#endif
#if defined(__i386__)
@@ -233,11 +239,12 @@ bool SyscallSets::IsAllowedFileSystemAcc
case __NR_flock: // EPERM not a valid errno.
case __NR_fstatfs: // Give information about the whole filesystem.
#if defined(__i386__) || defined(__arm__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_fstatfs64:
#endif
case __NR_fsync: // EPERM not a valid errno.
-#if defined(__i386__)
+#if defined(__i386__) || defined(__powerpc64__)
case __NR_oldfstat:
#endif
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
@@ -245,6 +252,8 @@ bool SyscallSets::IsAllowedFileSystemAcc
case __NR_sync_file_range: // EPERM not a valid errno.
#elif defined(__arm__)
case __NR_arm_sync_file_range: // EPERM not a valid errno.
+#elif defined(__powerpc64__)
+ case __NR_sync_file_range2: // EPERM not a valid errno.
#endif
default:
return false;
@@ -265,7 +274,8 @@ bool SyscallSets::IsDeniedFileSystemAcce
#endif
case __NR_getdents64: // EPERM not a valid errno.
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_readdir:
#endif
return true;
@@ -306,7 +316,7 @@ bool SyscallSets::IsGetSimpleId(int sysn
bool SyscallSets::IsProcessPrivilegeChange(int sysno) {
switch (sysno) {
case __NR_capset:
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc64__)
case __NR_ioperm: // Intel privilege.
case __NR_iopl: // Intel privilege.
#endif
@@ -362,7 +372,8 @@ bool SyscallSets::IsAllowedSignalHandlin
// overflow.
case __NR_sigaltstack:
#if defined(__i386__) || defined(__arm__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_rt_sigtimedwait_time64:
case __NR_sigaction:
case __NR_sigprocmask:
@@ -378,7 +389,8 @@ bool SyscallSets::IsAllowedSignalHandlin
#endif
case __NR_signalfd4:
#if defined(__i386__) || defined(__arm__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_sigpending:
case __NR_sigsuspend:
#endif
@@ -402,7 +414,7 @@ bool SyscallSets::IsAllowedOperationOnFd
#endif
case __NR_dup3:
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
- defined(__aarch64__)
+ defined(__aarch64__) || defined(__powerpc64__)
case __NR_shutdown:
#endif
return true;
@@ -435,7 +447,7 @@ bool SyscallSets::IsAllowedProcessStartO
case __NR_exit_group:
case __NR_wait4:
case __NR_waitid:
-#if defined(__i386__)
+#if defined(__i386__) || defined(__powerpc64__)
case __NR_waitpid:
#endif
return true;
@@ -452,7 +464,7 @@ bool SyscallSets::IsAllowedProcessStartO
#endif
case __NR_set_tid_address:
case __NR_unshare:
-#if !defined(__mips__) && !defined(__aarch64__)
+#if !defined(__mips__) && !defined(__aarch64__) || defined(__powerpc64__)
case __NR_vfork:
#endif
default:
@@ -499,7 +511,7 @@ bool SyscallSets::IsAllowedEpoll(int sys
bool SyscallSets::IsDeniedGetOrModifySocket(int sysno) {
switch (sysno) {
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
- defined(__aarch64__)
+ defined(__aarch64__) || defined(__powerpc64__)
case __NR_accept:
case __NR_accept4:
case __NR_bind:
@@ -514,7 +526,8 @@ bool SyscallSets::IsDeniedGetOrModifySoc
}
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
// Big multiplexing system call for sockets.
bool SyscallSets::IsSocketCall(int sysno) {
switch (sysno) {
@@ -528,7 +541,8 @@ bool SyscallSets::IsSocketCall(int sysno
}
#endif
-#if defined(__x86_64__) || defined(__arm__) || defined(__mips__)
+#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
+ defined(__powerpc64__)
bool SyscallSets::IsNetworkSocketInformation(int sysno) {
switch (sysno) {
case __NR_getpeername:
@@ -553,7 +567,7 @@ bool SyscallSets::IsAllowedAddressSpaceA
case __NR_mincore:
case __NR_mlockall:
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
- defined(__aarch64__)
+ defined(__aarch64__) || defined(__powerpc64__)
case __NR_mmap:
#endif
#if defined(__i386__) || defined(__arm__) || \
@@ -583,7 +597,8 @@ bool SyscallSets::IsAllowedGeneralIo(int
switch (sysno) {
case __NR_lseek:
#if defined(__i386__) || defined(__arm__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR__llseek:
#endif
#if !defined(__aarch64__)
@@ -603,26 +618,28 @@ bool SyscallSets::IsAllowedGeneralIo(int
case __NR_readv:
case __NR_pread64:
#if defined(__arm__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_recv:
#endif
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
- defined(__aarch64__)
+ defined(__aarch64__) || defined(__powerpc64__)
case __NR_recvfrom: // Could specify source.
case __NR_recvmsg: // Could specify source.
#endif
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc64__)
case __NR_select:
#endif
-#if defined(__i386__) || defined(__arm__) || defined(__mips__)
+#if defined(__i386__) || defined(__arm__) || defined(__mips__) || defined(__powerpc64__)
case __NR__newselect:
#endif
#if defined(__arm__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_send:
#endif
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
- defined(__aarch64__)
+ defined(__aarch64__) || defined(__powerpc64__)
case __NR_sendmsg: // Could specify destination.
case __NR_sendto: // Could specify destination.
#endif
@@ -678,7 +695,8 @@ bool SyscallSets::IsAllowedBasicSchedule
return true;
case __NR_getpriority:
#if defined(__i386__) || defined(__arm__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_nice:
#endif
case __NR_setpriority:
@@ -690,7 +708,8 @@ bool SyscallSets::IsAllowedBasicSchedule
bool SyscallSets::IsAdminOperation(int sysno) {
switch (sysno) {
#if defined(__i386__) || defined(__arm__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_bdflush:
#endif
case __NR_kexec_load:
@@ -706,7 +725,8 @@ bool SyscallSets::IsAdminOperation(int s
bool SyscallSets::IsKernelModule(int sysno) {
switch (sysno) {
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+ defined(__powerpc64__)
case __NR_create_module:
case __NR_get_kernel_syms: // Should ENOSYS.
case __NR_query_module:
@@ -739,7 +759,8 @@ bool SyscallSets::IsFsControl(int sysno)
case __NR_swapoff:
case __NR_swapon:
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_umount:
#endif
case __NR_umount2:
@@ -755,7 +776,7 @@ bool SyscallSets::IsNuma(int sysno) {
case __NR_getcpu:
case __NR_mbind:
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
- defined(__aarch64__)
+ defined(__aarch64__) || defined(__powerpc64__)
case __NR_migrate_pages:
#endif
case __NR_move_pages:
@@ -790,14 +811,15 @@ bool SyscallSets::IsGlobalProcessEnviron
switch (sysno) {
case __NR_acct: // Privileged.
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
- defined(__aarch64__)
+ defined(__aarch64__) || defined(__powerpc64__)
case __NR_getrlimit:
#endif
-#if defined(__i386__) || defined(__arm__)
+#if defined(__i386__) || defined(__arm__) || defined(__powerpc64__)
case __NR_ugetrlimit:
#endif
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_ulimit:
#endif
case __NR_getrusage:
@@ -831,7 +853,7 @@ bool SyscallSets::IsGlobalSystemStatus(i
#endif
case __NR_sysinfo:
case __NR_uname:
-#if defined(__i386__)
+#if defined(__i386__) || defined(__powerpc64__)
case __NR_olduname:
case __NR_oldolduname:
#endif
@@ -915,7 +937,8 @@ bool SyscallSets::IsSystemVSemaphores(in
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
defined(__aarch64__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
+ defined(__powerpc64__)
// These give a lot of ambient authority and bypass the setuid sandbox.
bool SyscallSets::IsSystemVSharedMemory(int sysno) {
switch (sysno) {
@@ -946,7 +969,8 @@ bool SyscallSets::IsSystemVMessageQueue(
#endif
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
// Big system V multiplexing system call.
bool SyscallSets::IsSystemVIpc(int sysno) {
switch (sysno) {
@@ -966,7 +990,8 @@ bool SyscallSets::IsAnySystemV(int sysno
return IsSystemVMessageQueue(sysno) || IsSystemVSemaphores(sysno) ||
IsSystemVSharedMemory(sysno);
#elif defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
return IsSystemVIpc(sysno);
#endif
}
@@ -1023,7 +1048,8 @@ bool SyscallSets::IsFaNotify(int sysno)
bool SyscallSets::IsTimer(int sysno) {
switch (sysno) {
case __NR_getitimer:
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+ defined(__powerpc64__)
case __NR_alarm:
#endif
case __NR_setitimer:
@@ -1105,18 +1131,22 @@ bool SyscallSets::IsMisc(int sysno) {
case __NR_syncfs:
case __NR_vhangup:
// The system calls below are not implemented.
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+ defined(__powerpc64__)
case __NR_afs_syscall:
#endif
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_break:
#endif
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+ defined(__powerpc64__)
case __NR_getpmsg:
#endif
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_gtty:
case __NR_idle:
case __NR_lock:
@@ -1124,20 +1154,22 @@ bool SyscallSets::IsMisc(int sysno) {
case __NR_prof:
case __NR_profil:
#endif
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+ defined(__powerpc64__)
case __NR_putpmsg:
#endif
#if defined(__x86_64__)
case __NR_security:
#endif
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
case __NR_stty:
#endif
-#if defined(__x86_64__)
+#if defined(__x86_64__) || defined(__powerpc64__)
case __NR_tuxcall:
#endif
-#if !defined(__aarch64__)
+#if !defined(__aarch64__) && !defined(__powerpc64__)
case __NR_vserver:
#endif
return true;
Index: chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
===================================================================
--- chromium-120.0.6099.71.orig/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
+++ chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
@@ -46,13 +46,14 @@ class SANDBOX_EXPORT SyscallSets {
static bool IsDeniedGetOrModifySocket(int sysno);
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
// Big multiplexing system call for sockets.
static bool IsSocketCall(int sysno);
#endif
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
- defined(__aarch64__)
+ defined(__aarch64__) || defined(__powerpc64__)
static bool IsNetworkSocketInformation(int sysno);
#endif
@@ -84,7 +85,8 @@ class SANDBOX_EXPORT SyscallSets {
#endif
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
defined(__aarch64__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
+ defined(__powerpc64__)
// These give a lot of ambient authority and bypass the setuid sandbox.
static bool IsSystemVSharedMemory(int sysno);
#endif
@@ -95,7 +97,8 @@ class SANDBOX_EXPORT SyscallSets {
#endif
#if defined(__i386__) || \
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
+ defined(__powerpc64__)
// Big system V multiplexing system call.
static bool IsSystemVIpc(int sysno);
#endif
Index: chromium-120.0.6099.71/sandbox/linux/services/syscall_wrappers.cc
===================================================================
--- chromium-120.0.6099.71.orig/sandbox/linux/services/syscall_wrappers.cc
+++ chromium-120.0.6099.71/sandbox/linux/services/syscall_wrappers.cc
@@ -61,7 +61,7 @@ long sys_clone(unsigned long flags,
#if defined(ARCH_CPU_X86_64)
return syscall(__NR_clone, flags, child_stack, ptid, ctid, tls);
#elif defined(ARCH_CPU_X86) || defined(ARCH_CPU_ARM_FAMILY) || \
- defined(ARCH_CPU_MIPS_FAMILY)
+ defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_PPC64_FAMILY)
// CONFIG_CLONE_BACKWARDS defined.
return syscall(__NR_clone, flags, child_stack, ptid, tls, ctid);
#endif

View file

@ -1,27 +0,0 @@
From c9043a422fb4a5a6c72aaa1b907cea5f6a3061dd Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawnanastasio@yahoo.com>
Date: Thu, 9 Aug 2018 19:10:24 -0500
Subject: [PATCH 1/4] sandbox/linux/bpf_dsl: Update syscall ranges for ppc64
---
sandbox/linux/bpf_dsl/linux_syscall_ranges.h | 7 +++++++
1 file changed, 7 insertions(+)
Index: chromium-120.0.6099.71/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
===================================================================
--- chromium-120.0.6099.71.orig/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
+++ chromium-120.0.6099.71/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
@@ -56,6 +56,13 @@
#define MAX_PUBLIC_SYSCALL __NR_syscalls
#define MAX_SYSCALL MAX_PUBLIC_SYSCALL
+#elif defined(__powerpc64__)
+
+#include <asm/unistd.h>
+#define MIN_SYSCALL 0u
+#define MAX_PUBLIC_SYSCALL 386u
+#define MAX_SYSCALL MAX_PUBLIC_SYSCALL
+
#else
#error "Unsupported architecture"
#endif

View file

@ -1,26 +0,0 @@
From 7468b266532bd607eb1f5292d758256d800b2eee Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawnanastasio@yahoo.com>
Date: Fri, 10 Aug 2018 00:23:50 -0500
Subject: [PATCH] services/service_manager/sandbox/linux: Fix TCGETS
declaration on PPC64
---
.../sandbox/linux/bpf_renderer_policy_linux.cc | 5 +++++
1 file changed, 5 insertions(+)
Index: chromium-120.0.6099.71/sandbox/policy/linux/bpf_renderer_policy_linux.cc
===================================================================
--- chromium-120.0.6099.71.orig/sandbox/policy/linux/bpf_renderer_policy_linux.cc
+++ chromium-120.0.6099.71/sandbox/policy/linux/bpf_renderer_policy_linux.cc
@@ -15,6 +15,11 @@
#include "sandbox/linux/system_headers/linux_syscalls.h"
#include "sandbox/policy/linux/sandbox_linux.h"
+// On PPC64, TCGETS is defined in terms of struct termios, so we must include termios.h
+#ifdef __powerpc64__
+#include <termios.h>
+#endif
+
// TODO(vignatti): replace the local definitions below with #include
// <linux/dma-buf.h> once kernel version 4.6 becomes widely used.
#include <linux/types.h>

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

@ -1,7 +1,7 @@
Index: chromium-120.0.6099.71/third_party/angle/src/libANGLE/Constants.h
Index: chromium-144.0.7559.59/third_party/angle/src/libANGLE/Constants.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/angle/src/libANGLE/Constants.h
+++ chromium-120.0.6099.71/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_

View file

@ -8,11 +8,11 @@ Subject: [PATCH] third_party/libvpx: Properly generate gni on ppc64
third_party/libvpx/generate_gni.sh | 10 ++++++++++
2 files changed, 12 insertions(+)
Index: chromium-120.0.6099.71/third_party/libvpx/BUILD.gn
Index: chromium-144.0.7559.59/third_party/libvpx/BUILD.gn
===================================================================
--- chromium-120.0.6099.71.orig/third_party/libvpx/BUILD.gn
+++ chromium-120.0.6099.71/third_party/libvpx/BUILD.gn
@@ -248,6 +248,8 @@ if (current_cpu == "x86" || (current_cpu
--- 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

View file

@ -1,22 +0,0 @@
Index: chromium-120.0.6099.71/third_party/lss/linux_syscall_support.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/lss/linux_syscall_support.h
+++ chromium-120.0.6099.71/third_party/lss/linux_syscall_support.h
@@ -4638,7 +4638,7 @@ struct kernel_statx {
LSS_REG(2, buf);
LSS_BODY(void*, mmap2, "0"(__r2));
}
-#else
+#elif !defined(__powerpc64__) /* ppc64 doesn't have mmap2 */
#define __NR__mmap2 __NR_mmap2
LSS_INLINE _syscall6(void*, _mmap2, void*, s,
size_t, l, int, p,
@@ -4749,7 +4749,7 @@ struct kernel_statx {
#if defined(__i386__) || \
defined(__ARM_ARCH_3__) || defined(__ARM_EABI__) || \
(defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI32) || \
- defined(__PPC__) || \
+ (defined(__PPC__) && !defined(__powerpc64__)) || \
(defined(__s390__) && !defined(__s390x__))
/* On these architectures, implement mmap() with mmap2(). */
LSS_INLINE void* LSS_NAME(mmap)(void *s, size_t l, int p, int f, int d,

View file

@ -8,10 +8,10 @@ Subject: [PATCH] third_party/pffft: Include altivec.h on ppc64 with SIMD
third_party/pffft/src/pffft.c | 1 +
1 file changed, 1 insertion(+)
Index: chromium-120.0.6099.71/third_party/pffft/src/pffft.c
Index: chromium-144.0.7559.59/third_party/pffft/src/pffft.c
===================================================================
--- chromium-120.0.6099.71.orig/third_party/pffft/src/pffft.c
+++ chromium-120.0.6099.71/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
*/

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,8 @@
--- a/v8/src/base/immediate-crash.h
+++ b/v8/src/base/immediate-crash.h
@@ -93,6 +93,13 @@
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("")

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;

View file

@ -1,21 +0,0 @@
From 82922bf486e9926a171152f61030dfcd53f017b8 Mon Sep 17 00:00:00 2001
From: Timothy Pearson <tpearson@raptorengineering.com>
Date: Thu, 30 Aug 2018 17:32:05 -0500
Subject: [PATCH] Include cstddef to fix build
size_t is not defined unless cstddef is included.
---
third_party/crashpad/crashpad/compat/linux/sys/user.h | 1 +
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/compat/linux/sys/user.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/compat/linux/sys/user.h
+++ chromium-120.0.6099.71/third_party/crashpad/crashpad/compat/linux/sys/user.h
@@ -15,6 +15,7 @@
#ifndef CRASHPAD_COMPAT_LINUX_SYS_USER_H_
#define CRASHPAD_COMPAT_LINUX_SYS_USER_H_
+#include <cstddef>
#include_next <sys/user.h>
#include <features.h>

File diff suppressed because it is too large Load diff

View file

@ -1,76 +0,0 @@
From 3c4705bfdda45feb860a1f121631773e5fe8e53f Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawnanastasio@yahoo.com>
Date: Thu, 9 Aug 2018 19:11:26 -0500
Subject: [PATCH 1/4] sandbox/linux/bpf_dsl: Modify seccomp_macros to add
support for ppc64
---
sandbox/linux/bpf_dsl/seccomp_macros.h | 43 ++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
Index: chromium-120.0.6099.71/sandbox/linux/bpf_dsl/seccomp_macros.h
===================================================================
--- chromium-120.0.6099.71.orig/sandbox/linux/bpf_dsl/seccomp_macros.h
+++ chromium-120.0.6099.71/sandbox/linux/bpf_dsl/seccomp_macros.h
@@ -14,6 +14,9 @@
#if defined(__mips__)
// sys/user.h in eglibc misses size_t definition
#include <stddef.h>
+#elif defined(__powerpc64__)
+// Manually define greg_t on ppc64
+typedef unsigned long long greg_t;
#endif
#endif
@@ -343,6 +346,51 @@ struct regs_struct {
#define SECCOMP_PT_PARM4(_regs) (_regs).regs[3]
#define SECCOMP_PT_PARM5(_regs) (_regs).regs[4]
#define SECCOMP_PT_PARM6(_regs) (_regs).regs[5]
+
+#elif defined(__powerpc64__)
+#include <asm/ptrace.h>
+
+typedef struct pt_regs regs_struct;
+
+#ifdef ARCH_CPU_LITTLE_ENDIAN
+#define SECCOMP_ARCH AUDIT_ARCH_PPC64LE
+#else
+#define SECCOMP_ARCH AUDIT_ARCH_PPC64
+#endif
+
+#define SECCOMP_REG(_ctx, _reg) ((_ctx)->uc_mcontext.regs->gpr[_reg])
+
+#define SECCOMP_RESULT(_ctx) SECCOMP_REG(_ctx, 3)
+#define SECCOMP_SYSCALL(_ctx) SECCOMP_REG(_ctx, 0)
+#define SECCOMP_IP(_ctx) (_ctx)->uc_mcontext.regs->nip
+#define SECCOMP_PARM1(_ctx) SECCOMP_REG(_ctx, 3)
+#define SECCOMP_PARM2(_ctx) SECCOMP_REG(_ctx, 4)
+#define SECCOMP_PARM3(_ctx) SECCOMP_REG(_ctx, 5)
+#define SECCOMP_PARM4(_ctx) SECCOMP_REG(_ctx, 6)
+#define SECCOMP_PARM5(_ctx) SECCOMP_REG(_ctx, 7)
+#define SECCOMP_PARM6(_ctx) SECCOMP_REG(_ctx, 8)
+
+#define SECCOMP_NR_IDX (offsetof(struct arch_seccomp_data, nr))
+#define SECCOMP_ARCH_IDX (offsetof(struct arch_seccomp_data, arch))
+#define SECCOMP_IP_MSB_IDX \
+ (offsetof(struct arch_seccomp_data, instruction_pointer) + 4)
+#define SECCOMP_IP_LSB_IDX \
+ (offsetof(struct arch_seccomp_data, instruction_pointer) + 0)
+#define SECCOMP_ARG_MSB_IDX(nr) \
+ (offsetof(struct arch_seccomp_data, args) + 8 * (nr) + 4)
+#define SECCOMP_ARG_LSB_IDX(nr) \
+ (offsetof(struct arch_seccomp_data, args) + 8 * (nr) + 0)
+
+#define SECCOMP_PT_RESULT(_regs) (_regs).gpr[3]
+#define SECCOMP_PT_SYSCALL(_regs) (_regs).gpr[0]
+#define SECCOMP_PT_IP(_regs) (_regs).nip
+#define SECCOMP_PT_PARM1(_regs) (_regs).gpr[3]
+#define SECCOMP_PT_PARM2(_regs) (_regs).gpr[4]
+#define SECCOMP_PT_PARM3(_regs) (_regs).gpr[5]
+#define SECCOMP_PT_PARM4(_regs) (_regs).gpr[6]
+#define SECCOMP_PT_PARM5(_regs) (_regs).gpr[7]
+#define SECCOMP_PT_PARM6(_regs) (_regs).gpr[8]
+
#else
#error Unsupported target platform

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,8 @@
Index: chromium-120.0.6099.71/third_party/lss/linux_syscall_support.h
Index: chromium-144.0.7559.59/third_party/lss/linux_syscall_support.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/lss/linux_syscall_support.h
+++ chromium-120.0.6099.71/third_party/lss/linux_syscall_support.h
@@ -87,7 +87,7 @@
--- 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__) || \
@ -11,7 +11,7 @@ Index: chromium-120.0.6099.71/third_party/lss/linux_syscall_support.h
defined(__aarch64__) || defined(__s390__) || defined(__e2k__) || \
(defined(__riscv) && __riscv_xlen == 64) || defined(__loongarch_lp64)) \
&& (defined(__linux) || defined(__ANDROID__))
@@ -399,7 +399,7 @@ struct kernel_stat64 {
@@ -400,7 +400,7 @@ struct kernel_stat64 {
unsigned __pad2;
unsigned long long st_blocks;
};
@ -20,7 +20,7 @@ Index: chromium-120.0.6099.71/third_party/lss/linux_syscall_support.h
struct kernel_stat64 {
unsigned long long st_dev;
unsigned long long st_ino;
@@ -421,6 +421,28 @@ struct kernel_stat64 {
@@ -422,6 +422,28 @@ struct kernel_stat64 {
unsigned long __unused4;
unsigned long __unused5;
};
@ -49,7 +49,7 @@ Index: chromium-120.0.6099.71/third_party/lss/linux_syscall_support.h
#elif defined(__e2k__)
struct kernel_stat64 {
unsigned long long st_dev;
@@ -537,7 +559,7 @@ struct kernel_stat {
@@ -538,7 +560,7 @@ struct kernel_stat {
uint64_t st_ctime_nsec_;
int64_t __unused4[3];
};
@ -58,7 +58,7 @@ Index: chromium-120.0.6099.71/third_party/lss/linux_syscall_support.h
typedef unsigned long kernel_blkcnt_t;
typedef unsigned long kernel_blksize_t;
typedef unsigned kernel_dev_t;
@@ -568,6 +590,37 @@ struct kernel_stat {
@@ -569,6 +591,37 @@ struct kernel_stat {
unsigned long __unused4;
unsigned long __unused5;
};
@ -96,7 +96,7 @@ Index: chromium-120.0.6099.71/third_party/lss/linux_syscall_support.h
#elif (defined(__mips__) && _MIPS_SIM != _MIPS_SIM_ABI64)
typedef int kernel_blkcnt_t;
typedef int kernel_blksize_t;
@@ -1824,6 +1877,28 @@ struct kernel_statx {
@@ -1825,6 +1878,28 @@ struct kernel_statx {
#ifndef __NR_getcpu
#define __NR_getcpu 302
#endif
@ -122,30 +122,10 @@ Index: chromium-120.0.6099.71/third_party/lss/linux_syscall_support.h
+#define __NR_recvmsg 342
+#endif
+
/* End of powerpc defininitions */
/* End of powerpc definitions */
#elif defined(__s390__)
#ifndef __NR_quotactl
@@ -3363,6 +3438,11 @@ struct kernel_statx {
/* TODO(csilvers): consider wrapping some args up in a struct, like we
* do for i386's _syscall6, so we can compile successfully on gcc 2.95
*/
+ #ifdef __powerpc64__
+ /* TODO: implement clone() for ppc64.
+ * until then, use system libc */
+ #define sys_clone clone
+ #else
LSS_INLINE int LSS_NAME(clone)(int (*fn)(void *), void *child_stack,
int flags, void *arg, int *parent_tidptr,
void *newtls, int *child_tidptr) {
@@ -3433,6 +3513,7 @@ struct kernel_statx {
}
LSS_RETURN(int, __ret, __err);
}
+ #endif
#elif defined(__s390__)
#undef LSS_REG
#define LSS_REG(r, a) register unsigned long __r##r __asm__("r"#r) = (unsigned long) a
@@ -4783,7 +4864,7 @@ struct kernel_statx {
@@ -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
@ -154,7 +134,7 @@ Index: chromium-120.0.6099.71/third_party/lss/linux_syscall_support.h
#undef LSS_SC_LOADARGS_0
#define LSS_SC_LOADARGS_0(dummy...)
#undef LSS_SC_LOADARGS_1
@@ -5173,7 +5254,11 @@ struct kernel_statx {
@@ -5216,7 +5291,11 @@ struct kernel_statx {
#endif
#if !defined(__NR_pipe)

View file

@ -1,37 +0,0 @@
From cca78240860abb63bbcfe94d1e5f04a1f23c527d Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawnanastasio@yahoo.com>
Date: Thu, 9 Aug 2018 19:11:56 -0500
Subject: [PATCH 3/4] sandbox/linux/system_headers: Update linux seccomp header
for ppc64
---
sandbox/linux/system_headers/linux_seccomp.h | 10 ++++++++++
1 file changed, 10 insertions(+)
Index: chromium-120.0.6099.71/sandbox/linux/system_headers/linux_seccomp.h
===================================================================
--- chromium-120.0.6099.71.orig/sandbox/linux/system_headers/linux_seccomp.h
+++ chromium-120.0.6099.71/sandbox/linux/system_headers/linux_seccomp.h
@@ -38,6 +38,9 @@
#ifndef EM_AARCH64
#define EM_AARCH64 183
#endif
+#ifndef EM_PPC64
+#define EM_PPC64 21
+#endif
#ifndef __AUDIT_ARCH_64BIT
#define __AUDIT_ARCH_64BIT 0x80000000
@@ -70,6 +73,12 @@
#ifndef AUDIT_ARCH_AARCH64
#define AUDIT_ARCH_AARCH64 (EM_AARCH64 | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE)
#endif
+#ifndef AUDIT_ARCH_PPC64
+#define AUDIT_ARCH_PPC64 (EM_PPC64 | __AUDIT_ARCH_64BIT)
+#endif
+#ifndef AUDIT_ARCH_PPC64LE
+#define AUDIT_ARCH_PPC64LE (EM_PPC64 | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE)
+#endif
// For prctl.h
#ifndef PR_SET_SECCOMP

View file

@ -1,7 +1,7 @@
Index: chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vp8_rtcd.h
Index: chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vp8_rtcd.h
===================================================================
--- /dev/null
+++ chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vp8_rtcd.h
+++ chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vp8_rtcd.h
@@ -0,0 +1,316 @@
+// This file is generated. Do not edit.
+#ifndef VP8_RTCD_H_
@ -319,10 +319,10 @@ Index: chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vp8_r
+#endif
+
+#endif
Index: chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vp9_rtcd.h
Index: chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vp9_rtcd.h
===================================================================
--- /dev/null
+++ chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vp9_rtcd.h
+++ chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vp9_rtcd.h
@@ -0,0 +1,267 @@
+// This file is generated. Do not edit.
+#ifndef VP9_RTCD_H_
@ -591,10 +591,10 @@ Index: chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vp9_r
+#endif
+
+#endif
Index: chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vpx_config.asm
Index: chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_config.asm
===================================================================
--- /dev/null
+++ chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vpx_config.asm
+++ chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_config.asm
@@ -0,0 +1,107 @@
+@ This file was created from a .asm file
+@ using the ads2gas.pl script.
@ -703,10 +703,10 @@ Index: chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vpx_c
+.equ DECODE_WIDTH_LIMIT , 16384
+.equ DECODE_HEIGHT_LIMIT , 16384
+ .section .note.GNU-stack,"",%progbits
Index: chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vpx_config.c
Index: chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_config.c
===================================================================
--- /dev/null
+++ chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vpx_config.c
+++ chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_config.c
@@ -0,0 +1,10 @@
+/* Copyright (c) 2011 The WebM project authors. All Rights Reserved. */
+/* */
@ -718,10 +718,10 @@ Index: chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vpx_c
+#include "vpx/vpx_codec.h"
+static const char* const cfg = "--target=generic-gnu --enable-vp9-highbitdepth --enable-external-build --enable-postproc --enable-multi-res-encoding --enable-temporal-denoising --enable-vp9-temporal-denoising --enable-vp9-postproc --size-limit=16384x16384 --enable-realtime-only --disable-install-docs --disable-libyuv";
+const char *vpx_codec_build_config(void) {return cfg;}
Index: chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vpx_config.h
Index: chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_config.h
===================================================================
--- /dev/null
+++ chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vpx_config.h
+++ chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_config.h
@@ -0,0 +1,116 @@
+/* Copyright (c) 2011 The WebM project authors. All Rights Reserved. */
+/* */
@ -839,10 +839,10 @@ Index: chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vpx_c
+#define DECODE_WIDTH_LIMIT 16384
+#define DECODE_HEIGHT_LIMIT 16384
+#endif /* VPX_CONFIG_H */
Index: chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vpx_dsp_rtcd.h
Index: chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_dsp_rtcd.h
===================================================================
--- /dev/null
+++ chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vpx_dsp_rtcd.h
+++ chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_dsp_rtcd.h
@@ -0,0 +1,4128 @@
+// This file is generated. Do not edit.
+#ifndef VPX_DSP_RTCD_H_
@ -4972,10 +4972,10 @@ Index: chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vpx_d
+#endif
+
+#endif
Index: chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vpx_scale_rtcd.h
Index: chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_scale_rtcd.h
===================================================================
--- /dev/null
+++ chromium-121.0.6167.75/third_party/libvpx/source/config/linux/ppc64/vpx_scale_rtcd.h
+++ chromium-144.0.7559.59/third_party/libvpx/source/config/linux/ppc64/vpx_scale_rtcd.h
@@ -0,0 +1,96 @@
+// This file is generated. Do not edit.
+#ifndef VPX_SCALE_RTCD_H_

View file

@ -1,23 +0,0 @@
From 298df3dc44f7121cd8cb9a06b29fa3b16c959b8d Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawnanastasio@yahoo.com>
Date: Thu, 9 Aug 2018 19:13:25 -0500
Subject: [PATCH 4/4] sandbox/linux/system_headers: Update linux signal header
for ppc64
---
sandbox/linux/system_headers/linux_signal.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: chromium-120.0.6099.71/sandbox/linux/system_headers/linux_signal.h
===================================================================
--- chromium-120.0.6099.71.orig/sandbox/linux/system_headers/linux_signal.h
+++ chromium-120.0.6099.71/sandbox/linux/system_headers/linux_signal.h
@@ -13,7 +13,7 @@
// (not undefined, but defined different values and in different memory
// layouts). So, fill the gap here.
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
- defined(__aarch64__)
+ defined(__aarch64__) || defined(__powerpc64__)
#define LINUX_SIGHUP 1
#define LINUX_SIGINT 2

View file

@ -1,7 +1,7 @@
Index: chromium-120.0.6099.71/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
Index: chromium-144.0.7559.59/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
+++ chromium-120.0.6099.71/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)

View file

@ -1,7 +1,7 @@
Index: chromium-120.0.6099.71/third_party/libvpx/source/libvpx/vp9/encoder/ppc/vp9_quantize_vsx.c
Index: chromium-144.0.7559.59/third_party/libvpx/source/libvpx/vp9/encoder/ppc/vp9_quantize_vsx.c
===================================================================
--- chromium-120.0.6099.71.orig/third_party/libvpx/source/libvpx/vp9/encoder/ppc/vp9_quantize_vsx.c
+++ chromium-120.0.6099.71/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));
}
@ -137,10 +137,10 @@ Index: chromium-120.0.6099.71/third_party/libvpx/source/libvpx/vp9/encoder/ppc/v
eob = vec_max(eob, vec_or(scan0, zero_coeff0));
eob2 = vec_max(vec_or(scan1, zero_coeff1), vec_or(scan2, zero_coeff2));
Index: chromium-120.0.6099.71/third_party/libvpx/source/libvpx/vpx_dsp/ppc/fdct32x32_vsx.c
Index: chromium-144.0.7559.59/third_party/libvpx/source/libvpx/vpx_dsp/ppc/fdct32x32_vsx.c
===================================================================
--- chromium-120.0.6099.71.orig/third_party/libvpx/source/libvpx/vpx_dsp/ppc/fdct32x32_vsx.c
+++ chromium-120.0.6099.71/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"
@ -255,10 +255,10 @@ Index: chromium-120.0.6099.71/third_party/libvpx/source/libvpx/vpx_dsp/ppc/fdct3
}
// Returns 1 if negative 0 if positive
Index: chromium-120.0.6099.71/third_party/libvpx/source/libvpx/vpx_dsp/ppc/quantize_vsx.c
Index: chromium-144.0.7559.59/third_party/libvpx/source/libvpx/vpx_dsp/ppc/quantize_vsx.c
===================================================================
--- chromium-120.0.6099.71.orig/third_party/libvpx/source/libvpx/vpx_dsp/ppc/quantize_vsx.c
+++ chromium-120.0.6099.71/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"

View file

@ -1,107 +0,0 @@
From 1d44643a7c7cf650efd1093d22cd5bf859fdcb51 Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawnanastasio@yahoo.com>
Date: Thu, 9 Aug 2018 20:52:13 -0500
Subject: [PATCH] sandbox/linux/seccomp-bpf: Add ppc64 syscall stub
---
sandbox/linux/seccomp-bpf/syscall.cc | 53 ++++++++++++++++++++++++++--
1 file changed, 51 insertions(+), 2 deletions(-)
Index: chromium-120.0.6099.71/sandbox/linux/seccomp-bpf/syscall.cc
===================================================================
--- chromium-120.0.6099.71.orig/sandbox/linux/seccomp-bpf/syscall.cc
+++ chromium-120.0.6099.71/sandbox/linux/seccomp-bpf/syscall.cc
@@ -18,7 +18,7 @@ namespace sandbox {
namespace {
#if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \
- defined(ARCH_CPU_MIPS_FAMILY)
+ defined(ARCH_CPU_MIPS_FAMILY) || defined (ARCH_CPU_PPC64_FAMILY)
// Number that's not currently used by any Linux kernel ABIs.
const int kInvalidSyscallNumber = 0x351d3;
#else
@@ -308,10 +308,54 @@ asm(// We need to be able to tell the ke
"2:ret\n"
".cfi_endproc\n"
".size SyscallAsm, .-SyscallAsm\n"
+#elif defined(__powerpc64__)
+ ".text\n"
+ ".align 4\n"
+ ".type SyscallAsm @function\n"
+ "SyscallAsm:\n"
+ ".cfi_startproc\n"
+
+ // Check if r3 is negative
+ "cmpdi 3, 0\n"
+ "bgt 2f\n"
+
+ // Load address of 3f into r3 and return
+ "mflr 10\n"
+ "bl 1f\n"
+ "1: mflr 3\n"
+ "mtlr 10\n"
+ "addi 3, 3, 4*13\n"
+ "blr\n"
+
+ // Load arguments from array into r3-8
+ // save param 3 in r10
+ "2:\n"
+ "mr 0, 3\n"
+ "ld 3, 0(4)\n"
+ "ld 5, 16(4)\n"
+ "ld 6, 24(4)\n"
+ "ld 7, 32(4)\n"
+ "ld 8, 40(4)\n"
+ "ld 4, 8(4)\n"
+ "li 9, 0\n"
+
+ // Enter kernel
+ "sc\n"
+
+ // Magic return address
+ "3:\n"
+ // Like MIPS, ppc64 return values are always positive.
+ // Check for error in cr0.SO and negate upon error
+ "bc 4, 3, 4f\n"
+ "neg 3, 3\n"
+ "4: blr\n"
+
+ ".cfi_endproc\n"
+ ".size SyscallAsm, .-SyscallAsm\n"
#endif
); // asm
-#if defined(__x86_64__)
+#if defined(__x86_64__) || defined(__powerpc64__)
extern "C" {
intptr_t SyscallAsm(intptr_t nr, const intptr_t args[6]);
}
@@ -425,6 +469,8 @@ intptr_t Syscall::Call(int nr,
ret = inout;
}
+#elif defined(__powerpc64__)
+ intptr_t ret = SyscallAsm(nr, args);
#else
#error "Unimplemented architecture"
#endif
@@ -441,8 +487,18 @@ void Syscall::PutValueInUcontext(intptr_
// needs to be changed back.
ret_val = -ret_val;
SECCOMP_PARM4(ctx) = 1;
- } else
+ } else {
SECCOMP_PARM4(ctx) = 0;
+ }
+#endif
+#if defined(__powerpc64__)
+ // Same as MIPS, need to invert ret and set error register (cr0.SO)
+ if (ret_val <= -1 && ret_val >= -4095) {
+ ret_val = -ret_val;
+ ctx->uc_mcontext.regs->ccr |= (1 << 28);
+ } else {
+ ctx->uc_mcontext.regs->ccr &= ~(1 << 28);
+ }
#endif
SECCOMP_RESULT(ctx) = static_cast<greg_t>(ret_val);
}

View file

@ -1,24 +0,0 @@
From 6a852c4135864ba87b3cbdd0880d7cfecf7cd654 Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawnanastasio@yahoo.com>
Date: Thu, 13 Sep 2018 15:12:22 -0500
Subject: [PATCH 5/6] sandbox/linux: update unit test for ppc64
---
sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
===================================================================
--- chromium-120.0.6099.71.orig/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
+++ chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
@@ -331,8 +331,10 @@ TEST_BASELINE_SIGSYS(__NR_timer_create)
#if !defined(__aarch64__)
TEST_BASELINE_SIGSYS(__NR_inotify_init)
+#if !defined(__powerpc64__)
TEST_BASELINE_SIGSYS(__NR_vserver)
#endif
+#endif
#if defined(LIBC_GLIBC) && !BUILDFLAG(IS_CHROMEOS_ASH)
BPF_TEST_C(BaselinePolicy, FutexEINVAL, BaselinePolicy) {

View file

@ -1,14 +0,0 @@
Index: chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
===================================================================
--- chromium-120.0.6099.71.orig/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
+++ chromium-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
@@ -374,7 +374,9 @@ bool SyscallSets::IsAllowedSignalHandlin
#if defined(__i386__) || defined(__arm__) || \
(defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
defined(__powerpc64__)
+#if !defined(__powerpc64__)
case __NR_rt_sigtimedwait_time64:
+#endif
case __NR_sigaction:
case __NR_sigprocmask:
case __NR_sigreturn:

View file

@ -1,33 +0,0 @@
Index: chromium-120.0.6099.71/sandbox/linux/system_headers/linux_stat.h
===================================================================
--- chromium-120.0.6099.71.orig/sandbox/linux/system_headers/linux_stat.h
+++ chromium-120.0.6099.71/sandbox/linux/system_headers/linux_stat.h
@@ -173,6 +173,28 @@ struct kernel_stat {
unsigned int __unused4;
unsigned int __unused5;
};
+#elif defined(__powerpc64__)
+struct kernel_stat {
+ unsigned long st_dev;
+ ino_t st_ino;
+ unsigned long st_nlink;
+ mode_t st_mode;
+ uid_t st_uid;
+ gid_t st_gid;
+ unsigned long st_rdev;
+ long st_size;
+ unsigned long st_blksize;
+ unsigned long st_blocks;
+ // unsigned long st_atime;
+ unsigned long st_atime_nsec;
+ //unsigned long st_mtime;
+ unsigned long st_mtime_nsec;
+ //unsigned long st_ctime;
+ unsigned long st_ctime_nsec;
+ unsigned long __unused4;
+ unsigned long __unused5;
+ unsigned long __unused6;
+};
#endif
#if !defined(AT_EMPTY_PATH)

View file

@ -1,90 +0,0 @@
Index: chromium-126.0.6478.57/sandbox/policy/linux/bpf_utility_policy_linux.cc
===================================================================
--- chromium-126.0.6478.57.orig/sandbox/policy/linux/bpf_utility_policy_linux.cc
+++ chromium-126.0.6478.57/sandbox/policy/linux/bpf_utility_policy_linux.cc
@@ -34,7 +34,7 @@ ResultExpr UtilityProcessPolicy::Evaluat
case __NR_fdatasync:
case __NR_fsync:
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
- defined(__aarch64__)
+ defined(__aarch64__) || defined(__powerpc64__)
case __NR_getrlimit:
#endif
#if defined(__i386__) || defined(__arm__)
Index: chromium-126.0.6478.57/sandbox/policy/linux/bpf_renderer_policy_linux.cc
===================================================================
--- chromium-126.0.6478.57.orig/sandbox/policy/linux/bpf_renderer_policy_linux.cc
+++ chromium-126.0.6478.57/sandbox/policy/linux/bpf_renderer_policy_linux.cc
@@ -87,7 +87,7 @@ ResultExpr RendererProcessPolicy::Evalua
case __NR_ftruncate64:
#endif
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
- defined(__aarch64__)
+ defined(__aarch64__) || defined(__powerpc64__)
case __NR_getrlimit:
case __NR_setrlimit:
// We allow setrlimit to dynamically adjust the address space limit as
Index: chromium-126.0.6478.57/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
===================================================================
--- chromium-126.0.6478.57.orig/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
+++ chromium-126.0.6478.57/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
@@ -58,9 +58,9 @@
#elif defined(__powerpc64__)
-#include <asm/unistd.h>
+#include <asm-generic/unistd.h>
#define MIN_SYSCALL 0u
-#define MAX_PUBLIC_SYSCALL 386u
+#define MAX_PUBLIC_SYSCALL __NR_syscalls
#define MAX_SYSCALL MAX_PUBLIC_SYSCALL
#else
Index: chromium-126.0.6478.57/sandbox/linux/services/credentials.cc
===================================================================
--- chromium-126.0.6478.57.orig/sandbox/linux/services/credentials.cc
+++ chromium-126.0.6478.57/sandbox/linux/services/credentials.cc
@@ -89,7 +89,8 @@ bool ChrootToSafeEmptyDir() {
int clone_flags = CLONE_FS | LINUX_SIGCHLD;
void* tls = nullptr;
-#if (defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_ARM_FAMILY)) && \
+#if (defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_ARM_FAMILY) || \
+ defined(ARCH_CPU_PPC64_FAMILY)) && \
!defined(MEMORY_SANITIZER)
// Use CLONE_VM | CLONE_VFORK as an optimization to avoid copying page tables.
// Since clone writes to the new child's TLS before returning, we must set a
@@ -97,6 +98,11 @@ bool ChrootToSafeEmptyDir() {
// glibc performs syscalls by calling a function pointer in TLS, so we do not
// attempt this optimization.
// TODO(crbug.com/40196869) Broken in MSan builds after LLVM f1bb30a4956f.
+ //
+ // NOTE: Without CLONE_VM, fontconfig will attempt to reload configuration
+ // in every thread. Since the rendered threads are sandboxed without
+ // filesystem access (e.g. to /etc/fonts/fonts.conf) this will cause font
+ // configuration loading failures and no fonts will be displayed!
clone_flags |= CLONE_VM | CLONE_VFORK | CLONE_SETTLS;
// PTHREAD_STACK_MIN can be dynamic in glibc2.34+, so it is not possible to
Index: chromium-126.0.6478.57/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
===================================================================
--- chromium-126.0.6478.57.orig/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
+++ chromium-126.0.6478.57/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
@@ -357,7 +357,16 @@ intptr_t SIGSYSFstatatHandler(const stru
if (args.nr == __NR_fstatat_default) {
if (*reinterpret_cast<const char*>(args.args[1]) == '\0' &&
args.args[3] == static_cast<uint64_t>(AT_EMPTY_PATH)) {
- return syscall(__NR_fstat_default, static_cast<int>(args.args[0]),
+ int fd = static_cast<int>(args.args[0]);
+#if defined(__powerpc64__)
+ // On ppc64+glibc, some syscalls seem to accidentally negate the first
+ // parameter which causes checks against it to fail. For now, manually
+ // negate them back.
+ // TODO: Investigate the root cause and fix in glibc
+ if (fd < 0)
+ fd = -fd;
+#endif
+ return syscall(__NR_fstat_default, fd,
reinterpret_cast<default_stat_struct*>(args.args[2]));
}
return -reinterpret_cast<intptr_t>(fs_denied_errno);

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

@ -1,13 +1,13 @@
Index: chromium-125.0.6422.41/third_party/skia/src/core/SkRasterPipeline.h
Index: chromium-130.0.6723.44/third_party/skia/src/core/SkRasterPipeline.h
===================================================================
--- chromium-125.0.6422.41.orig/third_party/skia/src/core/SkRasterPipeline.h
+++ chromium-125.0.6422.41/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(SK_CPU_LOONGARCH) && !defined(__powerpc64__)
- !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
#else
#define SK_HAS_MUSTTAIL 0

View file

@ -1,6 +1,8 @@
--- a/third_party/libvpx/generate_gni.sh
+++ b/third_party/libvpx/generate_gni.sh
@@ -423,7 +423,7 @@ gen_config_files linux/mipsel "--target=
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}"
@ -9,10 +11,12 @@
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}"
--- a/third_party/libvpx/source/libvpx/build/make/rtcd.pl
+++ b/third_party/libvpx/source/libvpx/build/make/rtcd.pl
@@ -492,8 +492,9 @@ if ($opts{arch} eq 'x86') {
&require(@REQUIRES);
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/);
@ -23,9 +27,11 @@
} elsif ($opts{arch} =~ /loongarch/ ) {
@ALL_ARCHS = filter(qw/lsx lasx/);
loongarch;
--- a/third_party/libvpx/BUILD.gn
+++ b/third_party/libvpx/BUILD.gn
@@ -94,6 +94,14 @@ config("libvpx_config") {
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",
]
}

View file

@ -1,7 +1,7 @@
Index: chromium-120.0.6099.71/third_party/webrtc/rtc_base/system/arch.h
Index: chromium-144.0.7559.59/third_party/webrtc/rtc_base/system/arch.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/webrtc/rtc_base/system/arch.h
+++ chromium-120.0.6099.71/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__)

View file

@ -1,13 +0,0 @@
Index: chromium-120.0.6099.71/sandbox/linux/services/credentials.cc
===================================================================
--- chromium-120.0.6099.71.orig/sandbox/linux/services/credentials.cc
+++ chromium-120.0.6099.71/sandbox/linux/services/credentials.cc
@@ -80,7 +80,7 @@ bool ChrootToSafeEmptyDir() {
pid_t pid = -1;
alignas(16) char stack_buf[PTHREAD_STACK_MIN];
#if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \
- defined(ARCH_CPU_MIPS_FAMILY)
+ defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_PPC64_FAMILY)
// The stack grows downward.
void* stack = stack_buf + sizeof(stack_buf);
#else

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

File diff suppressed because it is too large Load diff

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,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,22 +0,0 @@
diff -up chromium-114.0.5735.26/sandbox/policy/linux/bpf_network_policy_linux.cc.me chromium-114.0.5735.26/sandbox/policy/linux/bpf_network_policy_linux.cc
--- chromium-114.0.5735.26/sandbox/policy/linux/bpf_network_policy_linux.cc.me 2023-05-13 12:09:44.423727385 +0200
+++ chromium-114.0.5735.26/sandbox/policy/linux/bpf_network_policy_linux.cc 2023-05-13 17:52:19.934347246 +0200
@@ -11,7 +11,6 @@
#include <linux/net.h>
#include <linux/netlink.h>
#include <linux/sockios.h>
-#include <linux/wireless.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <sys/inotify.h>
@@ -48,6 +47,10 @@ using sandbox::syscall_broker::BrokerPro
#define F2FS_IOC_GET_FEATURES _IOR(0xf5, 12, uint32_t)
#endif
+#if !defined(SIOCGIWNAME)
+#define SIOCGIWNAME 0x8B01
+#endif
+
namespace sandbox::policy {
namespace {

View file

@ -1,21 +0,0 @@
diff -up chromium-115.0.5790.24/components/omnibox/browser/omnibox_edit_model.cc.buildflag-el7 chromium-115.0.5790.24/components/omnibox/browser/omnibox_edit_model.cc
--- chromium-115.0.5790.24/components/omnibox/browser/omnibox_edit_model.cc.buildflag-el7 2023-06-07 21:48:29.000000000 +0200
+++ chromium-115.0.5790.24/components/omnibox/browser/omnibox_edit_model.cc 2023-06-17 16:50:46.373867625 +0200
@@ -79,7 +79,7 @@
#include "ui/gfx/vector_icon_types.h"
#endif
-#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+#ifdef GOOGLE_CHROME_BRANDING
#include "components/vector_icons/vector_icons.h" // nogncheck
#endif
@@ -631,7 +631,7 @@ bool OmniboxEditModel::ShouldShowCurrent
ui::ImageModel OmniboxEditModel::GetSuperGIcon(int image_size,
bool dark_mode) const {
-#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+#ifdef GOOGLE_CHROME_BRANDING
if (dark_mode) {
return ui::ImageModel::FromVectorIcon(
vector_icons::kGoogleGLogoMonochromeIcon, ui::kColorRefPrimary100,

View file

@ -1,26 +0,0 @@
diff -up chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc.me chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc
--- chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc.me 2023-06-24 10:38:11.011511463 +0200
+++ chromium-115.0.5790.40/third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.cc 2023-06-24 13:07:35.865375884 +0200
@@ -84,6 +84,7 @@ CanvasStyle::CanvasStyle(const CanvasSty
void CanvasStyle::ApplyToFlags(cc::PaintFlags& flags,
float global_alpha) const {
+ SkColor4f custom_color = SkColor4f{0.0f, 0.0f, 0.0f, global_alpha};
switch (type_) {
case kColor:
ApplyColorToFlags(flags, global_alpha);
@@ -91,12 +92,12 @@ void CanvasStyle::ApplyToFlags(cc::Paint
case kGradient:
GetCanvasGradient()->GetGradient()->ApplyToFlags(flags, SkMatrix::I(),
ImageDrawOptions());
- flags.setColor(SkColor4f(0.0f, 0.0f, 0.0f, global_alpha));
+ flags.setColor(custom_color);
break;
case kImagePattern:
GetCanvasPattern()->GetPattern()->ApplyToFlags(
flags, AffineTransformToSkMatrix(GetCanvasPattern()->GetTransform()));
- flags.setColor(SkColor4f(0.0f, 0.0f, 0.0f, global_alpha));
+ flags.setColor(custom_color);
break;
default:
NOTREACHED();

View file

@ -1,21 +0,0 @@
diff -up chromium-117.0.5938.62/net/dns/host_resolver_cache.cc.me chromium-117.0.5938.62/net/dns/host_resolver_cache.cc
diff -up chromium-117.0.5938.62/net/dns/host_resolver_cache.h.me chromium-117.0.5938.62/net/dns/host_resolver_cache.h
--- chromium-117.0.5938.62/net/dns/host_resolver_cache.h.me 2023-09-14 15:21:24.632965004 +0200
+++ chromium-117.0.5938.62/net/dns/host_resolver_cache.h 2023-09-15 09:15:48.511300845 +0200
@@ -143,12 +143,14 @@ class NET_EXPORT HostResolverCache final
}
bool operator()(const Key& lhs, const KeyRef& rhs) const {
+ const std::string rhs_domain_name{rhs.domain_name};
return std::tie(lhs.domain_name, lhs.network_anonymization_key) <
- std::tie(rhs.domain_name, *rhs.network_anonymization_key);
+ std::tie(rhs_domain_name, *rhs.network_anonymization_key);
}
bool operator()(const KeyRef& lhs, const Key& rhs) const {
- return std::tie(lhs.domain_name, *lhs.network_anonymization_key) <
+ const std::string lhs_domain_name{lhs.domain_name};
+ return std::tie(lhs_domain_name, *lhs.network_anonymization_key) <
std::tie(rhs.domain_name, rhs.network_anonymization_key);
}
};

View file

@ -1,24 +0,0 @@
diff -up chromium-118.0.5993.54/media/capture/video/linux/v4l2_capture_delegate.cc.me chromium-118.0.5993.54/media/capture/video/linux/v4l2_capture_delegate.cc
--- chromium-118.0.5993.54/media/capture/video/linux/v4l2_capture_delegate.cc.me 2023-10-07 12:24:51.194618144 +0200
+++ chromium-118.0.5993.54/media/capture/video/linux/v4l2_capture_delegate.cc 2023-10-07 12:26:30.727448581 +0200
@@ -1219,7 +1219,7 @@ void V4L2CaptureDelegate::SetErrorState(
client_->OnError(error, from_here, reason);
}
-#if BUILDFLAG(IS_LINUX)
+#if 0 //BUILDFLAG(IS_LINUX)
gfx::ColorSpace V4L2CaptureDelegate::BuildColorSpaceFromv4l2() {
v4l2_colorspace v4l2_primary = (v4l2_colorspace)video_fmt_.fmt.pix.colorspace;
v4l2_quantization v4l2_range =
diff -up chromium-118.0.5993.54/media/capture/video/linux/v4l2_capture_delegate.h.me chromium-118.0.5993.54/media/capture/video/linux/v4l2_capture_delegate.h
--- chromium-118.0.5993.54/media/capture/video/linux/v4l2_capture_delegate.h.me 2023-10-07 12:29:35.588406023 +0200
+++ chromium-118.0.5993.54/media/capture/video/linux/v4l2_capture_delegate.h 2023-10-07 12:28:42.057036014 +0200
@@ -133,7 +133,7 @@ class CAPTURE_EXPORT V4L2CaptureDelegate
const base::Location& from_here,
const std::string& reason);
-#if BUILDFLAG(IS_LINUX)
+#if 0 //BUILDFLAG(IS_LINUX)
// Systems which describe a "color space" usually map that to one or more of
// {primary, matrix, transfer, range}. BuildColorSpaceFromv4l2() will use the
// matched value as first priority. Otherwise, if there is no best matching

View file

@ -1,65 +0,0 @@
diff -up chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc.system-minizip chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc
--- chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc.system-minizip 2023-11-06 12:42:34.928657960 +0100
+++ chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc 2023-11-06 12:51:12.547834851 +0100
@@ -28,9 +28,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-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc.system-minizip chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc
--- chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc.system-minizip 2023-11-01 19:11:24.000000000 +0100
+++ chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc 2023-11-06 12:42:34.928657960 +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-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc.system-minizip chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc
--- chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc.system-minizip 2023-11-01 19:11:24.000000000 +0100
+++ chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc 2023-11-06 12:42:34.929657982 +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-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc.system-minizip chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc
--- chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc.system-minizip 2023-11-01 19:11:24.000000000 +0100
+++ chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc 2023-11-06 12:42:34.929657982 +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-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h.system-minizip chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h
--- chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h.system-minizip 2023-11-01 19:11:24.000000000 +0100
+++ chromium-119.0.6045.105/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h 2023-11-06 12:42:34.929657982 +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,42 +0,0 @@
diff -up chromium-120.0.6099.35/build/linux/unbundle/libusb.gn.system-libusb chromium-120.0.6099.35/build/linux/unbundle/libusb.gn
--- chromium-120.0.6099.35/build/linux/unbundle/libusb.gn.system-libusb 2023-11-22 20:31:32.000000000 +0100
+++ chromium-120.0.6099.35/build/linux/unbundle/libusb.gn 2023-11-26 11:46:14.559263668 +0100
@@ -1,3 +1,27 @@
+# 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" ]
+}
import("//build/config/linux/pkg_config.gni")
import("//build/shim_headers.gni")
diff -up chromium-120.0.6099.35/build/linux/unbundle/replace_gn_files.py.system-libusb chromium-120.0.6099.35/build/linux/unbundle/replace_gn_files.py
--- chromium-120.0.6099.35/build/linux/unbundle/replace_gn_files.py.system-libusb 2023-11-26 11:46:14.559263668 +0100
+++ chromium-120.0.6099.35/build/linux/unbundle/replace_gn_files.py 2023-11-26 12:05:20.542665877 +0100
@@ -56,6 +56,7 @@ REPLACEMENTS = {
'libevent': 'third_party/libevent/BUILD.gn',
'libjpeg': 'third_party/libjpeg.gni',
'libpng': 'third_party/libpng/BUILD.gn',
+ 'libusb': 'third_party/libusb/BUILD.gn',
'libsecret' : 'third_party/libsecret/BUILD.gn',
'libusb': 'third_party/libusb/BUILD.gn',
'libvpx': 'third_party/libvpx/BUILD.gn',

View file

@ -1,15 +0,0 @@
--- chromium-121.0.6167.57/third_party/libc++/src/include/__config.orig 2024-01-16 18:38:00.995930774 +0100
+++ chromium-121.0.6167.57/third_party/libc++/src/include/__config 2024-01-16 18:43:47.056517289 +0100
@@ -32,11 +32,7 @@
// Warn if a compiler version is used that is not supported anymore
// LLVM RELEASE Update the minimum compiler versions
-# if defined(_LIBCPP_CLANG_VER)
-# if _LIBCPP_CLANG_VER < 1600
-# warning "Libc++ only supports Clang 16 and later"
-# endif
-# elif defined(_LIBCPP_APPLE_CLANG_VER)
+# if defined(_LIBCPP_APPLE_CLANG_VER)
# if _LIBCPP_APPLE_CLANG_VER < 1500
# warning "Libc++ only supports AppleClang 15 and later"
# endif

View file

@ -1,34 +0,0 @@
diff -up chromium-121.0.6167.57/media/ffmpeg/ffmpeg_common.cc.me chromium-121.0.6167.57/media/ffmpeg/ffmpeg_common.cc
--- chromium-121.0.6167.57/media/ffmpeg/ffmpeg_common.cc.me 2024-01-16 10:54:38.994173911 +0100
+++ chromium-121.0.6167.57/media/ffmpeg/ffmpeg_common.cc 2024-01-16 11:06:20.974160612 +0100
@@ -710,8 +710,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 (int i = 0; i < stream->codecpar->nb_coded_side_data; ++i) {
const auto& side_data = stream->codecpar->coded_side_data[i];
+#endif
switch (side_data.type) {
case AV_PKT_DATA_DISPLAYMATRIX: {
CHECK_EQ(side_data.size, sizeof(int32_t) * 3 * 3);
diff -up chromium-121.0.6167.57/media/filters/audio_video_metadata_extractor.cc.me chromium-121.0.6167.57/media/filters/audio_video_metadata_extractor.cc
--- chromium-121.0.6167.57/media/filters/audio_video_metadata_extractor.cc.me 2024-01-16 11:12:27.521534151 +0100
+++ chromium-121.0.6167.57/media/filters/audio_video_metadata_extractor.cc 2024-01-16 11:15:08.717337026 +0100
@@ -113,8 +113,13 @@ bool AudioVideoMetadataExtractor::Extrac
if (!stream)
continue;
+#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 (int j = 0; j < stream->codecpar->nb_coded_side_data; j++) {
const AVPacketSideData& sd = stream->codecpar->coded_side_data[j];
+#endif
if (sd.type == AV_PKT_DATA_DISPLAYMATRIX) {
CHECK_EQ(sd.size, sizeof(int32_t) * 3 * 3);
rotation_ = VideoTransformation::FromFFmpegDisplayMatrix(

View file

@ -1,11 +0,0 @@
diff -up chromium-122.0.6261.69/third_party/pdfium/core/fxcrt/fx_memory_wrappers.h.me chromium-122.0.6261.69/third_party/pdfium/core/fxcrt/fx_memory_wrappers.h
--- chromium-122.0.6261.69/third_party/pdfium/core/fxcrt/fx_memory_wrappers.h.me 2024-02-24 13:02:58.931586003 +0100
+++ chromium-122.0.6261.69/third_party/pdfium/core/fxcrt/fx_memory_wrappers.h 2024-02-24 13:03:33.152251546 +0100
@@ -82,6 +82,7 @@ struct FxPartitionAllocAllocator {
}
// There's no state, so they are all the same,
+ bool operator==(const FxPartitionAllocAllocator&) const { return true; }
bool operator==(const FxPartitionAllocAllocator& that) { return true; }
bool operator!=(const FxPartitionAllocAllocator& that) { return false; }
};

View file

@ -1,62 +0,0 @@
ld.lld: error: undefined symbol: unsigned long cc::PaintOpWriter::SerializedSize<unsigned long>()
diff -up chromium-122.0.6261.69/cc/paint/paint_op_writer.h.me chromium-122.0.6261.69/cc/paint/paint_op_writer.h
--- chromium-122.0.6261.69/cc/paint/paint_op_writer.h.me 2024-02-25 12:04:07.008177603 +0100
+++ chromium-122.0.6261.69/cc/paint/paint_op_writer.h 2024-02-25 12:14:45.972117522 +0100
@@ -112,7 +112,17 @@ class CC_PAINT_EXPORT PaintOpWriter {
private:
template <typename T>
- static constexpr size_t SerializedSizeSimple();
+ static constexpr size_t SerializedSizeSimple() {
+ static_assert(!std::is_pointer_v<T>);
+ return base::bits::AlignUp(sizeof(T), kDefaultAlignment);
+ }
+
+ // size_t is always serialized as two uint32_ts to make the serialized result
+ // portable between 32bit and 64bit processes.
+ template <>
+ constexpr size_t SerializedSizeSimple<size_t>() {
+ return base::bits::AlignUp(2 * sizeof(uint32_t), kDefaultAlignment);
+ }
public:
// SerializedSize() returns the maximum serialized size of the given type or
@@ -123,7 +133,10 @@ class CC_PAINT_EXPORT PaintOpWriter {
// deserialization, and make it possible to allow dynamic sizing for some
// data types (see the specialized/overloaded functions).
template <typename T>
- static constexpr size_t SerializedSize();
+ static constexpr size_t SerializedSize() {
+ static_assert(std::is_arithmetic_v<T> || std::is_enum_v<T>);
+ return SerializedSizeSimple<T>();
+ }
template <typename T>
static constexpr size_t SerializedSize(const T& data);
static size_t SerializedSize(const PaintImage& image);
@@ -439,24 +452,6 @@ class CC_PAINT_EXPORT PaintOpWriter {
};
template <typename T>
-constexpr size_t PaintOpWriter::SerializedSizeSimple() {
- static_assert(!std::is_pointer_v<T>);
- return base::bits::AlignUp(sizeof(T), kDefaultAlignment);
-}
-
-// size_t is always serialized as two uint32_ts to make the serialized result
-// portable between 32bit and 64bit processes.
-template <>
-constexpr size_t PaintOpWriter::SerializedSizeSimple<size_t>() {
- return base::bits::AlignUp(2 * sizeof(uint32_t), kDefaultAlignment);
-}
-
-template <typename T>
-constexpr size_t PaintOpWriter::SerializedSize() {
- static_assert(std::is_arithmetic_v<T> || std::is_enum_v<T>);
- return SerializedSizeSimple<T>();
-}
-template <typename T>
constexpr size_t PaintOpWriter::SerializedSize(const T& data) {
return SerializedSizeSimple<T>();
}

View file

@ -1,63 +0,0 @@
diff -up chromium-122.0.6261.29/chrome/browser/safe_browsing/download_protection/file_analyzer.cc.nounrar chromium-122.0.6261.29/chrome/browser/safe_browsing/download_protection/file_analyzer.cc
--- chromium-122.0.6261.29/chrome/browser/safe_browsing/download_protection/file_analyzer.cc.nounrar 2024-02-07 19:49:25.000000000 +0100
+++ chromium-122.0.6261.29/chrome/browser/safe_browsing/download_protection/file_analyzer.cc 2024-02-11 18:55:29.964450604 +0100
@@ -79,8 +79,6 @@ void FileAnalyzer::Start(const base::Fil
if (inspection_type == DownloadFileType::ZIP) {
StartExtractZipFeatures();
- } else if (inspection_type == DownloadFileType::RAR) {
- StartExtractRarFeatures();
#if BUILDFLAG(IS_MAC)
} else if (inspection_type == DownloadFileType::DMG) {
StartExtractDmgFeatures();
diff -up chromium-122.0.6261.29/chrome/common/safe_browsing/BUILD.gn.nounrar chromium-122.0.6261.29/chrome/common/safe_browsing/BUILD.gn
--- chromium-122.0.6261.29/chrome/common/safe_browsing/BUILD.gn.nounrar 2024-02-07 19:49:27.000000000 +0100
+++ chromium-122.0.6261.29/chrome/common/safe_browsing/BUILD.gn 2024-02-11 18:55:29.965450629 +0100
@@ -143,7 +143,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",
]
public_deps = [
diff -up chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.cc.nounrar chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.cc
--- chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.cc.nounrar 2024-02-07 19:49:27.000000000 +0100
+++ chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.cc 2024-02-11 23:49:25.061324007 +0100
@@ -74,6 +74,7 @@ void SafeArchiveAnalyzer::AnalyzeRarFile
const std::optional<std::string>& password,
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);
@@ -90,6 +91,9 @@ void SafeArchiveAnalyzer::AnalyzeRarFile
/*password=*/password,
std::move(analysis_finished_callback),
std::move(temp_file_getter_callback), &results_);
+#else
+ NOTREACHED();
+#endif
}
void SafeArchiveAnalyzer::AnalyzeSevenZipFile(
diff -up chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.h.nounrar chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.h
--- chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.h.nounrar 2024-02-07 19:49:27.000000000 +0100
+++ chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.h 2024-02-11 18:55:29.966450653 +0100
@@ -9,7 +9,6 @@
#include "chrome/common/safe_browsing/archive_analyzer_results.h"
#include "chrome/services/file_util/public/mojom/safe_archive_analyzer.mojom.h"
-#include "chrome/utility/safe_browsing/rar_analyzer.h"
#include "chrome/utility/safe_browsing/seven_zip_analyzer.h"
#include "chrome/utility/safe_browsing/zip_analyzer.h"
#include "mojo/public/cpp/bindings/remote.h"
@@ -67,7 +66,6 @@ class SafeArchiveAnalyzer : public chrom
void Timeout();
safe_browsing::ZipAnalyzer zip_analyzer_;
- safe_browsing::RarAnalyzer rar_analyzer_;
safe_browsing::SevenZipAnalyzer seven_zip_analyzer_;
#if BUILDFLAG(IS_MAC)
safe_browsing::dmg::DMGAnalyzer dmg_analyzer_;

View file

@ -1,98 +0,0 @@
diff -up chromium-114.0.5735.35/media/gpu/vaapi/vaapi_video_encode_accelerator.cc.me chromium-114.0.5735.35/media/gpu/vaapi/vaapi_video_encode_accelerator.cc
--- chromium-114.0.5735.35/media/gpu/vaapi/vaapi_video_encode_accelerator.cc.me 2023-05-21 10:05:00.357860329 +0200
+++ chromium-114.0.5735.35/media/gpu/vaapi/vaapi_video_encode_accelerator.cc 2023-05-21 10:18:09.665432735 +0200
@@ -41,7 +41,6 @@
#include "media/gpu/gpu_video_encode_accelerator_helpers.h"
#include "media/gpu/h264_dpb.h"
#include "media/gpu/macros.h"
-#include "media/gpu/vaapi/av1_vaapi_video_encoder_delegate.h"
#include "media/gpu/vaapi/h264_vaapi_video_encoder_delegate.h"
#include "media/gpu/vaapi/va_surface.h"
#include "media/gpu/vaapi/vaapi_common.h"
@@ -200,7 +199,7 @@ bool VaapiVideoEncodeAccelerator::Initia
const VideoCodec codec = VideoCodecProfileToVideoCodec(config.output_profile);
if (codec != VideoCodec::kH264 && codec != VideoCodec::kVP8 &&
- codec != VideoCodec::kVP9 && codec != VideoCodec::kAV1) {
+ codec != VideoCodec::kVP9) {
MEDIA_LOG(ERROR, media_log.get())
<< "Unsupported profile: " << GetProfileName(config.output_profile);
return false;
@@ -293,7 +292,6 @@ void VaapiVideoEncodeAccelerator::Initia
break;
case VideoCodec::kVP8:
case VideoCodec::kVP9:
- case VideoCodec::kAV1:
mode = VaapiWrapper::kEncodeConstantQuantizationParameter;
break;
default:
@@ -356,12 +354,6 @@ void VaapiVideoEncodeAccelerator::Initia
vaapi_wrapper_, error_cb);
}
break;
- case VideoCodec::kAV1:
- if (!IsConfiguredForTesting()) {
- encoder_ = std::make_unique<AV1VaapiVideoEncoderDelegate>(
- vaapi_wrapper_, error_cb);
- }
- break;
default:
NOTREACHED() << "Unsupported codec type " << GetCodecName(output_codec_);
return;
@@ -835,10 +827,6 @@ VaapiVideoEncodeAccelerator::CreateEncod
case VideoCodec::kVP9:
picture = new VaapiVP9Picture(std::move(reconstructed_surface));
break;
- case VideoCodec::kAV1:
- picture = new VaapiAV1Picture(/*display_va_surface=*/nullptr,
- std::move(reconstructed_surface));
- break;
default:
return nullptr;
}
diff -up chromium-114.0.5735.35/media/gpu/vaapi/BUILD.gn.revert-av1enc chromium-114.0.5735.35/media/gpu/vaapi/BUILD.gn
--- chromium-114.0.5735.35/media/gpu/vaapi/BUILD.gn.revert-av1enc 2023-05-18 00:37:57.000000000 +0200
+++ chromium-114.0.5735.35/media/gpu/vaapi/BUILD.gn 2023-05-20 13:14:10.756183626 +0200
@@ -38,8 +38,6 @@ source_set("vaapi") {
sources = [
"av1_vaapi_video_decoder_delegate.cc",
"av1_vaapi_video_decoder_delegate.h",
- "av1_vaapi_video_encoder_delegate.cc",
- "av1_vaapi_video_encoder_delegate.h",
"h264_vaapi_video_decoder_delegate.cc",
"h264_vaapi_video_decoder_delegate.h",
"h264_vaapi_video_encoder_delegate.cc",
diff -up chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.cc.me chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.cc
--- chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.cc.me 2023-11-02 15:08:30.921325747 +0100
+++ chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.cc 2023-11-02 15:09:46.123692602 +0100
@@ -3124,6 +3124,7 @@ bool VaapiWrapper::GetSupportedPackedHea
return true;
}
+#if 0 //disable AV1 due to old libva on epel9
bool VaapiWrapper::GetMinAV1SegmentSize(VideoCodecProfile profile,
uint32_t& min_seg_size) {
CHECK(!enforce_sequence_affinity_ ||
@@ -3141,6 +3142,7 @@ bool VaapiWrapper::GetMinAV1SegmentSize(
return true;
}
+#endif
bool VaapiWrapper::BlitSurface(const VASurface& va_surface_src,
const VASurface& va_surface_dest,
diff -up chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.h.me chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.h
--- chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.h.me 2023-11-02 15:09:58.973928395 +0100
+++ chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.h 2023-11-02 15:10:45.990791114 +0100
@@ -553,9 +553,11 @@ class MEDIA_GPU_EXPORT VaapiWrapper
bool& packed_pps,
bool& packed_slice);
+#if 0 //disable AV1 due to old libva on epel9
// Gets the minimum segment block size supported for AV1 encoding.
[[nodiscard]] bool GetMinAV1SegmentSize(VideoCodecProfile profile,
uint32_t& min_seg_size);
+#endif
// Blits a VASurface |va_surface_src| into another VASurface
// |va_surface_dest| applying pixel format conversion, cropping

View file

@ -1,228 +0,0 @@
commit 57526b8dc45b2e6c67bba7306f1dde73b1f2910c
Author: sisidovski <sisidovski@chromium.org>
Date: Tue Oct 24 09:32:49 2023 +0000
Remove unused items from the RaceNetworkRequest hashmap
When the AutoPreload or the race-network-and-fetch-handler option in the
static routing API is enabled, network requests are dispatched and
URLLoaderFactories are held in a hashmap in ServiceWorkerGlobalScope.
Those are consumed inside the fetch handler when fetch(e.request) is
called. But if the fetch handler doesn't call fetch() e.g. fallback,
those hashmap items does not have a chance to be removed.
This CL changes the hashmap items to be removed when the fetch event
finishes, and the URLLoaderFactory is still not consumed at that time.
This may loose the dedupe capability if fetch() is called later e.g.
setTimeout(() => fetch()), but it makes sense to prioritize keeping the
hashmap small.
Change-Id: I51bdc9d5eb5185f2b5b4df6ee785715b1180c848
Bug: 1492640
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4964840
Reviewed-by: Minoru Chikamune <chikamune@chromium.org>
Commit-Queue: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Reviewed-by: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1214064}
diff -up chromium-123.0.6312.46/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.cc.me chromium-123.0.6312.46/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.cc
--- chromium-123.0.6312.46/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.cc.me 2024-03-18 10:34:27.604707632 +0100
+++ chromium-123.0.6312.46/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.cc 2024-03-18 11:52:14.309983505 +0100
@@ -46,7 +46,6 @@
#include "services/network/public/cpp/cross_origin_embedder_policy.h"
#include "services/network/public/mojom/cookie_manager.mojom-blink.h"
#include "services/network/public/mojom/cross_origin_embedder_policy.mojom.h"
-#include "services/network/public/mojom/url_loader_factory.mojom-blink.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
#include "third_party/blink/public/mojom/notifications/notification.mojom-blink.h"
@@ -1097,10 +1096,6 @@ void ServiceWorkerGlobalScope::DidHandle
TRACE_ID_WITH_SCOPE(kServiceWorkerGlobalScopeTraceScope,
TRACE_ID_LOCAL(event_id)),
TRACE_EVENT_FLAG_FLOW_IN, "status", MojoEnumToString(status));
-
- // Delete the URLLoaderFactory for the RaceNetworkRequest if it's not used.
- RemoveItemFromRaceNetworkRequests(event_id);
-
if (!RunEventCallback(&fetch_event_callbacks_, event_queue_.get(), event_id,
status)) {
// The event may have been aborted. Its response callback also needs to be
@@ -1500,7 +1495,6 @@ void ServiceWorkerGlobalScope::AbortCall
response_callback_iter->value->TakeValue().reset();
fetch_response_callbacks_.erase(response_callback_iter);
}
- RemoveItemFromRaceNetworkRequests(event_id);
// Run the event callback with the error code.
auto event_callback_iter = fetch_event_callbacks_.find(event_id);
@@ -1588,11 +1582,52 @@ void ServiceWorkerGlobalScope::StartFetc
if (params->race_network_request_loader_factory &&
params->request->service_worker_race_network_request_token) {
- InsertNewItemToRaceNetworkRequests(
- event_id,
- params->request->service_worker_race_network_request_token.value(),
- std::move(params->race_network_request_loader_factory),
- params->request->url);
+ auto insert_result = race_network_request_loader_factories_.insert(
+ String(params->request->service_worker_race_network_request_token
+ ->ToString()),
+ std::move(params->race_network_request_loader_factory));
+
+ // DumpWithoutCrashing if the token is empty, or not inserted as a new entry
+ // to |race_network_request_loader_factories_|.
+ // TODO(crbug.com/1492640) Remove DumpWithoutCrashing once we collect data
+ // and identify the cause.
+ static bool has_dumped_without_crashing_for_empty_token = false;
+ static bool has_dumped_without_crashing_for_not_new_entry = false;
+ if (!has_dumped_without_crashing_for_empty_token &&
+ params->request->service_worker_race_network_request_token
+ ->is_empty()) {
+ has_dumped_without_crashing_for_empty_token = true;
+ SCOPED_CRASH_KEY_BOOL(
+ "SWGlobalScope", "empty_race_token",
+ params->request->service_worker_race_network_request_token
+ ->is_empty());
+ SCOPED_CRASH_KEY_STRING64(
+ "SWGlobalScope", "race_token_string",
+ params->request->service_worker_race_network_request_token
+ ->ToString());
+ SCOPED_CRASH_KEY_BOOL("SWGlobalScope", "race_insert_new_entry",
+ insert_result.is_new_entry);
+ SCOPED_CRASH_KEY_STRING256("SWGlobalScope", "race_request_url",
+ params->request->url.GetString().Utf8());
+ base::debug::DumpWithoutCrashing();
+ }
+ if (!has_dumped_without_crashing_for_not_new_entry &&
+ !insert_result.is_new_entry) {
+ has_dumped_without_crashing_for_not_new_entry = true;
+ SCOPED_CRASH_KEY_BOOL(
+ "SWGlobalScope", "empty_race_token",
+ params->request->service_worker_race_network_request_token
+ ->is_empty());
+ SCOPED_CRASH_KEY_STRING64(
+ "SWGlobalScope", "race_token_string",
+ params->request->service_worker_race_network_request_token
+ ->ToString());
+ SCOPED_CRASH_KEY_BOOL("SWGlobalScope", "race_insert_new_entry",
+ insert_result.is_new_entry);
+ SCOPED_CRASH_KEY_STRING256("SWGlobalScope", "race_request_url",
+ params->request->url.GetString().Utf8());
+ base::debug::DumpWithoutCrashing();
+ }
}
Request* request = Request::Create(
@@ -2805,71 +2840,12 @@ bool ServiceWorkerGlobalScope::SetAttrib
std::optional<mojo::PendingRemote<network::mojom::blink::URLLoaderFactory>>
ServiceWorkerGlobalScope::FindRaceNetworkRequestURLLoaderFactory(
const base::UnguessableToken& token) {
- std::unique_ptr<RaceNetworkRequestInfo> result =
- race_network_requests_.Take(String(token.ToString()));
+ mojo::PendingRemote<network::mojom::blink::URLLoaderFactory> result =
+ race_network_request_loader_factories_.Take(String(token.ToString()));
if (result) {
- race_network_request_fetch_event_ids_.erase(result->fetch_event_id);
- return std::optional<
- mojo::PendingRemote<network::mojom::blink::URLLoaderFactory>>(
- std::move(result->url_loader_factory));
+ return result;
}
return std::nullopt;
}
-void ServiceWorkerGlobalScope::InsertNewItemToRaceNetworkRequests(
- int fetch_event_id,
- const base::UnguessableToken& token,
- mojo::PendingRemote<network::mojom::blink::URLLoaderFactory>
- url_loader_factory,
- const KURL& request_url) {
- auto race_network_request_token = String(token.ToString());
- auto info = std::make_unique<RaceNetworkRequestInfo>(
- fetch_event_id, race_network_request_token,
- std::move(url_loader_factory));
- race_network_request_fetch_event_ids_.insert(fetch_event_id, info.get());
- auto insert_result = race_network_requests_.insert(race_network_request_token,
- std::move(info));
-
- // DumpWithoutCrashing if the token is empty, or not inserted as a new entry
- // to |race_network_request_loader_factories_|.
- // TODO(crbug.com/1492640) Remove DumpWithoutCrashing once we collect data
- // and identify the cause.
- static bool has_dumped_without_crashing_for_empty_token = false;
- static bool has_dumped_without_crashing_for_not_new_entry = false;
- if (!has_dumped_without_crashing_for_empty_token && token.is_empty()) {
- has_dumped_without_crashing_for_empty_token = true;
- SCOPED_CRASH_KEY_BOOL("SWGlobalScope", "empty_race_token",
- token.is_empty());
- SCOPED_CRASH_KEY_STRING64("SWGlobalScope", "race_token_string",
- token.ToString());
- SCOPED_CRASH_KEY_BOOL("SWGlobalScope", "race_insert_new_entry",
- insert_result.is_new_entry);
- SCOPED_CRASH_KEY_STRING256("SWGlobalScope", "race_request_url",
- request_url.GetString().Utf8());
- base::debug::DumpWithoutCrashing();
- }
- if (!has_dumped_without_crashing_for_not_new_entry &&
- !insert_result.is_new_entry) {
- has_dumped_without_crashing_for_not_new_entry = true;
- SCOPED_CRASH_KEY_BOOL("SWGlobalScope", "empty_race_token",
- token.is_empty());
- SCOPED_CRASH_KEY_STRING64("SWGlobalScope", "race_token_string",
- token.ToString());
- SCOPED_CRASH_KEY_BOOL("SWGlobalScope", "race_insert_new_entry",
- insert_result.is_new_entry);
- SCOPED_CRASH_KEY_STRING256("SWGlobalScope", "race_request_url",
- request_url.GetString().Utf8());
- base::debug::DumpWithoutCrashing();
- }
-}
-
-void ServiceWorkerGlobalScope::RemoveItemFromRaceNetworkRequests(
- int fetch_event_id) {
- RaceNetworkRequestInfo* info =
- race_network_request_fetch_event_ids_.Take(fetch_event_id);
- if (info) {
- race_network_requests_.erase(info->token);
- }
-}
-
} // namespace blink
diff -up chromium-123.0.6312.46/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h.me chromium-123.0.6312.46/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h
--- chromium-123.0.6312.46/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h.me 2024-03-18 10:26:14.905817501 +0100
+++ chromium-123.0.6312.46/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h 2024-03-18 11:47:58.202198028 +0100
@@ -623,14 +623,6 @@ class MODULES_EXPORT ServiceWorkerGlobal
// ServiceWorker.FetchEvent.QueuingTime histogram.
void RecordQueuingTime(base::TimeTicks created_time);
- void InsertNewItemToRaceNetworkRequests(
- int fetch_event_id,
- const base::UnguessableToken& token,
- mojo::PendingRemote<network::mojom::blink::URLLoaderFactory>
- url_loader_factory,
- const KURL& request_url);
- void RemoveItemFromRaceNetworkRequests(int fetch_event_id);
-
Member<ServiceWorkerClients> clients_;
Member<ServiceWorkerRegistration> registration_;
Member<::blink::ServiceWorker> service_worker_;
@@ -776,17 +768,10 @@ class MODULES_EXPORT ServiceWorkerGlobal
blink::BlinkStorageKey storage_key_;
- struct RaceNetworkRequestInfo {
- int fetch_event_id;
- String token;
- mojo::PendingRemote<network::mojom::blink::URLLoaderFactory>
- url_loader_factory;
- };
// TODO(crbug.com/918702) WTF::HashMap cannot use base::UnguessableToken as a
// key. As a workaround uses WTF::String as a key instead.
- HashMap<String, std::unique_ptr<RaceNetworkRequestInfo>>
- race_network_requests_;
- HashMap<int, RaceNetworkRequestInfo*> race_network_request_fetch_event_ids_;
+ HashMap<String, mojo::PendingRemote<network::mojom::blink::URLLoaderFactory>>
+ race_network_request_loader_factories_;
HeapMojoAssociatedRemote<mojom::blink::AssociatedInterfaceProvider>
remote_associated_interfaces_{this};

View file

@ -1,133 +0,0 @@
diff -Nur chromium-123.0.6312.46/third_party/rust/chromium_crates_io/vendor/clap_lex-0.7.0/src/ext.rs.me chromium-123.0.6312.46/third_party/rust/chromium_crates_io/vendor/clap_lex-0.7.0/src/ext.rs
--- chromium-123.0.6312.46/third_party/rust/chromium_crates_io/vendor/clap_lex-0.7.0/src/ext.rs.me 2024-03-13 20:36:17.000000000 +0100
+++ chromium-123.0.6312.46/third_party/rust/chromium_crates_io/vendor/clap_lex-0.7.0/src/ext.rs 2024-03-13 00:38:18.000000000 +0100
@@ -2,9 +2,6 @@
pub trait OsStrExt: private::Sealed {
/// Converts to a string slice.
- ///
- /// The Utf8Error is guaranteed to have a valid UTF8 boundary
- /// in its `valid_up_to()`
fn try_str(&self) -> Result<&str, std::str::Utf8Error>;
/// Returns `true` if the given pattern matches a sub-slice of
/// this string slice.
@@ -183,7 +180,7 @@
impl OsStrExt for OsStr {
fn try_str(&self) -> Result<&str, std::str::Utf8Error> {
- let bytes = self.as_encoded_bytes();
+ let bytes = to_bytes(self);
std::str::from_utf8(bytes)
}
@@ -192,22 +189,22 @@
}
fn find(&self, needle: &str) -> Option<usize> {
- let bytes = self.as_encoded_bytes();
+ let bytes = to_bytes(self);
(0..=self.len().checked_sub(needle.len())?)
.find(|&x| bytes[x..].starts_with(needle.as_bytes()))
}
fn strip_prefix(&self, prefix: &str) -> Option<&OsStr> {
- let bytes = self.as_encoded_bytes();
+ let bytes = to_bytes(self);
bytes.strip_prefix(prefix.as_bytes()).map(|s| {
// SAFETY:
- // - This came from `as_encoded_bytes`
- // - Since `prefix` is `&str`, any split will be along UTF-8 boundary
- unsafe { OsStr::from_encoded_bytes_unchecked(s) }
+ // - This came from `to_bytes`
+ // - Since `prefix` is `&str`, any split will be along UTF-8 boundarie
+ unsafe { to_os_str_unchecked(s) }
})
}
fn starts_with(&self, prefix: &str) -> bool {
- let bytes = self.as_encoded_bytes();
+ let bytes = to_bytes(self);
bytes.starts_with(prefix.as_bytes())
}
@@ -222,18 +219,13 @@
fn split_once(&self, needle: &'_ str) -> Option<(&OsStr, &OsStr)> {
let start = self.find(needle)?;
let end = start + needle.len();
- let haystack = self.as_encoded_bytes();
+ let haystack = to_bytes(self);
let first = &haystack[0..start];
let second = &haystack[end..];
// SAFETY:
- // - This came from `as_encoded_bytes`
- // - Since `needle` is `&str`, any split will be along UTF-8 boundary
- unsafe {
- Some((
- OsStr::from_encoded_bytes_unchecked(first),
- OsStr::from_encoded_bytes_unchecked(second),
- ))
- }
+ // - This came from `to_bytes`
+ // - Since `needle` is `&str`, any split will be along UTF-8 boundarie
+ unsafe { Some((to_os_str_unchecked(first), to_os_str_unchecked(second))) }
}
}
@@ -243,6 +235,45 @@
impl Sealed for std::ffi::OsStr {}
}
+/// Allow access to raw bytes
+///
+/// As the non-UTF8 encoding is not defined, the bytes only make sense when compared with
+/// 7-bit ASCII or `&str`
+///
+/// # Compatibility
+///
+/// There is no guarantee how non-UTF8 bytes will be encoded, even within versions of this crate
+/// (since its dependent on rustc)
+fn to_bytes(s: &OsStr) -> &[u8] {
+ // SAFETY:
+ // - Lifetimes are the same
+ // - Types are compatible (`OsStr` is effectively a transparent wrapper for `[u8]`)
+ // - The primary contract is that the encoding for invalid surrogate code points is not
+ // guaranteed which isn't a problem here
+ //
+ // There is a proposal to support this natively (https://github.com/rust-lang/rust/pull/95290)
+ // but its in limbo
+ unsafe { std::mem::transmute(s) }
+}
+
+/// Restore raw bytes as `OsStr`
+///
+/// # Safety
+///
+/// - `&[u8]` must either by a `&str` or originated with `to_bytes` within the same binary
+/// - Any splits of the original `&[u8]` must be done along UTF-8 boundaries
+unsafe fn to_os_str_unchecked(s: &[u8]) -> &OsStr {
+ // SAFETY:
+ // - Lifetimes are the same
+ // - Types are compatible (`OsStr` is effectively a transparent wrapper for `[u8]`)
+ // - The primary contract is that the encoding for invalid surrogate code points is not
+ // guaranteed which isn't a problem here
+ //
+ // There is a proposal to support this natively (https://github.com/rust-lang/rust/pull/95290)
+ // but its in limbo
+ std::mem::transmute(s)
+}
+
pub struct Split<'s, 'n> {
haystack: Option<&'s OsStr>,
needle: &'n str,
@@ -275,10 +306,7 @@
///
/// `index` must be at a valid UTF-8 boundary
pub(crate) unsafe fn split_at(os: &OsStr, index: usize) -> (&OsStr, &OsStr) {
- let bytes = os.as_encoded_bytes();
+ let bytes = to_bytes(os);
let (first, second) = bytes.split_at(index);
- (
- OsStr::from_encoded_bytes_unchecked(first),
- OsStr::from_encoded_bytes_unchecked(second),
- )
+ (to_os_str_unchecked(first), to_os_str_unchecked(second))
}

View file

@ -1,16 +0,0 @@
diff -up chromium-124.0.6367.118/third_party/perfetto/src/tracing/core/id_allocator.h.me chromium-124.0.6367.118/third_party/perfetto/src/tracing/core/id_allocator.h
--- chromium-124.0.6367.118/third_party/perfetto/src/tracing/core/id_allocator.h.me 2024-05-06 08:32:09.637210958 +0200
+++ chromium-124.0.6367.118/third_party/perfetto/src/tracing/core/id_allocator.h 2024-05-06 08:32:26.485518448 +0200
@@ -63,10 +63,10 @@ class IdAllocator : public IdAllocatorGe
// Tries to allocate `n` IDs. Returns a vector of `n` valid IDs or an empty
// vector, if not enough IDs are available.
- std::vector<T> AllocateMultiple(size_t n) {
+ std::vector<T> AllocateMultiple(std::size_t n) {
std::vector<T> res;
res.reserve(n);
- for (size_t i = 0; i < n; i++) {
+ for (std::size_t i = 0; i < n; i++) {
T id = Allocate();
if (id) {
res.push_back(id);

View file

@ -1,78 +0,0 @@
diff -up chromium-115.0.5790.24/media/base/cdm_promise_adapter.cc.workaround_clang_bug-structured_binding chromium-115.0.5790.24/media/base/cdm_promise_adapter.cc
--- chromium-115.0.5790.24/media/base/cdm_promise_adapter.cc.workaround_clang_bug-structured_binding 2023-06-07 21:48:37.000000000 +0200
+++ chromium-115.0.5790.24/media/base/cdm_promise_adapter.cc 2023-06-17 16:53:20.216628557 +0200
@@ -94,7 +94,9 @@ void CdmPromiseAdapter::RejectPromise(ui
void CdmPromiseAdapter::Clear(ClearReason reason) {
// Reject all outstanding promises.
DCHECK(thread_checker_.CalledOnValidThread());
- for (auto& [promise_id, promise] : promises_) {
+ for (auto& [p_i, p_e] : promises_) {
+ auto& promise_id = p_i;
+ auto& promise = p_e;
TRACE_EVENT_NESTABLE_ASYNC_END1(
"media", "CdmPromise", TRACE_ID_WITH_SCOPE("CdmPromise", promise_id),
"status", "cleared");
diff -up chromium-115.0.5790.32/content/browser/service_worker/service_worker_context_wrapper.cc.me chromium-115.0.5790.32/content/browser/service_worker/service_worker_context_wrapper.cc
--- chromium-115.0.5790.32/content/browser/service_worker/service_worker_context_wrapper.cc.me 2023-06-19 08:04:02.287072722 +0200
+++ chromium-115.0.5790.32/content/browser/service_worker/service_worker_context_wrapper.cc 2023-06-19 08:18:24.576814950 +0200
@@ -1393,7 +1393,8 @@ void ServiceWorkerContextWrapper::MaybeP
return;
}
- auto [document_url, key, callback] = std::move(*request);
+ auto [d_u, key, callback] = std::move(*request);
+ auto document_url = d_u;
DCHECK(document_url.is_valid());
TRACE_EVENT1("ServiceWorker",
diff -up chromium-121.0.6167.16/third_party/blink/renderer/core/layout/grid/grid_layout_algorithm.cc.than chromium-121.0.6167.16/third_party/blink/renderer/core/layout/grid/grid_layout_algorithm.cc
--- chromium-121.0.6167.16/third_party/blink/renderer/core/layout/grid/grid_layout_algorithm.cc.than 2023-12-19 17:57:56.205197246 +0100
+++ chromium-121.0.6167.16/third_party/blink/renderer/core/layout/grid/grid_layout_algorithm.cc 2023-12-19 18:10:13.778634531 +0100
@@ -3527,8 +3527,8 @@ void GridLayoutAlgorithm::PlaceGridItems
DCHECK(out_row_break_between);
const auto& container_space = GetConstraintSpace();
- const auto& [grid_items, layout_data, tree_size] = sizing_tree.TreeRootData();
-
+ const auto& [grid_items, l_d, tree_size] = sizing_tree.TreeRootData();
+ const auto& layout_data = l_d;
const auto* cached_layout_subtree = container_space.GetGridLayoutSubtree();
const auto container_writing_direction =
container_space.GetWritingDirection();
@@ -3691,8 +3691,9 @@ void GridLayoutAlgorithm::PlaceGridItems
// TODO(ikilpatrick): Update |SetHasSeenAllChildren| and early exit if true.
const auto& constraint_space = GetConstraintSpace();
- const auto& [grid_items, layout_data, tree_size] = sizing_tree.TreeRootData();
-
+ const auto& [g_i, l_d, tree_size] = sizing_tree.TreeRootData();
+ const auto& grid_items = g_i;
+ const auto& layout_data = l_d;
const auto* cached_layout_subtree = constraint_space.GetGridLayoutSubtree();
const auto container_writing_direction =
constraint_space.GetWritingDirection();
diff -up chromium-122.0.6261.69/chrome/browser/predictors/lcp_critical_path_predictor/prewarm_http_disk_cache_manager.cc.me chromium-122.0.6261.69/chrome/browser/predictors/lcp_critical_path_predictor/prewarm_http_disk_cache_manager.cc
--- chromium-122.0.6261.69/chrome/browser/predictors/lcp_critical_path_predictor/prewarm_http_disk_cache_manager.cc.me 2024-02-25 18:03:51.654579579 +0100
+++ chromium-122.0.6261.69/chrome/browser/predictors/lcp_critical_path_predictor/prewarm_http_disk_cache_manager.cc 2024-02-25 18:12:45.144287750 +0100
@@ -136,7 +136,8 @@ void PrewarmHttpDiskCacheManager::MaybeP
std::pair<url::Origin, GURL> origin_and_url;
std::swap(origin_and_url, queued_jobs_.front());
queued_jobs_.pop();
- const auto& [origin, url] = origin_and_url;
+ const auto& [origin, u] = origin_and_url;
+ const auto& url = u;
TRACE_EVENT_WITH_FLOW1(
"loading", "PrewarmHttpDiskCacheManager::MaybeProcessNextQueuedJob",
TRACE_ID_LOCAL(this),
--- chromium-124.0.6367.118/content/common/service_worker/race_network_request_url_loader_client.cc.workaround_clang_bug-structured_binding 2024-05-05 16:22:47.581070868 +0200
+++ chromium-124.0.6367.118/content/common/service_worker/race_network_request_url_loader_client.cc 2024-05-05 16:27:18.859972481 +0200
@@ -417,7 +417,8 @@
}
SCOPED_CRASH_KEY_STRING256("SWRace", "request_url", request_.url.spec());
- auto [read_result, read_buffer] = read_buffer_manager_->ReadData();
+ auto [r, read_buffer] = read_buffer_manager_->ReadData();
+ auto read_result = r;
TRACE_EVENT_WITH_FLOW2("ServiceWorker",
"ServiceWorkerRaceNetworkRequestURLLoaderClient::Read",
TRACE_ID_LOCAL(this),

View file

@ -1,127 +0,0 @@
diff -up chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h.orig chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h
--- chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h.orig 2024-04-12 21:56:54.000000000 +0200
+++ chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h 2024-04-14 20:53:16.043867871 +0200
@@ -147,7 +147,13 @@ struct PartitionBucket {
// Returns a slot number starting from the beginning of the slot span.
PA_ALWAYS_INLINE size_t GetSlotNumber(size_t offset_in_slot_span) const {
// See the static assertion for `kReciprocalShift` above.
- PA_DCHECK(offset_in_slot_span <= kMaxBucketed);
+ // TODO(casey.smalley@arm.com): triggers on Aarch64/Linux
+ // systems with 64k system pages. Constants need to be
+ // adjusted to prevent different parts of the allocator
+ // from overlapping. For now this will allow 64k pages
+ // to function on Aarch64/Linux systems, albeit not
+ // very efficiently.
+ PA_DCHECK(internal::SystemPageSize() == (size_t{1} << 16) || offset_in_slot_span <= kMaxBucketed);
PA_DCHECK(slot_size <= kMaxBucketed);
const size_t offset_in_slot =
diff -up chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h.orig chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h
--- chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h.orig 2024-04-14 20:53:16.043867871 +0200
+++ chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h 2024-04-14 21:39:18.147052845 +0200
@@ -17,10 +17,8 @@ namespace partition_alloc::internal {
// PartitionPageSize() is 4 times the OS page size.
static constexpr size_t kMaxSlotsPerSlotSpan = 4 * (1 << 14) / kSmallestBucket;
#elif defined(PARTITION_ALLOCATOR_CONSTANTS_POSIX_NONCONST_PAGE_SIZE)
-// System page size can be 4, 16, or 64 kiB on Linux on arm64. 64 kiB is
-// currently (kMaxSlotsPerSlotSpanBits == 13) not supported by the code,
-// so we use the 16 kiB maximum (64 kiB will crash).
-static constexpr size_t kMaxSlotsPerSlotSpan = 4 * (1 << 14) / kSmallestBucket;
+// System page size can be 4, 16, or 64 kiB on Linux on AArch64.
+static constexpr size_t kMaxSlotsPerSlotSpan = 4 * (1 << 16) / kSmallestBucket;
#else
// A slot span can "span" multiple PartitionPages, but then its slot size is
// larger, so it doesn't have as many slots.
diff -up chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc.orig chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc
--- chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc.orig 2024-04-14 20:53:16.044867889 +0200
+++ chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc 2024-04-14 21:50:57.926716718 +0200
@@ -952,12 +952,11 @@ void PartitionRoot::Init(PartitionOption
(internal::SystemPageSize() == (size_t{1} << 14)));
#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)
// Check runtime pagesize. Though the code is currently the same, it is
- // not merged with the IS_APPLE case above as a 1 << 16 case needs to be
- // added here in the future, to allow 64 kiB pagesize. That is only
- // supported on Linux on arm64, not on IS_APPLE, but not yet present here
- // as the rest of the PartitionAlloc does not currently support it.
+ // not merged with the IS_APPLE case above as a 1 << 16 case is only
+ // supported on Linux on AArch64.
PA_CHECK((internal::SystemPageSize() == (size_t{1} << 12)) ||
- (internal::SystemPageSize() == (size_t{1} << 14)));
+ (internal::SystemPageSize() == (size_t{1} << 14)) ||
+ (internal::SystemPageSize() == (size_t{1} << 16)));
#endif
::partition_alloc::internal::ScopedGuard guard{lock_};
diff -up chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_page.h.me chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_page.h
--- chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_page.h.me 2024-04-14 22:08:40.655011536 +0200
+++ chromium-124.0.6367.49/base/allocator/partition_allocator/src/partition_alloc/partition_page.h 2024-04-14 22:12:46.665731577 +0200
@@ -86,27 +86,25 @@ struct SlotSpanMetadata {
// CHECK()ed in AllocNewSlotSpan().
// The maximum number of bits needed to cover all currently supported OSes.
- static constexpr size_t kMaxSlotsPerSlotSpanBits = 13;
+ static constexpr size_t kMaxSlotsPerSlotSpanBits = 15;
static_assert(kMaxSlotsPerSlotSpan < (1 << kMaxSlotsPerSlotSpanBits), "");
- // |marked_full| isn't equivalent to being full. Slot span is marked as full
- // iff it isn't on the active slot span list (or any other list).
- uint32_t marked_full : 1;
// |num_allocated_slots| is 0 for empty or decommitted slot spans, which can
// be further differentiated by checking existence of the freelist.
- uint32_t num_allocated_slots : kMaxSlotsPerSlotSpanBits;
- uint32_t num_unprovisioned_slots : kMaxSlotsPerSlotSpanBits;
+ uint16_t num_allocated_slots : kMaxSlotsPerSlotSpanBits;
+ uint16_t num_unprovisioned_slots : kMaxSlotsPerSlotSpanBits;
+
+ // |marked_full| isn't equivalent to being full. Slot span is marked as full
+ // iff it isn't on the active slot span list (or any other list).
+ bool marked_full : 1;
private:
- const uint32_t can_store_raw_size_ : 1;
- uint32_t freelist_is_sorted_ : 1;
- uint32_t unused1_ : (32 - 1 - 2 * kMaxSlotsPerSlotSpanBits - 1 - 1);
+ const uint8_t can_store_raw_size_ : 1;
+ uint8_t freelist_is_sorted_ : 1;
// If |in_empty_cache_|==1, |empty_cache_index| is undefined and mustn't be
// used.
- uint16_t in_empty_cache_ : 1;
- uint16_t empty_cache_index_
- : kMaxEmptyCacheIndexBits; // < kMaxFreeableSpans.
- uint16_t unused2_ : (16 - 1 - kMaxEmptyCacheIndexBits);
+ bool in_empty_cache_ : 1;
+ uint8_t empty_cache_index_ : kMaxEmptyCacheIndexBits; // < kMaxFreeableSpans.
// Can use only 48 bits (6B) in this bitfield, as this structure is embedded
// in PartitionPage which has 2B worth of fields and must fit in 32B.
@@ -246,18 +244,13 @@ static_assert(sizeof(SlotSpanMetadata) <
"SlotSpanMetadata must fit into a Page Metadata slot.");
inline constexpr SlotSpanMetadata::SlotSpanMetadata() noexcept
- : marked_full(0),
- num_allocated_slots(0),
+ : num_allocated_slots(0),
num_unprovisioned_slots(0),
+ marked_full(0),
can_store_raw_size_(false),
freelist_is_sorted_(true),
- unused1_(0),
in_empty_cache_(0),
- empty_cache_index_(0),
- unused2_(0) {
- (void)unused1_;
- (void)unused2_;
-}
+ empty_cache_index_(0) {}
inline SlotSpanMetadata::SlotSpanMetadata(const SlotSpanMetadata&) = default;
@@ -752,7 +745,7 @@ PA_ALWAYS_INLINE void SlotSpanMetadata::
size_t num_slots_per_span = bucket->get_slots_per_span();
PA_DCHECK(num_slots_per_span <= kMaxSlotsPerSlotSpan);
- num_unprovisioned_slots = static_cast<uint32_t>(num_slots_per_span);
+ num_unprovisioned_slots = static_cast<uint16_t>(num_slots_per_span);
PA_DCHECK(num_unprovisioned_slots);
ToSuperPageExtent()->IncrementNumberOfNonemptySlotSpans();

View file

@ -1,53 +0,0 @@
--- chromium-124.0.6367.60/third_party/dav1d/libdav1d/src/arm/asm.S 2024-04-15 22:34:36.000000000 +0200
+++ chromium-122.0.6261.128/third_party/dav1d/libdav1d/src/arm/asm.S 2024-03-13 00:38:27.000000000 +0100
@@ -34,50 +34,6 @@
#define x18 do_not_use_x18
#define w18 do_not_use_w18
-#if HAVE_AS_ARCH_DIRECTIVE
- .arch AS_ARCH_LEVEL
-#endif
-
-#if HAVE_AS_ARCHEXT_DOTPROD_DIRECTIVE
-#define ENABLE_DOTPROD .arch_extension dotprod
-#define DISABLE_DOTPROD .arch_extension nodotprod
-#else
-#define ENABLE_DOTPROD
-#define DISABLE_DOTPROD
-#endif
-#if HAVE_AS_ARCHEXT_I8MM_DIRECTIVE
-#define ENABLE_I8MM .arch_extension i8mm
-#define DISABLE_I8MM .arch_extension noi8mm
-#else
-#define ENABLE_I8MM
-#define DISABLE_I8MM
-#endif
-#if HAVE_AS_ARCHEXT_SVE_DIRECTIVE
-#define ENABLE_SVE .arch_extension sve
-#define DISABLE_SVE .arch_extension nosve
-#else
-#define ENABLE_SVE
-#define DISABLE_SVE
-#endif
-#if HAVE_AS_ARCHEXT_SVE2_DIRECTIVE
-#define ENABLE_SVE2 .arch_extension sve2
-#define DISABLE_SVE2 .arch_extension nosve2
-#else
-#define ENABLE_SVE2
-#define DISABLE_SVE2
-#endif
-
-/* If we do support the .arch_extension directives, disable support for all
- * the extensions that we may use, in case they were implicitly enabled by
- * the .arch level. This makes it clear if we try to assemble an instruction
- * from an unintended extension set; we only allow assmbling such instructions
- * within regions where we explicitly enable those extensions. */
-DISABLE_DOTPROD
-DISABLE_I8MM
-DISABLE_SVE
-DISABLE_SVE2
-
-
/* Support macros for
* - Armv8.3-A Pointer Authentication and
* - Armv8.5-A Branch Target Identification

View file

@ -1,55 +0,0 @@
diff -up chromium-121.0.6167.57/build/config/clang/BUILD.gn.rust-clang_lib chromium-121.0.6167.57/build/config/clang/BUILD.gn
--- chromium-121.0.6167.57/build/config/clang/BUILD.gn.rust-clang_lib 2024-01-10 16:43:01.000000000 +0100
+++ chromium-121.0.6167.57/build/config/clang/BUILD.gn 2024-01-20 19:51:38.481992799 +0100
@@ -112,6 +112,7 @@ template("clang_lib") {
_prefix = "lib"
_suffix = ""
_ext = "a"
+ _libprefix = ""
if (is_win) {
_dir = "windows"
_prefix = ""
@@ -127,7 +128,33 @@ template("clang_lib") {
}
} else if (is_apple) {
_dir = "darwin"
- } else if (is_linux || is_chromeos) {
+ } else if (is_linux) {
+ if (current_cpu == "x64") {
+ _dir = "x86_64-redhat-linux-gnu"
+ _suffix ="-x86_64"
+ } else if (current_cpu == "x86") {
+ _dir = "i386-redhat-linux-gnu"
+ _suffix = "-i386"
+ } else if (current_cpu == "arm64") {
+ _dir = "aarch64-redhat-linux-gnu"
+ _suffix = "-aarch64"
+ } else if (current_cpu == "arm") {
+ _dir = "armhf-redhat-linux-gnu"
+ _suffix = "-armhf"
+ } else if (current_cpu == "ppc64") {
+ _dir = "ppc64le-redhat-linux-gnu"
+ _suffix = "-ppc64le"
+ } else {
+ assert(false) # Unhandled cpu type
+ }
+ # different clang lib dir in fedora/epel
+ if (clang_version == "17" || clang_version == "18") {
+ _suffix = ""
+ } else if (clang_version == "14" || clang_version == "15" || clang_version == "16") {
+ _libprefix = "64"
+ _dir = ""
+ }
+ } else if (is_chromeos) {
if (current_cpu == "x64") {
_dir = "x86_64-unknown-linux-gnu"
} else if (current_cpu == "x86") {
@@ -166,7 +193,7 @@ template("clang_lib") {
assert(false) # Unhandled target platform
}
- _clang_lib_dir = "$clang_base_path/lib/clang/$clang_version/lib"
+ _clang_lib_dir = "$clang_base_path/lib${_libprefix}/clang/$clang_version/lib"
_lib_file = "${_prefix}clang_rt.${_libname}${_suffix}.${_ext}"
libs = [ "$_clang_lib_dir/$_dir/$_lib_file" ]
}

View file

@ -1,429 +0,0 @@
diff -up chromium-124.0.6367.118/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.h.typename chromium-124.0.6367.118/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.h
--- chromium-124.0.6367.118/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.h.typename 2024-05-01 01:46:40.000000000 +0200
+++ chromium-124.0.6367.118/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.h 2024-05-05 16:32:57.377654043 +0200
@@ -26,7 +26,7 @@ PartitionRoot& InternalAllocatorRoot();
// A class that meets C++ named requirements, Allocator.
template <typename T>
-InternalAllocator<T>::value_type* InternalAllocator<T>::allocate(
+typename InternalAllocator<T>::value_type* InternalAllocator<T>::allocate(
std::size_t count) {
PA_CHECK(count <=
std::numeric_limits<std::size_t>::max() / sizeof(value_type));
diff -up chromium-124.0.6367.118/base/containers/heap_array.h.typename chromium-124.0.6367.118/base/containers/heap_array.h
--- chromium-124.0.6367.118/base/containers/heap_array.h.typename 2024-05-01 01:46:40.000000000 +0200
+++ chromium-124.0.6367.118/base/containers/heap_array.h 2024-05-05 16:32:57.377654043 +0200
@@ -32,8 +32,8 @@ class TRIVIAL_ABI GSL_OWNER HeapArray {
static_assert(!std::is_reference_v<T>,
"HeapArray cannot hold reference types");
- using iterator = base::span<T>::iterator;
- using const_iterator = base::span<const T>::iterator;
+ using iterator = typename base::span<T>::iterator;
+ using const_iterator = typename base::span<const T>::iterator;
// Allocates initialized memory capable of holding `size` elements. No memory
// is allocated for zero-sized arrays.
diff -up chromium-124.0.6367.118/base/containers/map_util.h.typename chromium-124.0.6367.118/base/containers/map_util.h
--- chromium-124.0.6367.118/base/containers/map_util.h.typename 2024-05-01 01:46:40.000000000 +0200
+++ chromium-124.0.6367.118/base/containers/map_util.h 2024-05-05 16:36:15.062228596 +0200
@@ -44,7 +44,7 @@ constexpr internal::MappedType<Map>* Fin
template <typename Map,
typename Key,
typename MappedElementType =
- std::pointer_traits<internal::MappedType<Map>>::element_type>
+ typename std::pointer_traits<internal::MappedType<Map>>::element_type>
constexpr const MappedElementType* FindPtrOrNull(const Map& map,
const Key& key) {
auto it = map.find(key);
@@ -60,7 +60,7 @@ constexpr const MappedElementType* FindP
template <typename Map,
typename Key,
typename MappedElementType =
- std::pointer_traits<internal::MappedType<Map>>::element_type>
+ typename std::pointer_traits<internal::MappedType<Map>>::element_type>
constexpr MappedElementType* FindPtrOrNull(Map& map, const Key& key) {
auto it = map.find(key);
return it != map.end() ? base::to_address(it->second) : nullptr;
diff -up chromium-124.0.6367.118/base/functional/bind_internal.h.typename chromium-124.0.6367.118/base/functional/bind_internal.h
--- chromium-124.0.6367.118/base/functional/bind_internal.h.typename 2024-05-01 01:46:40.000000000 +0200
+++ chromium-124.0.6367.118/base/functional/bind_internal.h 2024-05-05 16:32:57.375653992 +0200
@@ -1505,11 +1505,11 @@ template <int i,
typename Param>
struct ParamCanBeBound {
private:
- using UnwrappedParam = BindArgument<i>::template ForwardedAs<
+ using UnwrappedParam = typename BindArgument<i>::template ForwardedAs<
Unwrapped>::template ToParamWithType<Param>;
- using ParamStorage = BindArgument<i>::template ToParamWithType<
+ using ParamStorage = typename BindArgument<i>::template ToParamWithType<
Param>::template StoredAs<Storage>;
- using BoundStorage =
+ using BoundStorage = typename
BindArgument<i>::template BoundAs<Arg>::template StoredAs<Storage>;
template <bool v = !UnwrappedParam::kRawPtr ||
diff -up chromium-124.0.6367.118/base/functional/function_ref.h.typename chromium-124.0.6367.118/base/functional/function_ref.h
--- chromium-124.0.6367.118/base/functional/function_ref.h.typename 2024-05-01 01:46:40.000000000 +0200
+++ chromium-124.0.6367.118/base/functional/function_ref.h 2024-05-05 16:32:57.379654093 +0200
@@ -64,7 +64,7 @@ class FunctionRef;
template <typename R, typename... Args>
class FunctionRef<R(Args...)> {
template <typename Functor,
- typename RunType = internal::FunctorTraits<Functor>::RunType>
+ typename RunType = typename internal::FunctorTraits<Functor>::RunType>
static constexpr bool kCompatibleFunctor =
std::convertible_to<internal::ExtractReturnType<RunType>, R> &&
std::same_as<internal::ExtractArgs<RunType>, internal::TypeList<Args...>>;
diff -up chromium-124.0.6367.118/base/types/fixed_array.h.typename chromium-124.0.6367.118/base/types/fixed_array.h
--- chromium-124.0.6367.118/base/types/fixed_array.h.typename 2024-05-01 01:46:41.000000000 +0200
+++ chromium-124.0.6367.118/base/types/fixed_array.h 2024-05-05 16:32:57.378654068 +0200
@@ -27,8 +27,8 @@ template <typename T,
class FixedArray : public absl::FixedArray<T, N, A> {
public:
using absl::FixedArray<T, N, A>::FixedArray;
- explicit FixedArray(absl::FixedArray<T, N, A>::size_type n,
- const absl::FixedArray<T, N, A>::allocator_type& a =
+ explicit FixedArray(typename absl::FixedArray<T, N, A>::size_type n,
+ const typename absl::FixedArray<T, N, A>::allocator_type& a =
typename absl::FixedArray<T, N, A>::allocator_type())
: FixedArray(n, T(), a) {}
};
diff -up chromium-124.0.6367.118/chrome/browser/download/bubble/download_bubble_update_service.cc.typename chromium-124.0.6367.118/chrome/browser/download/bubble/download_bubble_update_service.cc
--- chromium-124.0.6367.118/chrome/browser/download/bubble/download_bubble_update_service.cc.typename 2024-05-01 01:46:45.000000000 +0200
+++ chromium-124.0.6367.118/chrome/browser/download/bubble/download_bubble_update_service.cc 2024-05-05 16:32:57.375653992 +0200
@@ -95,7 +95,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>::const_iterator GetLastIter(const SortedItems<Item>& cache) {
+typename SortedItems<Item>::const_iterator GetLastIter(const SortedItems<Item>& cache) {
CHECK(!cache.empty());
auto it = cache.end();
return std::prev(it);
@@ -1179,9 +1179,9 @@ bool DownloadBubbleUpdateService::CacheM
}
template <typename Id, typename Item>
-SortedItems<Item>::iterator
+typename SortedItems<Item>::iterator
DownloadBubbleUpdateService::CacheManager::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-124.0.6367.118/chrome/browser/web_applications/commands/internal/command_internal.h.typename chromium-124.0.6367.118/chrome/browser/web_applications/commands/internal/command_internal.h
--- chromium-124.0.6367.118/chrome/browser/web_applications/commands/internal/command_internal.h.typename 2024-05-01 01:46:48.000000000 +0200
+++ chromium-124.0.6367.118/chrome/browser/web_applications/commands/internal/command_internal.h 2024-05-05 16:32:57.378654068 +0200
@@ -121,7 +121,7 @@ class CommandBase {
template <typename LockType>
class CommandWithLock : public CommandBase {
public:
- using LockDescription = LockType::LockDescription;
+ using LockDescription = typename LockType::LockDescription;
explicit CommandWithLock(const std::string& name,
LockDescription initial_lock_request);
diff -up chromium-124.0.6367.118/chrome/browser/web_applications/commands/web_app_command.h.typename chromium-124.0.6367.118/chrome/browser/web_applications/commands/web_app_command.h
--- chromium-124.0.6367.118/chrome/browser/web_applications/commands/web_app_command.h.typename 2024-05-01 01:46:48.000000000 +0200
+++ chromium-124.0.6367.118/chrome/browser/web_applications/commands/web_app_command.h 2024-05-05 16:32:57.378654068 +0200
@@ -106,7 +106,7 @@ class WebAppLockManager;
template <typename LockType, typename... CallbackArgs>
class WebAppCommand : public internal::CommandWithLock<LockType> {
public:
- using LockDescription = LockType::LockDescription;
+ using LockDescription = typename LockType::LockDescription;
using CallbackType = base::OnceCallback<void(CallbackArgs...)>;
using ShutdownArgumentsTuple = std::tuple<std::decay_t<CallbackArgs>...>;
diff -up chromium-124.0.6367.118/chrome/browser/web_applications/web_app_command_scheduler.h.typename chromium-124.0.6367.118/chrome/browser/web_applications/web_app_command_scheduler.h
--- chromium-124.0.6367.118/chrome/browser/web_applications/web_app_command_scheduler.h.typename 2024-05-01 01:46:48.000000000 +0200
+++ chromium-124.0.6367.118/chrome/browser/web_applications/web_app_command_scheduler.h 2024-05-05 16:32:57.379654093 +0200
@@ -369,7 +369,7 @@ class WebAppCommandScheduler {
// command system.
template <typename LockType>
void ScheduleCallback(const std::string& operation_name,
- LockType::LockDescription lock_description,
+ typename LockType::LockDescription lock_description,
CallbackCommand<LockType, void> callback,
base::OnceClosure on_complete,
const base::Location& location = FROM_HERE) {
@@ -387,7 +387,7 @@ class WebAppCommandScheduler {
typename CallbackReturnValue = std::decay_t<CompletionCallbackArg>>
void ScheduleCallbackWithResult(
const std::string& operation_name,
- LockType::LockDescription lock_description,
+ typename LockType::LockDescription lock_description,
CallbackCommand<LockType, CallbackReturnValue> callback,
base::OnceCallback<void(CompletionCallbackArg)> on_complete,
CallbackReturnValue arg_for_shutdown,
diff -up chromium-124.0.6367.118/components/optimization_guide/core/model_execution/model_execution_util.h.typename chromium-124.0.6367.118/components/optimization_guide/core/model_execution/model_execution_util.h
--- chromium-124.0.6367.118/components/optimization_guide/core/model_execution/model_execution_util.h.typename 2024-05-01 01:46:52.000000000 +0200
+++ chromium-124.0.6367.118/components/optimization_guide/core/model_execution/model_execution_util.h 2024-05-05 16:32:57.376654018 +0200
@@ -26,7 +26,7 @@ void SetExecutionRequestTemplate(
// Request is set by the feature and should always be typed.
auto typed_request =
- static_cast<const FeatureType::Request&>(request_metadata);
+ static_cast<const typename FeatureType::Request&>(request_metadata);
*(logging_data->mutable_request_data()) = typed_request;
}
diff -up chromium-124.0.6367.118/components/optimization_guide/core/model_quality/model_quality_log_entry.h.typename chromium-124.0.6367.118/components/optimization_guide/core/model_quality/model_quality_log_entry.h
--- chromium-124.0.6367.118/components/optimization_guide/core/model_quality/model_quality_log_entry.h.typename 2024-05-01 01:46:52.000000000 +0200
+++ chromium-124.0.6367.118/components/optimization_guide/core/model_quality/model_quality_log_entry.h 2024-05-05 16:32:57.376654018 +0200
@@ -33,7 +33,7 @@ class ModelQualityLogEntry {
}
template <typename FeatureType>
- FeatureType::Quality* quality_data() {
+ typename FeatureType::Quality* quality_data() {
return FeatureType::GetLoggingData(*log_ai_data_request_)
->mutable_quality_data();
}
diff -up chromium-124.0.6367.118/components/optimization_guide/core/tflite_model_executor.h.typename chromium-124.0.6367.118/components/optimization_guide/core/tflite_model_executor.h
--- chromium-124.0.6367.118/components/optimization_guide/core/tflite_model_executor.h.typename 2024-05-01 01:46:52.000000000 +0200
+++ chromium-124.0.6367.118/components/optimization_guide/core/tflite_model_executor.h 2024-05-05 16:32:57.379654093 +0200
@@ -242,7 +242,7 @@ class TFLiteModelExecutor : public Model
void SendForBatchExecution(
BatchExecutionCallback callback_on_complete,
base::TimeTicks start_time,
- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
+ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
override {
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
@@ -264,7 +264,7 @@ class TFLiteModelExecutor : public Model
// Starts the synchronous execution of the model. Returns model outputs.
// Model needs to be loaded. Synchronous calls do not load or unload model.
std::vector<std::optional<OutputType>> SendForBatchExecutionSync(
- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
+ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
override {
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
@@ -422,7 +422,7 @@ class TFLiteModelExecutor : public Model
// executes it on the model execution thread.
void LoadModelFileAndBatchExecute(
BatchExecutionCallback callback_on_complete,
- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) {
+ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) {
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
@@ -439,7 +439,7 @@ class TFLiteModelExecutor : public Model
// Batch executes the loaded model for inputs.
void BatchExecuteLoadedModel(
- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
+ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
std::vector<std::optional<OutputType>>* outputs) {
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
@@ -499,7 +499,7 @@ class TFLiteModelExecutor : public Model
// Unloads the model if needed.
void BatchExecuteLoadedModelAndRunCallback(
BatchExecutionCallback callback_on_complete,
- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
+ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
ExecutionStatus execution_status) {
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
diff -up chromium-124.0.6367.118/components/supervised_user/core/browser/proto_fetcher.h.typename chromium-124.0.6367.118/components/supervised_user/core/browser/proto_fetcher.h
--- chromium-124.0.6367.118/components/supervised_user/core/browser/proto_fetcher.h.typename 2024-05-01 01:46:54.000000000 +0200
+++ chromium-124.0.6367.118/components/supervised_user/core/browser/proto_fetcher.h 2024-05-05 16:32:57.379654093 +0200
@@ -424,7 +424,7 @@ class RetryingFetcherImpl final : public
RetryingFetcherImpl(const RetryingFetcherImpl&) = delete;
RetryingFetcherImpl& operator=(const RetryingFetcherImpl&) = delete;
- void Start(ProtoFetcher<Response>::Callback callback) override {
+ void Start(typename ProtoFetcher<Response>::Callback callback) override {
callback_ = std::move(callback);
Retry();
}
@@ -469,7 +469,7 @@ class RetryingFetcherImpl final : public
}
// Client callback.
- TypedProtoFetcher<Response>::Callback callback_;
+ typename TypedProtoFetcher<Response>::Callback callback_;
// Retry controls.
base::OneShotTimer timer_;
@@ -490,7 +490,7 @@ class ParallelFetchManager {
// Deferred fetcher is required because it should be started after it is
// stored internally.
using Fetcher = ProtoFetcher<Response>;
- using KeyType = base::IDMap<std::unique_ptr<Fetcher>>::KeyType;
+ using KeyType = typename base::IDMap<std::unique_ptr<Fetcher>>::KeyType;
public:
// Provides fresh instances of a deferred fetcher for each fetch.
@@ -506,7 +506,7 @@ class ParallelFetchManager {
// Starts the fetch. Underlying fetcher is stored internally, and will be
// cleaned up after finish or when this manager is destroyed.
- void Fetch(const Request& request, Fetcher::Callback callback) {
+ void Fetch(const Request& request, typename Fetcher::Callback callback) {
CHECK(callback) << "Use base::DoNothing() instead of empty callback.";
KeyType key = requests_in_flight_.Add(MakeFetcher(request));
requests_in_flight_.Lookup(key)->Start(
diff -up chromium-124.0.6367.118/mojo/public/cpp/bindings/array_traits.h.typename chromium-124.0.6367.118/mojo/public/cpp/bindings/array_traits.h
--- chromium-124.0.6367.118/mojo/public/cpp/bindings/array_traits.h.typename 2024-05-01 01:46:59.000000000 +0200
+++ chromium-124.0.6367.118/mojo/public/cpp/bindings/array_traits.h 2024-05-05 16:32:57.376654018 +0200
@@ -90,7 +90,7 @@ template <typename Container>
{ c[i] } -> std::same_as<typename Container::reference>;
}
struct ArrayTraits<Container> {
- using Element = Container::value_type;
+ using Element = typename Container::value_type;
// vector-like containers have no built-in null.
static bool IsNull(const Container& c) { return false; }
diff -up chromium-124.0.6367.118/mojo/public/cpp/bindings/type_converter.h.typename chromium-124.0.6367.118/mojo/public/cpp/bindings/type_converter.h
--- chromium-124.0.6367.118/mojo/public/cpp/bindings/type_converter.h.typename 2024-05-01 01:46:59.000000000 +0200
+++ chromium-124.0.6367.118/mojo/public/cpp/bindings/type_converter.h 2024-05-05 16:32:57.377654043 +0200
@@ -127,7 +127,7 @@ using VecValueType = typename Vec::value
template <typename Vec>
using VecPtrLikeUnderlyingValueType =
- std::pointer_traits<VecValueType<Vec>>::element_type;
+ typename std::pointer_traits<VecValueType<Vec>>::element_type;
} // namespace internal
diff -up chromium-124.0.6367.118/third_party/blink/renderer/bindings/core/v8/async_iterable.h.typename chromium-124.0.6367.118/third_party/blink/renderer/bindings/core/v8/async_iterable.h
--- chromium-124.0.6367.118/third_party/blink/renderer/bindings/core/v8/async_iterable.h.typename 2024-05-05 16:32:57.376654018 +0200
+++ chromium-124.0.6367.118/third_party/blink/renderer/bindings/core/v8/async_iterable.h 2024-05-05 16:39:07.015158335 +0200
@@ -245,7 +245,7 @@ class PairAsyncIterable {
private:
virtual IterationSource* CreateIterationSource(
ScriptState* script_state,
- IterationSource::Kind kind,
+ typename IterationSource::Kind kind,
InitArgs... args,
ExceptionState& exception_state) = 0;
};
@@ -291,7 +291,7 @@ class ValueAsyncIterable {
private:
virtual IterationSource* CreateIterationSource(
ScriptState* script_state,
- IterationSource::Kind kind,
+ typename IterationSource::Kind kind,
InitArgs... args,
ExceptionState& exception_state) = 0;
};
diff -up chromium-124.0.6367.118/third_party/blink/renderer/bindings/core/v8/script_promise_property.h.typename chromium-124.0.6367.118/third_party/blink/renderer/bindings/core/v8/script_promise_property.h
--- chromium-124.0.6367.118/third_party/blink/renderer/bindings/core/v8/script_promise_property.h.typename 2024-05-01 01:47:03.000000000 +0200
+++ chromium-124.0.6367.118/third_party/blink/renderer/bindings/core/v8/script_promise_property.h 2024-05-05 16:32:57.380654118 +0200
@@ -173,7 +173,7 @@ class ScriptPromiseProperty final
template <typename T>
requires std::derived_from<T, bindings::EnumerationBase>
static T DefaultPromiseResultValue() {
- return T(static_cast<T::Enum>(0));
+ return T(static_cast<typename T::Enum>(0));
}
State state_ = kPending;
diff -up chromium-124.0.6367.118/third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h.typename chromium-124.0.6367.118/third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h
--- chromium-124.0.6367.118/third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h.typename 2024-05-01 01:47:03.000000000 +0200
+++ chromium-124.0.6367.118/third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h 2024-05-05 16:32:57.380654118 +0200
@@ -389,7 +389,7 @@ class ScriptPromiseResolverTyped : publi
private:
using TypedResolver =
- ScriptPromiseTyped<IDLResolvedType>::InternalResolverTyped;
+ typename ScriptPromiseTyped<IDLResolvedType>::InternalResolverTyped;
};
} // namespace blink
diff -up chromium-124.0.6367.118/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.typename chromium-124.0.6367.118/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc
--- chromium-124.0.6367.118/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.typename 2024-05-01 01:47:04.000000000 +0200
+++ chromium-124.0.6367.118/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc 2024-05-05 16:32:57.376654018 +0200
@@ -210,7 +210,7 @@ class HTMLFastPathParser {
using Span = base::span<const Char>;
using USpan = base::span<const UChar>;
// 32 matches that used by HTMLToken::Attribute.
- typedef std::conditional<std::is_same_v<Char, UChar>,
+ typedef typename std::conditional<std::is_same_v<Char, UChar>,
UCharLiteralBuffer<32>,
LCharLiteralBuffer<32>>::type LiteralBufferType;
static_assert(std::is_same_v<Char, UChar> || std::is_same_v<Char, LChar>);
diff -up chromium-124.0.6367.118/third_party/blink/renderer/platform/wtf/hash_table.h.typename chromium-124.0.6367.118/third_party/blink/renderer/platform/wtf/hash_table.h
--- chromium-124.0.6367.118/third_party/blink/renderer/platform/wtf/hash_table.h.typename 2024-05-01 01:47:05.000000000 +0200
+++ chromium-124.0.6367.118/third_party/blink/renderer/platform/wtf/hash_table.h 2024-05-05 16:32:57.378654068 +0200
@@ -2006,7 +2006,7 @@ struct HashTableConstIteratorAdapter {
static_assert(!IsTraceable<typename Traits::TraitType>::value);
using iterator_category = std::bidirectional_iterator_tag;
- using value_type = HashTableType::ValueType;
+ using value_type = typename HashTableType::ValueType;
using difference_type = ptrdiff_t;
using pointer = value_type*;
using reference = value_type&;
@@ -2058,7 +2058,7 @@ struct HashTableConstIteratorAdapter<
public:
using iterator_category = std::bidirectional_iterator_tag;
- using value_type = HashTableType::ValueType;
+ using value_type = typename HashTableType::ValueType;
using difference_type = ptrdiff_t;
using pointer = value_type*;
using reference = value_type&;
@@ -2112,7 +2112,7 @@ struct HashTableIteratorAdapter {
static_assert(!IsTraceable<typename Traits::TraitType>::value);
using iterator_category = std::bidirectional_iterator_tag;
- using value_type = HashTableType::ValueType;
+ using value_type = typename HashTableType::ValueType;
using difference_type = ptrdiff_t;
using pointer = value_type*;
using reference = value_type&;
@@ -2160,7 +2160,7 @@ struct HashTableIteratorAdapter<
public:
using iterator_category = std::bidirectional_iterator_tag;
- using value_type = HashTableType::ValueType;
+ using value_type = typename HashTableType::ValueType;
using difference_type = ptrdiff_t;
using pointer = value_type*;
using reference = value_type&;
diff -up chromium-124.0.6367.118/base/containers/to_vector.h.me chromium-124.0.6367.118/base/containers/to_vector.h
--- chromium-124.0.6367.118/base/containers/to_vector.h.me 2024-05-06 12:39:58.312899455 +0200
+++ chromium-124.0.6367.118/base/containers/to_vector.h 2024-05-06 12:40:22.014635715 +0200
@@ -30,7 +30,7 @@ template <typename Range, typename Proj
std::indirectly_unary_invocable<Proj, ranges::iterator_t<Range>>
auto ToVector(Range&& range, Proj proj = {}) {
using ProjectedType =
- std::projected<ranges::iterator_t<Range>, Proj>::value_type;
+ typename std::projected<ranges::iterator_t<Range>, Proj>::value_type;
std::vector<ProjectedType> container;
container.reserve(std::size(range));
ranges::transform(std::forward<Range>(range), std::back_inserter(container),
diff -up chromium-124.0.6367.118/components/optimization_guide/core/model_quality/model_quality_util.h.me chromium-124.0.6367.118/components/optimization_guide/core/model_quality/model_quality_util.h
--- chromium-124.0.6367.118/components/optimization_guide/core/model_quality/model_quality_util.h.me 2024-05-06 20:13:29.067800309 +0200
+++ chromium-124.0.6367.118/components/optimization_guide/core/model_quality/model_quality_util.h 2024-05-06 20:13:44.671084222 +0200
@@ -19,7 +19,7 @@ proto::ModelExecutionFeature GetModelExe
// Helper method to get the quality_data from `log_ai_data_request` for
// different features.
template <typename FeatureType>
-FeatureType::Quality* GetModelQualityData(
+typename FeatureType::Quality* GetModelQualityData(
proto::LogAiDataRequest* log_ai_data_request) {
return FeatureType::GetLoggingData(*log_ai_data_request)
->mutable_quality_data();
diff -up chromium-124.0.6367.118/third_party/blink/renderer/core/paint/object_paint_properties.h.me chromium-124.0.6367.118/third_party/blink/renderer/core/paint/object_paint_properties.h
--- chromium-124.0.6367.118/third_party/blink/renderer/core/paint/object_paint_properties.h.me 2024-05-07 08:54:42.099316020 +0200
+++ chromium-124.0.6367.118/third_party/blink/renderer/core/paint/object_paint_properties.h 2024-05-07 08:57:18.304022672 +0200
@@ -445,8 +445,8 @@ class CORE_EXPORT ObjectPaintProperties
PaintPropertyChangeType Update(
NodeId node_id,
const ParentType& parent,
- NodeType::State&& state,
- const NodeType::AnimationState& animation_state =
+ typename NodeType::State&& state,
+ const typename NodeType::AnimationState& animation_state =
NodeType::AnimationState()) {
// First, check if we need to add a new node.
if (!nodes_.HasField(node_id)) {

View file

@ -1,12 +0,0 @@
diff -up chromium-125.0.6422.41/media/base/media_switches.cc.disable-FFmpegAllowLists chromium-125.0.6422.41/media/base/media_switches.cc
--- chromium-125.0.6422.41/media/base/media_switches.cc.disable-FFmpegAllowLists 2024-05-12 21:28:43.694027396 +0200
+++ chromium-125.0.6422.41/media/base/media_switches.cc 2024-05-12 21:32:48.155063623 +0200
@@ -1753,7 +1753,7 @@ BASE_FEATURE(kUseWindowBoundsForPip,
// Enables FFmpeg allow lists for supported codecs / containers.
BASE_FEATURE(kFFmpegAllowLists,
"FFmpegAllowLists",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ base::FEATURE_DISABLED_BY_DEFAULT);
#if BUILDFLAG(IS_WIN)
// Enables audio offload when supported by endpoints.

View file

@ -1,739 +0,0 @@
revert as workaround for compiler error with old clang < 17
commit 940af9f2c87b436559b97c53763aa9eaaf1254eb
Author: Jeremy Roman <jbroman@chromium.org>
Date: Wed Nov 15 16:24:54 2023 +0000
Use C++20 features to simplify blink::NativeValueTraitsBase.
These allow some of the metaprogramming bits to be simplified a little.
Change-Id: I052b4397586d21348401616e1792afdb9662f975
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5030335
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1224978}
--- a/third_party/blink/renderer/bindings/core/v8/native_value_traits.h
+++ b/third_party/blink/renderer/bindings/core/v8/native_value_traits.h
@@ -5,7 +5,6 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_NATIVE_VALUE_TRAITS_H_
#define THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_NATIVE_VALUE_TRAITS_H_
-#include <concepts>
#include <type_traits>
#include "third_party/blink/renderer/bindings/core/v8/idl_types_base.h"
@@ -31,7 +30,7 @@ class ExceptionState;
// return toInt32(isolate, value, exceptionState, NormalConversion);
// }
// }
-template <typename T>
+template <typename T, typename SFINAEHelper = void>
struct NativeValueTraits;
// This declaration serves only as a blueprint for specializations: the
@@ -46,15 +45,22 @@ struct NativeValueTraits;
namespace bindings {
+template <typename T, typename = void>
+struct NativeValueTraitsHasIsNull : std::false_type {};
+
template <typename T>
-struct ImplTypeFor {
- using type = T;
-};
+struct NativeValueTraitsHasIsNull<
+ T,
+ std::void_t<decltype(std::declval<T>().IsNull())>> : std::true_type {};
template <typename T>
- requires std::derived_from<T, IDLBase>
-struct ImplTypeFor<T> {
- using type = typename T::ImplType;
+struct NativeValueTraitsHasNullValue {
+ // true if |T| supports IDL null value.
+ static constexpr bool value =
+ // ScriptValue, String, and union types have IsNull member function.
+ bindings::NativeValueTraitsHasIsNull<T>::value ||
+ // Pointer types have nullptr as IDL null value.
+ std::is_pointer<T>::value;
};
} // namespace bindings
@@ -72,17 +78,37 @@ struct ImplTypeFor<T> {
// If present, |NullValue()| will be used when converting from the nullable type
// T?, and should be used if the impl type has an existing "null" state. If not
// present, WTF::Optional will be used to wrap the type.
-template <typename T>
+template <typename T, typename SFINAEHelper = void>
struct NativeValueTraitsBase {
STATIC_ONLY(NativeValueTraitsBase);
- using ImplType = bindings::ImplTypeFor<T>::type;
+ using ImplType = T;
+
+ static constexpr bool has_null_value =
+ bindings::NativeValueTraitsHasNullValue<ImplType>::value;
+
+ template <typename... ExtraArgs>
+ static decltype(auto) ArgumentValue(v8::Isolate* isolate,
+ int argument_index,
+ v8::Local<v8::Value> value,
+ ExceptionState& exception_state,
+ ExtraArgs... extra_args) {
+ return NativeValueTraits<std::remove_pointer_t<T>>::NativeValue(
+ isolate, value, exception_state,
+ std::forward<ExtraArgs>(extra_args)...);
+ }
+};
+
+template <typename T>
+struct NativeValueTraitsBase<
+ T,
+ std::enable_if_t<std::is_base_of<IDLBase, T>::value>> {
+ STATIC_ONLY(NativeValueTraitsBase);
+
+ using ImplType = typename T::ImplType;
- // Pointer types have nullptr as IDL null value.
- // ScriptValue, String, and union types have IsNull member function.
static constexpr bool has_null_value =
- std::is_pointer_v<ImplType> ||
- requires(ImplType value) { value.IsNull(); };
+ bindings::NativeValueTraitsHasNullValue<ImplType>::value;
// This should only be true for certain subclasses of ScriptWrappable
// that satisfy the assumptions of CreateIDLSequenceFromV8ArraySlow() with
--- a/third_party/blink/renderer/bindings/core/v8/native_value_traits_buffer_sources.cc
+++ b/third_party/blink/renderer/bindings/core/v8/native_value_traits_buffer_sources.cc
@@ -7,7 +7,6 @@
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/frame/web_feature.h"
-#include "third_party/blink/renderer/core/typed_arrays/flexible_array_buffer_view.h"
#include "third_party/blink/renderer/core/typed_arrays/typed_flexible_array_buffer_view.h"
namespace blink {
@@ -698,11 +697,12 @@ DOMArrayBufferBase* NativeValueTraits<
// ArrayBufferView
template <typename T>
- requires std::derived_from<T, DOMArrayBufferView>
-NotShared<T> NativeValueTraits<NotShared<T>>::NativeValue(
- v8::Isolate* isolate,
- v8::Local<v8::Value> value,
- ExceptionState& exception_state) {
+NotShared<T> NativeValueTraits<
+ NotShared<T>,
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
+ NativeValue(v8::Isolate* isolate,
+ v8::Local<v8::Value> value,
+ ExceptionState& exception_state) {
return NativeValueImpl<
RecipeTrait<NotShared<T>>, ToDOMViewType<T, kNotShared>,
Nullablity::kIsNotNullable, BufferSizeCheck::kCheck,
@@ -711,12 +711,13 @@ NotShared<T> NativeValueTraits<NotShared
}
template <typename T>
- requires std::derived_from<T, DOMArrayBufferView>
-NotShared<T> NativeValueTraits<NotShared<T>>::ArgumentValue(
- v8::Isolate* isolate,
- int argument_index,
- v8::Local<v8::Value> value,
- ExceptionState& exception_state) {
+NotShared<T> NativeValueTraits<
+ NotShared<T>,
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
+ ArgumentValue(v8::Isolate* isolate,
+ int argument_index,
+ v8::Local<v8::Value> value,
+ ExceptionState& exception_state) {
return ArgumentValueImpl<
RecipeTrait<NotShared<T>>, ToDOMViewType<T, kNotShared>,
Nullablity::kIsNotNullable, BufferSizeCheck::kCheck,
@@ -727,11 +728,12 @@ NotShared<T> NativeValueTraits<NotShared
// [AllowShared] ArrayBufferView
template <typename T>
- requires std::derived_from<T, DOMArrayBufferView>
-MaybeShared<T> NativeValueTraits<MaybeShared<T>>::NativeValue(
- v8::Isolate* isolate,
- v8::Local<v8::Value> value,
- ExceptionState& exception_state) {
+MaybeShared<T> NativeValueTraits<
+ MaybeShared<T>,
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
+ NativeValue(v8::Isolate* isolate,
+ v8::Local<v8::Value> value,
+ ExceptionState& exception_state) {
return NativeValueImpl<RecipeTrait<MaybeShared<T>>,
ToDOMViewType<T, kMaybeShared>,
Nullablity::kIsNotNullable, BufferSizeCheck::kCheck,
@@ -740,12 +742,13 @@ MaybeShared<T> NativeValueTraits<MaybeSh
}
template <typename T>
- requires std::derived_from<T, DOMArrayBufferView>
-MaybeShared<T> NativeValueTraits<MaybeShared<T>>::ArgumentValue(
- v8::Isolate* isolate,
- int argument_index,
- v8::Local<v8::Value> value,
- ExceptionState& exception_state) {
+MaybeShared<T> NativeValueTraits<
+ MaybeShared<T>,
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
+ ArgumentValue(v8::Isolate* isolate,
+ int argument_index,
+ v8::Local<v8::Value> value,
+ ExceptionState& exception_state) {
return ArgumentValueImpl<RecipeTrait<MaybeShared<T>>,
ToDOMViewType<T, kMaybeShared>,
Nullablity::kIsNotNullable, BufferSizeCheck::kCheck,
@@ -756,12 +759,12 @@ MaybeShared<T> NativeValueTraits<MaybeSh
// [AllowShared, BufferSourceTypeNoSizeLimit] ArrayBufferView
template <typename T>
- requires std::derived_from<T, DOMArrayBufferView>
-MaybeShared<T>
-NativeValueTraits<IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>>::NativeValue(
- v8::Isolate* isolate,
- v8::Local<v8::Value> value,
- ExceptionState& exception_state) {
+MaybeShared<T> NativeValueTraits<
+ IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>,
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
+ NativeValue(v8::Isolate* isolate,
+ v8::Local<v8::Value> value,
+ ExceptionState& exception_state) {
return NativeValueImpl<
RecipeTrait<MaybeShared<T>>, ToDOMViewType<T, kMaybeShared>,
Nullablity::kIsNotNullable, BufferSizeCheck::kDoNotCheck,
@@ -770,12 +773,13 @@ NativeValueTraits<IDLBufferSourceTypeNoS
}
template <typename T>
- requires std::derived_from<T, DOMArrayBufferView>
-MaybeShared<T> NativeValueTraits<IDLBufferSourceTypeNoSizeLimit<
- MaybeShared<T>>>::ArgumentValue(v8::Isolate* isolate,
- int argument_index,
- v8::Local<v8::Value> value,
- ExceptionState& exception_state) {
+MaybeShared<T> NativeValueTraits<
+ IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>,
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
+ ArgumentValue(v8::Isolate* isolate,
+ int argument_index,
+ v8::Local<v8::Value> value,
+ ExceptionState& exception_state) {
return ArgumentValueImpl<
RecipeTrait<MaybeShared<T>>, ToDOMViewType<T, kMaybeShared>,
Nullablity::kIsNotNullable, BufferSizeCheck::kDoNotCheck,
@@ -786,11 +790,12 @@ MaybeShared<T> NativeValueTraits<IDLBuff
// Nullable ArrayBufferView
template <typename T>
- requires std::derived_from<T, DOMArrayBufferView>
-NotShared<T> NativeValueTraits<IDLNullable<NotShared<T>>>::NativeValue(
- v8::Isolate* isolate,
- v8::Local<v8::Value> value,
- ExceptionState& exception_state) {
+NotShared<T> NativeValueTraits<
+ IDLNullable<NotShared<T>>,
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
+ NativeValue(v8::Isolate* isolate,
+ v8::Local<v8::Value> value,
+ ExceptionState& exception_state) {
return NativeValueImpl<
RecipeTrait<NotShared<T>>, ToDOMViewType<T, kNotShared>,
Nullablity::kIsNullable, BufferSizeCheck::kCheck,
@@ -799,12 +804,13 @@ NotShared<T> NativeValueTraits<IDLNullab
}
template <typename T>
- requires std::derived_from<T, DOMArrayBufferView>
-NotShared<T> NativeValueTraits<IDLNullable<NotShared<T>>>::ArgumentValue(
- v8::Isolate* isolate,
- int argument_index,
- v8::Local<v8::Value> value,
- ExceptionState& exception_state) {
+NotShared<T> NativeValueTraits<
+ IDLNullable<NotShared<T>>,
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
+ ArgumentValue(v8::Isolate* isolate,
+ int argument_index,
+ v8::Local<v8::Value> value,
+ ExceptionState& exception_state) {
return ArgumentValueImpl<
RecipeTrait<NotShared<T>>, ToDOMViewType<T, kNotShared>,
Nullablity::kIsNullable, BufferSizeCheck::kCheck,
@@ -815,11 +821,12 @@ NotShared<T> NativeValueTraits<IDLNullab
// Nullable [AllowShared] ArrayBufferView
template <typename T>
- requires std::derived_from<T, DOMArrayBufferView>
-MaybeShared<T> NativeValueTraits<IDLNullable<MaybeShared<T>>>::NativeValue(
- v8::Isolate* isolate,
- v8::Local<v8::Value> value,
- ExceptionState& exception_state) {
+MaybeShared<T> NativeValueTraits<
+ IDLNullable<MaybeShared<T>>,
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
+ NativeValue(v8::Isolate* isolate,
+ v8::Local<v8::Value> value,
+ ExceptionState& exception_state) {
return NativeValueImpl<RecipeTrait<MaybeShared<T>>,
ToDOMViewType<T, kMaybeShared>,
Nullablity::kIsNullable, BufferSizeCheck::kCheck,
@@ -828,12 +835,13 @@ MaybeShared<T> NativeValueTraits<IDLNull
}
template <typename T>
- requires std::derived_from<T, DOMArrayBufferView>
-MaybeShared<T> NativeValueTraits<IDLNullable<MaybeShared<T>>>::ArgumentValue(
- v8::Isolate* isolate,
- int argument_index,
- v8::Local<v8::Value> value,
- ExceptionState& exception_state) {
+MaybeShared<T> NativeValueTraits<
+ IDLNullable<MaybeShared<T>>,
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
+ ArgumentValue(v8::Isolate* isolate,
+ int argument_index,
+ v8::Local<v8::Value> value,
+ ExceptionState& exception_state) {
return ArgumentValueImpl<RecipeTrait<MaybeShared<T>>,
ToDOMViewType<T, kMaybeShared>,
Nullablity::kIsNullable, BufferSizeCheck::kCheck,
@@ -844,9 +852,9 @@ MaybeShared<T> NativeValueTraits<IDLNull
// Nullable [AllowShared, BufferSourceTypeNoSizeLimit] ArrayBufferView
template <typename T>
- requires std::derived_from<T, DOMArrayBufferView>
-MaybeShared<T>
-NativeValueTraits<IDLNullable<IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>>>::
+MaybeShared<T> NativeValueTraits<
+ IDLNullable<IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>>,
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
ArgumentValue(v8::Isolate* isolate,
int argument_index,
v8::Local<v8::Value> value,
@@ -861,11 +869,13 @@ NativeValueTraits<IDLNullable<IDLBufferS
// [AllowShared, FlexibleArrayBufferView] ArrayBufferView
template <typename T>
- requires std::derived_from<T, FlexibleArrayBufferView>
-T NativeValueTraits<T>::ArgumentValue(v8::Isolate* isolate,
- int argument_index,
- v8::Local<v8::Value> value,
- ExceptionState& exception_state) {
+T NativeValueTraits<T,
+ typename std::enable_if_t<
+ std::is_base_of<FlexibleArrayBufferView, T>::value>>::
+ ArgumentValue(v8::Isolate* isolate,
+ int argument_index,
+ v8::Local<v8::Value> value,
+ ExceptionState& exception_state) {
return ArgumentValueImpl<RecipeTrait<T>, ToFlexibleArrayBufferView,
Nullablity::kIsNotNullable, BufferSizeCheck::kCheck,
ResizableAllowance::kDisallowResizable,
@@ -877,12 +887,13 @@ T NativeValueTraits<T>::ArgumentValue(v8
// ArrayBufferView
template <typename T>
- requires std::derived_from<T, FlexibleArrayBufferView>
-T NativeValueTraits<IDLBufferSourceTypeNoSizeLimit<T>>::ArgumentValue(
- v8::Isolate* isolate,
- int argument_index,
- v8::Local<v8::Value> value,
- ExceptionState& exception_state) {
+T NativeValueTraits<IDLBufferSourceTypeNoSizeLimit<T>,
+ typename std::enable_if_t<
+ std::is_base_of<FlexibleArrayBufferView, T>::value>>::
+ ArgumentValue(v8::Isolate* isolate,
+ int argument_index,
+ v8::Local<v8::Value> value,
+ ExceptionState& exception_state) {
return ArgumentValueImpl<
RecipeTrait<T>, ToFlexibleArrayBufferView, Nullablity::kIsNotNullable,
BufferSizeCheck::kDoNotCheck, ResizableAllowance::kDisallowResizable,
@@ -893,12 +904,13 @@ T NativeValueTraits<IDLBufferSourceTypeN
// Nullable [AllowShared, FlexibleArrayBufferView] ArrayBufferView
template <typename T>
- requires std::derived_from<T, FlexibleArrayBufferView>
-T NativeValueTraits<IDLNullable<T>>::ArgumentValue(
- v8::Isolate* isolate,
- int argument_index,
- v8::Local<v8::Value> value,
- ExceptionState& exception_state) {
+T NativeValueTraits<IDLNullable<T>,
+ typename std::enable_if_t<
+ std::is_base_of<FlexibleArrayBufferView, T>::value>>::
+ ArgumentValue(v8::Isolate* isolate,
+ int argument_index,
+ v8::Local<v8::Value> value,
+ ExceptionState& exception_state) {
return ArgumentValueImpl<RecipeTrait<T>, ToFlexibleArrayBufferView,
Nullablity::kIsNullable, BufferSizeCheck::kCheck,
ResizableAllowance::kDisallowResizable,
--- a/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h
+++ b/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h
@@ -5,9 +5,7 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_NATIVE_VALUE_TRAITS_IMPL_H_
#define THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_NATIVE_VALUE_TRAITS_IMPL_H_
-#include <concepts>
#include <optional>
-#include <type_traits>
#include "third_party/blink/renderer/bindings/core/v8/idl_types.h"
#include "third_party/blink/renderer/bindings/core/v8/native_value_traits.h"
@@ -718,8 +716,9 @@ struct CORE_EXPORT NativeValueTraits<
};
template <typename T>
- requires std::derived_from<T, DOMArrayBufferView>
-struct NativeValueTraits<T> {
+struct NativeValueTraits<
+ T,
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>> {
// NotShared<T> or MaybeShared<T> should be used instead.
static T* NativeValue(v8::Isolate* isolate,
v8::Local<v8::Value> value,
@@ -731,8 +730,9 @@ struct NativeValueTraits<T> {
};
template <typename T>
- requires std::derived_from<T, DOMArrayBufferView>
-struct NativeValueTraits<IDLNullable<T>> {
+struct NativeValueTraits<
+ IDLNullable<T>,
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>> {
// NotShared<T> or MaybeShared<T> should be used instead.
static T* NativeValue(v8::Isolate* isolate,
v8::Local<v8::Value> value,
@@ -744,8 +744,9 @@ struct NativeValueTraits<IDLNullable<T>>
};
template <typename T>
- requires std::derived_from<T, DOMArrayBufferView>
-struct NativeValueTraits<NotShared<T>>
+struct NativeValueTraits<
+ NotShared<T>,
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>
: public NativeValueTraitsBase<NotShared<T>> {
static NotShared<T> NativeValue(v8::Isolate* isolate,
v8::Local<v8::Value> value,
@@ -758,8 +759,9 @@ struct NativeValueTraits<NotShared<T>>
};
template <typename T>
- requires std::derived_from<T, DOMArrayBufferView>
-struct NativeValueTraits<IDLNullable<NotShared<T>>>
+struct NativeValueTraits<
+ IDLNullable<NotShared<T>>,
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>
: public NativeValueTraitsBase<NotShared<T>> {
static NotShared<T> NativeValue(v8::Isolate* isolate,
v8::Local<v8::Value> value,
@@ -772,8 +774,9 @@ struct NativeValueTraits<IDLNullable<Not
};
template <typename T>
- requires std::derived_from<T, DOMArrayBufferView>
-struct NativeValueTraits<MaybeShared<T>>
+struct NativeValueTraits<
+ MaybeShared<T>,
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>
: public NativeValueTraitsBase<MaybeShared<T>> {
static MaybeShared<T> NativeValue(v8::Isolate* isolate,
v8::Local<v8::Value> value,
@@ -786,8 +789,9 @@ struct NativeValueTraits<MaybeShared<T>>
};
template <typename T>
- requires std::derived_from<T, DOMArrayBufferView>
-struct NativeValueTraits<IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>>
+struct NativeValueTraits<
+ IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>,
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>
: public NativeValueTraitsBase<MaybeShared<T>> {
// FlexibleArrayBufferView uses this in its implementation, so we cannot
// delete it.
@@ -802,8 +806,9 @@ struct NativeValueTraits<IDLBufferSource
};
template <typename T>
- requires std::derived_from<T, DOMArrayBufferView>
-struct NativeValueTraits<IDLNullable<MaybeShared<T>>>
+struct NativeValueTraits<
+ IDLNullable<MaybeShared<T>>,
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>
: public NativeValueTraitsBase<MaybeShared<T>> {
static MaybeShared<T> NativeValue(v8::Isolate* isolate,
v8::Local<v8::Value> value,
@@ -816,9 +821,9 @@ struct NativeValueTraits<IDLNullable<May
};
template <typename T>
- requires std::derived_from<T, DOMArrayBufferView>
struct NativeValueTraits<
- IDLNullable<IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>>>
+ IDLNullable<IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>>,
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>
: public NativeValueTraitsBase<MaybeShared<T>> {
// BufferSourceTypeNoSizeLimit must be used only as arguments.
static MaybeShared<T> NativeValue(v8::Isolate* isolate,
@@ -832,8 +837,11 @@ struct NativeValueTraits<
};
template <typename T>
- requires std::derived_from<T, FlexibleArrayBufferView>
-struct NativeValueTraits<T> : public NativeValueTraitsBase<T> {
+struct NativeValueTraits<
+ T,
+ typename std::enable_if_t<
+ std::is_base_of<FlexibleArrayBufferView, T>::value>>
+ : public NativeValueTraitsBase<T> {
// FlexibleArrayBufferView must be used only as arguments.
static T NativeValue(v8::Isolate* isolate,
v8::Local<v8::Value> value,
@@ -846,8 +854,10 @@ struct NativeValueTraits<T> : public Nat
};
template <typename T>
- requires std::derived_from<T, FlexibleArrayBufferView>
-struct NativeValueTraits<IDLBufferSourceTypeNoSizeLimit<T>>
+struct NativeValueTraits<
+ IDLBufferSourceTypeNoSizeLimit<T>,
+ typename std::enable_if_t<
+ std::is_base_of<FlexibleArrayBufferView, T>::value>>
: public NativeValueTraitsBase<T> {
// BufferSourceTypeNoSizeLimit and FlexibleArrayBufferView must be used only
// as arguments.
@@ -862,8 +872,11 @@ struct NativeValueTraits<IDLBufferSource
};
template <typename T>
- requires std::derived_from<T, FlexibleArrayBufferView>
-struct NativeValueTraits<IDLNullable<T>> : public NativeValueTraitsBase<T> {
+struct NativeValueTraits<
+ IDLNullable<T>,
+ typename std::enable_if_t<
+ std::is_base_of<FlexibleArrayBufferView, T>::value>>
+ : public NativeValueTraitsBase<T> {
// FlexibleArrayBufferView must be used only as arguments.
static T NativeValue(v8::Isolate* isolate,
v8::Local<v8::Value> value,
@@ -1199,8 +1212,9 @@ NativeValueTraits<IDLSequence<T>>::Nativ
}
template <typename T>
- requires NativeValueTraits<IDLSequence<T>>::has_null_value
-struct NativeValueTraits<IDLNullable<IDLSequence<T>>>
+struct NativeValueTraits<IDLNullable<IDLSequence<T>>,
+ typename std::enable_if_t<
+ NativeValueTraits<IDLSequence<T>>::has_null_value>>
: public NativeValueTraitsBase<HeapVector<AddMemberIfNeeded<T>>*> {
using ImplType = typename NativeValueTraits<IDLSequence<T>>::ImplType*;
@@ -1276,8 +1290,9 @@ struct NativeValueTraits<IDLArray<T>>
: public NativeValueTraits<IDLSequence<T>> {};
template <typename T>
- requires NativeValueTraits<IDLSequence<T>>::has_null_value
-struct NativeValueTraits<IDLNullable<IDLArray<T>>>
+struct NativeValueTraits<IDLNullable<IDLArray<T>>,
+ typename std::enable_if_t<
+ NativeValueTraits<IDLSequence<T>>::has_null_value>>
: public NativeValueTraits<IDLNullable<IDLSequence<T>>> {};
// Record types
@@ -1407,8 +1422,10 @@ struct NativeValueTraits<IDLRecord<K, V>
// Callback function types
template <typename T>
- requires std::derived_from<T, CallbackFunctionBase>
-struct NativeValueTraits<T> : public NativeValueTraitsBase<T*> {
+struct NativeValueTraits<
+ T,
+ typename std::enable_if_t<std::is_base_of<CallbackFunctionBase, T>::value>>
+ : public NativeValueTraitsBase<T*> {
static T* NativeValue(v8::Isolate* isolate,
v8::Local<v8::Value> value,
ExceptionState& exception_state) {
@@ -1431,8 +1448,9 @@ struct NativeValueTraits<T> : public Nat
};
template <typename T>
- requires std::derived_from<T, CallbackFunctionBase>
-struct NativeValueTraits<IDLNullable<T>>
+struct NativeValueTraits<
+ IDLNullable<T>,
+ typename std::enable_if_t<std::is_base_of<CallbackFunctionBase, T>::value>>
: public NativeValueTraitsBase<IDLNullable<T>> {
static T* NativeValue(v8::Isolate* isolate,
v8::Local<v8::Value> value,
@@ -1461,8 +1479,10 @@ struct NativeValueTraits<IDLNullable<T>>
// Callback interface types
template <typename T>
- requires std::derived_from<T, CallbackInterfaceBase>
-struct NativeValueTraits<T> : public NativeValueTraitsBase<T*> {
+struct NativeValueTraits<
+ T,
+ typename std::enable_if_t<std::is_base_of<CallbackInterfaceBase, T>::value>>
+ : public NativeValueTraitsBase<T*> {
static T* NativeValue(v8::Isolate* isolate,
v8::Local<v8::Value> value,
ExceptionState& exception_state) {
@@ -1486,8 +1506,9 @@ struct NativeValueTraits<T> : public Nat
// Interface types
template <typename T>
- requires std::derived_from<T, CallbackInterfaceBase>
-struct NativeValueTraits<IDLNullable<T>>
+struct NativeValueTraits<
+ IDLNullable<T>,
+ typename std::enable_if_t<std::is_base_of<CallbackInterfaceBase, T>::value>>
: public NativeValueTraitsBase<IDLNullable<T>> {
static T* NativeValue(v8::Isolate* isolate,
v8::Local<v8::Value> value,
@@ -1516,8 +1537,11 @@ struct NativeValueTraits<IDLNullable<T>>
// Dictionary types
template <typename T>
- requires std::derived_from<T, bindings::DictionaryBase>
-struct NativeValueTraits<T> : public NativeValueTraitsBase<T*> {
+struct NativeValueTraits<
+ T,
+ typename std::enable_if_t<
+ std::is_base_of<bindings::DictionaryBase, T>::value>>
+ : public NativeValueTraitsBase<T*> {
static T* NativeValue(v8::Isolate* isolate,
v8::Local<v8::Value> value,
ExceptionState& exception_state) {
@@ -1528,11 +1552,14 @@ struct NativeValueTraits<T> : public Nat
// We don't support nullable dictionary types in general since it's quite
// confusing and often misused.
template <typename T>
- requires std::derived_from<T, bindings::DictionaryBase> &&
- (std::same_as<T, GPUColorTargetState> ||
- std::same_as<T, GPURenderPassColorAttachment> ||
- std::same_as<T, GPUVertexBufferLayout>)
-struct NativeValueTraits<IDLNullable<T>> : public NativeValueTraitsBase<T*> {
+struct NativeValueTraits<
+ IDLNullable<T>,
+ typename std::enable_if_t<
+ std::is_base_of<bindings::DictionaryBase, T>::value &&
+ (std::is_same<T, GPUColorTargetState>::value ||
+ std::is_same<T, GPURenderPassColorAttachment>::value ||
+ std::is_same<T, GPUVertexBufferLayout>::value)>>
+ : public NativeValueTraitsBase<T*> {
static T* NativeValue(v8::Isolate* isolate,
v8::Local<v8::Value> value,
ExceptionState& exception_state) {
@@ -1544,8 +1571,11 @@ struct NativeValueTraits<IDLNullable<T>>
// Enumeration types
template <typename T>
- requires std::derived_from<T, bindings::EnumerationBase>
-struct NativeValueTraits<T> : public NativeValueTraitsBase<T> {
+struct NativeValueTraits<
+ T,
+ typename std::enable_if_t<
+ std::is_base_of<bindings::EnumerationBase, T>::value>>
+ : public NativeValueTraitsBase<T> {
static T NativeValue(v8::Isolate* isolate,
v8::Local<v8::Value> value,
ExceptionState& exception_state) {
@@ -1555,8 +1585,10 @@ struct NativeValueTraits<T> : public Nat
// Interface types
template <typename T>
- requires std::derived_from<T, ScriptWrappable>
-struct NativeValueTraits<T> : public NativeValueTraitsBase<T*> {
+struct NativeValueTraits<
+ T,
+ typename std::enable_if_t<std::is_base_of<ScriptWrappable, T>::value>>
+ : public NativeValueTraitsBase<T*> {
// This signifies that CreateIDLSequenceFromV8ArraySlow() may apply
// certain optimization based on assumptions about `NativeValue()`
// implementation below. For subclasses of ScriptWrappable that have
@@ -1593,8 +1625,9 @@ struct NativeValueTraits<T> : public Nat
};
template <typename T>
- requires std::derived_from<T, ScriptWrappable>
-struct NativeValueTraits<IDLNullable<T>>
+struct NativeValueTraits<
+ IDLNullable<T>,
+ typename std::enable_if_t<std::is_base_of<ScriptWrappable, T>::value>>
: public NativeValueTraitsBase<IDLNullable<T>> {
static inline T* NativeValue(v8::Isolate* isolate,
v8::Local<v8::Value> value,
@@ -1629,8 +1662,10 @@ struct NativeValueTraits<IDLNullable<T>>
};
template <typename T>
- requires std::derived_from<T, bindings::UnionBase>
-struct NativeValueTraits<T> : public NativeValueTraitsBase<T*> {
+struct NativeValueTraits<
+ T,
+ typename std::enable_if_t<std::is_base_of<bindings::UnionBase, T>::value>>
+ : public NativeValueTraitsBase<T*> {
static T* NativeValue(v8::Isolate* isolate,
v8::Local<v8::Value> value,
ExceptionState& exception_state) {
@@ -1646,8 +1681,10 @@ struct NativeValueTraits<T> : public Nat
};
template <typename T>
- requires std::derived_from<T, bindings::UnionBase>
-struct NativeValueTraits<IDLNullable<T>> : public NativeValueTraitsBase<T*> {
+struct NativeValueTraits<
+ IDLNullable<T>,
+ typename std::enable_if_t<std::is_base_of<bindings::UnionBase, T>::value>>
+ : public NativeValueTraitsBase<T*> {
static T* NativeValue(v8::Isolate* isolate,
v8::Local<v8::Value> value,
ExceptionState& exception_state) {
@@ -1668,8 +1705,9 @@ struct NativeValueTraits<IDLNullable<T>>
// Nullable types
template <typename InnerType>
- requires(!NativeValueTraits<InnerType>::has_null_value)
-struct NativeValueTraits<IDLNullable<InnerType>>
+struct NativeValueTraits<
+ IDLNullable<InnerType>,
+ typename std::enable_if_t<!NativeValueTraits<InnerType>::has_null_value>>
: public NativeValueTraitsBase<IDLNullable<InnerType>> {
// https://webidl.spec.whatwg.org/#es-nullable-type
using ImplType =
@@ -1701,8 +1739,9 @@ struct NativeValueTraits<IDLNullable<IDL
// Optional types
template <typename T>
- requires std::is_arithmetic_v<typename NativeValueTraits<T>::ImplType>
-struct NativeValueTraits<IDLOptional<T>>
+struct NativeValueTraits<IDLOptional<T>,
+ typename std::enable_if_t<std::is_arithmetic<
+ typename NativeValueTraits<T>::ImplType>::value>>
: public NativeValueTraitsBase<typename NativeValueTraits<T>::ImplType> {
using ImplType = typename NativeValueTraits<T>::ImplType;
@@ -1724,8 +1763,9 @@ struct NativeValueTraits<IDLOptional<T>>
};
template <typename T>
- requires std::is_pointer_v<typename NativeValueTraits<T>::ImplType>
-struct NativeValueTraits<IDLOptional<T>>
+struct NativeValueTraits<IDLOptional<T>,
+ typename std::enable_if_t<std::is_pointer<
+ typename NativeValueTraits<T>::ImplType>::value>>
: public NativeValueTraitsBase<typename NativeValueTraits<T>::ImplType> {
using ImplType = typename NativeValueTraits<T>::ImplType;

View file

@ -1,144 +0,0 @@
revert as workaround for compiler error with old clang < 17
commit ce71348a09f6689dd01a68db64b172191d0182d8
Author: Andrey Kosyakov <caseq@chromium.org>
Date: Thu Dec 21 18:38:38 2023 +0000
[bindings] Use v8::Array::Iterate for converting script wrappables
This changes CreateIDLSequenceFromV8Array to use the new
v8::Array::Iterate() operation.
This speeds up the "execBundles" part of the microbenchmark
at crbug.com/dawn/1858 by around 3x.
This depends on crrev.com/c/4846594 landing (and rolling) first.
This is a slight re-work of https://crrev.com/c/4847447/3,
originally by jkummerow@chromium.org
Bug: v8:14218, dawn:1858, 1511239
Change-Id: Ia266556d05b4d53e6942e12609d1c08882b4ff0f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5132129
Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1240236}
--- a/third_party/blink/renderer/bindings/core/v8/native_value_traits.h 2024-05-13 20:23:41.165774029 +0200
+++ b/third_party/blink/renderer/bindings/core/v8/native_value_traits.h 2024-05-13 20:27:58.994663485 +0200
@@ -110,12 +110,6 @@ struct NativeValueTraitsBase<
static constexpr bool has_null_value =
bindings::NativeValueTraitsHasNullValue<ImplType>::value;
- // This should only be true for certain subclasses of ScriptWrappable
- // that satisfy the assumptions of CreateIDLSequenceFromV8ArraySlow() with
- // regards to how NativeValue() is implemented for the underlying type.
- static constexpr bool supports_scriptwrappable_specific_fast_array_iteration =
- false;
-
template <typename... ExtraArgs>
static decltype(auto) ArgumentValue(v8::Isolate* isolate,
int argument_index,
--- a/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h 2024-05-13 20:23:47.295915837 +0200
+++ b/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h 2024-05-13 20:27:21.649808564 +0200
@@ -1050,87 +1050,11 @@ CreateIDLSequenceFromV8ArraySlow(v8::Iso
return {};
}
- using ResultType = typename NativeValueTraits<IDLSequence<T>>::ImplType;
- ResultType result;
+ typename NativeValueTraits<IDLSequence<T>>::ImplType result;
result.ReserveInitialCapacity(length);
v8::Local<v8::Context> current_context = isolate->GetCurrentContext();
v8::TryCatch try_block(isolate);
- // Fast path -- we're creating a sequence of script wrappables, which can be
- // done by directly getting underlying object as long as array types are
- // homogeneous. With ScriptWrappables, we don't expect to enter JS during
- // iteration, so we can rely on v8::Array::Iterate() which is much faster than
- // iterating an array on the client side of the v8. Additionally, for most
- // subsptyes of ScriptWrappables, we can speed up type checks (see more on
- // that below next to supports_scriptwrappable_specific_fast_array_iteration
- // check.
- if constexpr (std::is_base_of_v<ScriptWrappable, T>) {
- struct CallbackData {
- STACK_ALLOCATED();
-
- public:
- v8::Isolate* isolate;
- v8::TypecheckWitness witness;
- ResultType& result;
- ExceptionState& exception_state;
- CallbackData(v8::Isolate* isolate,
- ResultType& result,
- ExceptionState& exception_state)
- : isolate(isolate),
- witness(isolate),
- result(result),
- exception_state(exception_state) {}
- };
-
- CallbackData callback_data(isolate, result, exception_state);
- v8::Array::IterationCallback callback = [](uint32_t index,
- v8::Local<v8::Value> v8_element,
- void* data) {
- CallbackData* callback_data = reinterpret_cast<CallbackData*>(data);
- v8::Isolate* isolate = callback_data->isolate;
- // 3.4. Initialize Si to the result of converting nextItem to an IDL value
- // of type T.
- v8::TypecheckWitness& witness = callback_data->witness;
- // We can speed up type check by taking advantage of V8's type witness,
- // provided traits' NativeValue implementation doesn't have additional
- // logic beyond checking the type and calling ToScriptWrappable().
- if constexpr (
- NativeValueTraits<
- T>::supports_scriptwrappable_specific_fast_array_iteration) {
- if (witness.Matches(v8_element)) {
- auto&& value = ToScriptWrappable(isolate, v8_element.As<v8::Object>())
- ->template ToImpl<T>();
- callback_data->result.push_back(std::move(value));
- return v8::Array::CallbackResult::kContinue;
- }
- }
- auto&& element = NativeValueTraits<T>::NativeValue(
- isolate, v8_element, callback_data->exception_state);
- if (callback_data->exception_state.HadException()) {
- // It doesn't matter whether we return `kException` or `kBreak` here,
- // as that only affects the return value of `v8_array->Iterate()`,
- // which we are ignoring.
- return v8::Array::CallbackResult::kException;
- }
- if constexpr (
- NativeValueTraits<
- T>::supports_scriptwrappable_specific_fast_array_iteration) {
- witness.Update(v8_element);
- }
- callback_data->result.push_back(std::move(element));
- return v8::Array::CallbackResult::kContinue;
- };
- if (!v8_array->Iterate(current_context, callback, &callback_data)
- .IsJust()) {
- if (try_block.HasCaught()) {
- exception_state.RethrowV8Exception(try_block.Exception());
- }
- DCHECK(exception_state.HadException());
- return {};
- }
- return result;
- }
-
// Array length may change if array is mutated during iteration.
for (uint32_t i = 0; i < v8_array->Length(); ++i) {
v8::Local<v8::Value> v8_element;
@@ -1590,12 +1514,6 @@ struct NativeValueTraits<
T,
typename std::enable_if_t<std::is_base_of<ScriptWrappable, T>::value>>
: public NativeValueTraitsBase<T*> {
- // This signifies that CreateIDLSequenceFromV8ArraySlow() may apply
- // certain optimization based on assumptions about `NativeValue()`
- // implementation below. For subclasses of ScriptWrappable that have
- // different implementation of NativeValue(), this should remain false.
- static constexpr bool supports_scriptwrappable_specific_fast_array_iteration =
- true;
static inline T* NativeValue(v8::Isolate* isolate,
v8::Local<v8::Value> value,

View file

@ -1,24 +0,0 @@
diff -up chromium-125.0.6422.60/chrome/browser/ui/webui/top_chrome/webui_contents_wrapper.h.assert chromium-125.0.6422.60/chrome/browser/ui/webui/top_chrome/webui_contents_wrapper.h
--- chromium-125.0.6422.60/chrome/browser/ui/webui/top_chrome/webui_contents_wrapper.h.assert 2024-05-18 19:33:37.165243577 +0200
+++ chromium-125.0.6422.60/chrome/browser/ui/webui/top_chrome/webui_contents_wrapper.h 2024-05-18 19:45:51.224995489 +0200
@@ -185,7 +185,7 @@ class WebUIContentsWrapperT : public Web
supports_draggable_regions,
T::GetWebUIName()),
webui_url_(webui_url) {
- static_assert(
+ assert(
views_metrics::IsValidWebUINameVariant("." + T::GetWebUIName()));
if (is_ready_to_show()) {
CHECK(GetWebUIController());
diff -up chromium-125.0.6422.60/v8/src/base/small-vector.h.assert chromium-125.0.6422.60/v8/src/base/small-vector.h
--- chromium-125.0.6422.60/v8/src/base/small-vector.h.assert 2024-05-15 23:48:18.000000000 +0200
+++ chromium-125.0.6422.60/v8/src/base/small-vector.h 2024-05-17 12:33:58.745651173 +0200
@@ -22,7 +22,7 @@ template <typename T, size_t kSize, type
class SmallVector {
// Currently only support trivially copyable and trivially destructible data
// types, as it uses memcpy to copy elements and never calls destructors.
- ASSERT_TRIVIALLY_COPYABLE(T);
+ //ASSERT_TRIVIALLY_COPYABLE(T);
static_assert(std::is_trivially_destructible<T>::value);
public:

View file

@ -1,36 +0,0 @@
diff -up chromium-125.0.6422.60/components/variations/service/ui_string_overrider.cc.default-constructor-involving-anonymous-union chromium-125.0.6422.60/components/variations/service/ui_string_overrider.cc
--- chromium-125.0.6422.60/components/variations/service/ui_string_overrider.cc.default-constructor-involving-anonymous-union 2024-05-15 23:46:17.000000000 +0200
+++ chromium-125.0.6422.60/components/variations/service/ui_string_overrider.cc 2024-05-17 12:33:58.684649909 +0200
@@ -12,7 +12,7 @@
namespace variations {
-UIStringOverrider::UIStringOverrider() = default;
+UIStringOverrider::UIStringOverrider() {}
UIStringOverrider::UIStringOverrider(base::span<const uint32_t> resource_hashes,
base::span<const int> resource_indices)
diff -up chromium-125.0.6422.60/content/browser/interest_group/header_direct_from_seller_signals.cc.default-constructor-involving-anonymous-union chromium-125.0.6422.60/content/browser/interest_group/header_direct_from_seller_signals.cc
--- chromium-125.0.6422.60/content/browser/interest_group/header_direct_from_seller_signals.cc.default-constructor-involving-anonymous-union 2024-05-15 23:46:17.000000000 +0200
+++ chromium-125.0.6422.60/content/browser/interest_group/header_direct_from_seller_signals.cc 2024-05-17 12:33:58.685649929 +0200
@@ -46,7 +46,7 @@ size_t GetResultSizeBytes(const HeaderDi
} // namespace
-HeaderDirectFromSellerSignals::Result::Result() = default;
+HeaderDirectFromSellerSignals::Result::Result() {}
HeaderDirectFromSellerSignals::Result::Result(
std::optional<std::string> seller_signals,
diff -up chromium-125.0.6422.60/third_party/blink/renderer/bindings/core/v8/frozen_array.h.default-constructor-involving-anonymous-union chromium-125.0.6422.60/third_party/blink/renderer/bindings/core/v8/frozen_array.h
--- chromium-125.0.6422.60/third_party/blink/renderer/bindings/core/v8/frozen_array.h.default-constructor-involving-anonymous-union 2024-05-18 09:52:22.385330304 +0200
+++ chromium-125.0.6422.60/third_party/blink/renderer/bindings/core/v8/frozen_array.h 2024-05-18 09:52:51.023891525 +0200
@@ -36,7 +36,7 @@ class FrozenArray final : public binding
using const_iterator = typename VectorType::const_iterator;
using const_reverse_iterator = typename VectorType::const_reverse_iterator;
- FrozenArray() = default;
+ FrozenArray() {}
explicit FrozenArray(VectorType array) : array_(std::move(array)) {}
~FrozenArray() override = default;

View file

@ -1,18 +0,0 @@
diff -up chromium-125.0.6422.60/ui/gfx/linux/drm_util_linux.cc.el7-old-libdrm chromium-125.0.6422.60/ui/gfx/linux/drm_util_linux.cc
--- chromium-125.0.6422.60/ui/gfx/linux/drm_util_linux.cc.el7-old-libdrm 2024-05-16 20:43:26.619455300 +0200
+++ chromium-125.0.6422.60/ui/gfx/linux/drm_util_linux.cc 2024-05-16 20:45:18.120716278 +0200
@@ -9,6 +9,14 @@
#include "base/logging.h"
#include "base/notreached.h"
+// the libdrm in EL-7 is too old to have this define
+#ifndef DRM_FORMAT_P010
+#define DRM_FORMAT_P010 fourcc_code('P', '0', '1', '0')
+#endif
+#ifndef DRM_FORMAT_ABGR16161616F
+#define DRM_FORMAT_ABGR16161616F fourcc_code('A', 'B', '4', 'H')
+#endif
+
namespace ui {
int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format) {

View file

@ -1,11 +0,0 @@
--- chromium-125.0.6422.60/optional.orig 2024-05-20 00:12:50.152306289 +0200
+++ chromium-125.0.6422.60/optional 2024-05-20 00:12:28.041823631 +0200
@@ -474,7 +474,7 @@
constexpr _Tp&
_M_get() noexcept
{
- __glibcxx_assert(this->_M_is_engaged());
+ //__glibcxx_assert(this->_M_is_engaged());
return static_cast<_Dp*>(this)->_M_payload._M_get();
}

View file

@ -1,417 +0,0 @@
diff -up chromium-125.0.6422.60/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.h.typename chromium-125.0.6422.60/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.h
--- chromium-125.0.6422.60/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.h.typename 2024-05-15 23:45:49.000000000 +0200
+++ chromium-125.0.6422.60/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.h 2024-05-17 12:33:58.735650966 +0200
@@ -26,7 +26,7 @@ PartitionRoot& InternalAllocatorRoot();
// A class that meets C++ named requirements, Allocator.
template <typename T>
-InternalAllocator<T>::value_type* InternalAllocator<T>::allocate(
+typename InternalAllocator<T>::value_type* InternalAllocator<T>::allocate(
std::size_t count) {
PA_CHECK(count <=
std::numeric_limits<std::size_t>::max() / sizeof(value_type));
diff -up chromium-125.0.6422.60/base/containers/heap_array.h.typename chromium-125.0.6422.60/base/containers/heap_array.h
--- chromium-125.0.6422.60/base/containers/heap_array.h.typename 2024-05-17 13:51:39.923426461 +0200
+++ chromium-125.0.6422.60/base/containers/heap_array.h 2024-05-17 13:54:01.866085730 +0200
@@ -32,8 +32,8 @@ class TRIVIAL_ABI GSL_OWNER HeapArray {
static_assert(!std::is_reference_v<T>,
"HeapArray cannot hold reference types");
- using iterator = base::span<T>::iterator;
- using const_iterator = base::span<const T>::iterator;
+ using iterator = typename base::span<T>::iterator;
+ using const_iterator = typename base::span<const T>::iterator;
// We don't put this default value in the template parameter list to allow the
// static_assert on is_reference_v to give a nicer error message.
using deleter_type = std::
diff -up chromium-125.0.6422.60/base/containers/map_util.h.typename chromium-125.0.6422.60/base/containers/map_util.h
--- chromium-125.0.6422.60/base/containers/map_util.h.typename 2024-05-15 23:45:49.000000000 +0200
+++ chromium-125.0.6422.60/base/containers/map_util.h 2024-05-17 12:33:58.735650966 +0200
@@ -44,7 +44,7 @@ constexpr internal::MappedType<Map>* Fin
template <typename Map,
typename Key,
typename MappedElementType =
- std::pointer_traits<internal::MappedType<Map>>::element_type>
+ typename std::pointer_traits<internal::MappedType<Map>>::element_type>
constexpr const MappedElementType* FindPtrOrNull(const Map& map,
const Key& key) {
auto it = map.find(key);
@@ -60,7 +60,7 @@ constexpr const MappedElementType* FindP
template <typename Map,
typename Key,
typename MappedElementType =
- std::pointer_traits<internal::MappedType<Map>>::element_type>
+ typename std::pointer_traits<internal::MappedType<Map>>::element_type>
constexpr MappedElementType* FindPtrOrNull(Map& map, const Key& key) {
auto it = map.find(key);
return it != map.end() ? base::to_address(it->second) : nullptr;
diff -up chromium-125.0.6422.60/base/containers/to_vector.h.typename chromium-125.0.6422.60/base/containers/to_vector.h
--- chromium-125.0.6422.60/base/containers/to_vector.h.typename 2024-05-15 23:45:49.000000000 +0200
+++ chromium-125.0.6422.60/base/containers/to_vector.h 2024-05-17 12:33:58.736650987 +0200
@@ -30,7 +30,7 @@ template <typename Range, typename Proj
std::indirectly_unary_invocable<Proj, ranges::iterator_t<Range>>
auto ToVector(Range&& range, Proj proj = {}) {
using ProjectedType =
- std::projected<ranges::iterator_t<Range>, Proj>::value_type;
+ typename std::projected<ranges::iterator_t<Range>, Proj>::value_type;
std::vector<ProjectedType> container;
container.reserve(std::size(range));
ranges::transform(std::forward<Range>(range), std::back_inserter(container),
diff -up chromium-125.0.6422.60/base/functional/bind_internal.h.typename chromium-125.0.6422.60/base/functional/bind_internal.h
--- chromium-125.0.6422.60/base/functional/bind_internal.h.typename 2024-05-15 23:45:49.000000000 +0200
+++ chromium-125.0.6422.60/base/functional/bind_internal.h 2024-05-17 12:33:58.736650987 +0200
@@ -1505,11 +1505,11 @@ template <int i,
typename Param>
struct ParamCanBeBound {
private:
- using UnwrappedParam = BindArgument<i>::template ForwardedAs<
+ using UnwrappedParam = typename BindArgument<i>::template ForwardedAs<
Unwrapped>::template ToParamWithType<Param>;
- using ParamStorage = BindArgument<i>::template ToParamWithType<
+ using ParamStorage = typename BindArgument<i>::template ToParamWithType<
Param>::template StoredAs<Storage>;
- using BoundStorage =
+ using BoundStorage = typename
BindArgument<i>::template BoundAs<Arg>::template StoredAs<Storage>;
template <bool v = !UnwrappedParam::kRawPtr ||
diff -up chromium-125.0.6422.60/base/functional/function_ref.h.typename chromium-125.0.6422.60/base/functional/function_ref.h
--- chromium-125.0.6422.60/base/functional/function_ref.h.typename 2024-05-15 23:45:49.000000000 +0200
+++ chromium-125.0.6422.60/base/functional/function_ref.h 2024-05-17 12:33:58.736650987 +0200
@@ -64,7 +64,7 @@ class FunctionRef;
template <typename R, typename... Args>
class FunctionRef<R(Args...)> {
template <typename Functor,
- typename RunType = internal::FunctorTraits<Functor>::RunType>
+ typename RunType = typename internal::FunctorTraits<Functor>::RunType>
static constexpr bool kCompatibleFunctor =
std::convertible_to<internal::ExtractReturnType<RunType>, R> &&
std::same_as<internal::ExtractArgs<RunType>, internal::TypeList<Args...>>;
diff -up chromium-125.0.6422.60/base/types/fixed_array.h.typename chromium-125.0.6422.60/base/types/fixed_array.h
--- chromium-125.0.6422.60/base/types/fixed_array.h.typename 2024-05-15 23:45:50.000000000 +0200
+++ chromium-125.0.6422.60/base/types/fixed_array.h 2024-05-17 12:33:58.737651008 +0200
@@ -27,8 +27,8 @@ template <typename T,
class FixedArray : public absl::FixedArray<T, N, A> {
public:
using absl::FixedArray<T, N, A>::FixedArray;
- explicit FixedArray(absl::FixedArray<T, N, A>::size_type n,
- const absl::FixedArray<T, N, A>::allocator_type& a =
+ explicit FixedArray(typename absl::FixedArray<T, N, A>::size_type n,
+ const typename absl::FixedArray<T, N, A>::allocator_type& a =
typename absl::FixedArray<T, N, A>::allocator_type())
: FixedArray(n, T(), a) {}
};
diff -up chromium-125.0.6422.60/chrome/browser/download/bubble/download_bubble_update_service.cc.typename chromium-125.0.6422.60/chrome/browser/download/bubble/download_bubble_update_service.cc
--- chromium-125.0.6422.60/chrome/browser/download/bubble/download_bubble_update_service.cc.typename 2024-05-15 23:46:00.000000000 +0200
+++ chromium-125.0.6422.60/chrome/browser/download/bubble/download_bubble_update_service.cc 2024-05-17 12:33:58.737651008 +0200
@@ -94,7 +94,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>::const_iterator GetLastIter(const SortedItems<Item>& cache) {
+typename SortedItems<Item>::const_iterator GetLastIter(const SortedItems<Item>& cache) {
CHECK(!cache.empty());
auto it = cache.end();
return std::prev(it);
@@ -1173,9 +1173,9 @@ bool DownloadBubbleUpdateService::CacheM
}
template <typename Id, typename Item>
-SortedItems<Item>::iterator
+typename SortedItems<Item>::iterator
DownloadBubbleUpdateService::CacheManager::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-125.0.6422.60/chrome/browser/web_applications/commands/internal/command_internal.h.typename chromium-125.0.6422.60/chrome/browser/web_applications/commands/internal/command_internal.h
--- chromium-125.0.6422.60/chrome/browser/web_applications/commands/internal/command_internal.h.typename 2024-05-15 23:46:06.000000000 +0200
+++ chromium-125.0.6422.60/chrome/browser/web_applications/commands/internal/command_internal.h 2024-05-17 12:33:58.737651008 +0200
@@ -121,7 +121,7 @@ class CommandBase {
template <typename LockType>
class CommandWithLock : public CommandBase {
public:
- using LockDescription = LockType::LockDescription;
+ using LockDescription = typename LockType::LockDescription;
explicit CommandWithLock(const std::string& name,
LockDescription initial_lock_request);
diff -up chromium-125.0.6422.60/chrome/browser/web_applications/commands/web_app_command.h.typename chromium-125.0.6422.60/chrome/browser/web_applications/commands/web_app_command.h
--- chromium-125.0.6422.60/chrome/browser/web_applications/commands/web_app_command.h.typename 2024-05-15 23:46:06.000000000 +0200
+++ chromium-125.0.6422.60/chrome/browser/web_applications/commands/web_app_command.h 2024-05-17 12:33:58.738651028 +0200
@@ -106,7 +106,7 @@ class WebAppLockManager;
template <typename LockType, typename... CallbackArgs>
class WebAppCommand : public internal::CommandWithLock<LockType> {
public:
- using LockDescription = LockType::LockDescription;
+ using LockDescription = typename LockType::LockDescription;
using CallbackType = base::OnceCallback<void(CallbackArgs...)>;
using ShutdownArgumentsTuple = std::tuple<std::decay_t<CallbackArgs>...>;
diff -up chromium-125.0.6422.60/chrome/browser/web_applications/web_app_command_scheduler.h.typename chromium-125.0.6422.60/chrome/browser/web_applications/web_app_command_scheduler.h
--- chromium-125.0.6422.60/chrome/browser/web_applications/web_app_command_scheduler.h.typename 2024-05-15 23:46:06.000000000 +0200
+++ chromium-125.0.6422.60/chrome/browser/web_applications/web_app_command_scheduler.h 2024-05-17 12:33:58.738651028 +0200
@@ -373,7 +373,7 @@ class WebAppCommandScheduler {
// command system.
template <typename LockType>
void ScheduleCallback(const std::string& operation_name,
- LockType::LockDescription lock_description,
+ typename LockType::LockDescription lock_description,
CallbackCommand<LockType, void> callback,
base::OnceClosure on_complete,
const base::Location& location = FROM_HERE) {
@@ -391,7 +391,7 @@ class WebAppCommandScheduler {
typename CallbackReturnValue = std::decay_t<CompletionCallbackArg>>
void ScheduleCallbackWithResult(
const std::string& operation_name,
- LockType::LockDescription lock_description,
+ typename LockType::LockDescription lock_description,
CallbackCommand<LockType, CallbackReturnValue> callback,
base::OnceCallback<void(CompletionCallbackArg)> on_complete,
CallbackReturnValue arg_for_shutdown,
diff -up chromium-125.0.6422.60/components/optimization_guide/core/model_execution/model_execution_util.h.typename chromium-125.0.6422.60/components/optimization_guide/core/model_execution/model_execution_util.h
--- chromium-125.0.6422.60/components/optimization_guide/core/model_execution/model_execution_util.h.typename 2024-05-15 23:46:13.000000000 +0200
+++ chromium-125.0.6422.60/components/optimization_guide/core/model_execution/model_execution_util.h 2024-05-17 12:33:58.738651028 +0200
@@ -26,7 +26,7 @@ void SetExecutionRequestTemplate(
// Request is set by the feature and should always be typed.
auto typed_request =
- static_cast<const FeatureType::Request&>(request_metadata);
+ static_cast<const typename FeatureType::Request&>(request_metadata);
*(logging_data->mutable_request_data()) = typed_request;
}
diff -up chromium-125.0.6422.60/components/optimization_guide/core/model_quality/model_quality_log_entry.h.typename chromium-125.0.6422.60/components/optimization_guide/core/model_quality/model_quality_log_entry.h
--- chromium-125.0.6422.60/components/optimization_guide/core/model_quality/model_quality_log_entry.h.typename 2024-05-15 23:46:13.000000000 +0200
+++ chromium-125.0.6422.60/components/optimization_guide/core/model_quality/model_quality_log_entry.h 2024-05-17 12:33:58.738651028 +0200
@@ -33,7 +33,7 @@ class ModelQualityLogEntry {
}
template <typename FeatureType>
- FeatureType::Quality* quality_data() {
+ typename FeatureType::Quality* quality_data() {
return FeatureType::GetLoggingData(*log_ai_data_request_)
->mutable_quality_data();
}
diff -up chromium-125.0.6422.60/components/optimization_guide/core/model_quality/model_quality_util.h.typename chromium-125.0.6422.60/components/optimization_guide/core/model_quality/model_quality_util.h
--- chromium-125.0.6422.60/components/optimization_guide/core/model_quality/model_quality_util.h.typename 2024-05-15 23:46:13.000000000 +0200
+++ chromium-125.0.6422.60/components/optimization_guide/core/model_quality/model_quality_util.h 2024-05-17 12:33:58.739651049 +0200
@@ -20,7 +20,7 @@ std::optional<UserVisibleFeatureKey> Get
// Helper method to get the quality_data from `log_ai_data_request` for
// different features.
template <typename FeatureType>
-FeatureType::Quality* GetModelQualityData(
+typename FeatureType::Quality* GetModelQualityData(
proto::LogAiDataRequest* log_ai_data_request) {
return FeatureType::GetLoggingData(*log_ai_data_request)
->mutable_quality_data();
diff -up chromium-125.0.6422.60/components/optimization_guide/core/tflite_model_executor.h.typename chromium-125.0.6422.60/components/optimization_guide/core/tflite_model_executor.h
--- chromium-125.0.6422.60/components/optimization_guide/core/tflite_model_executor.h.typename 2024-05-15 23:46:13.000000000 +0200
+++ chromium-125.0.6422.60/components/optimization_guide/core/tflite_model_executor.h 2024-05-17 12:33:58.739651049 +0200
@@ -242,7 +242,7 @@ class TFLiteModelExecutor : public Model
void SendForBatchExecution(
BatchExecutionCallback callback_on_complete,
base::TimeTicks start_time,
- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
+ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
override {
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
@@ -264,7 +264,7 @@ class TFLiteModelExecutor : public Model
// Starts the synchronous execution of the model. Returns model outputs.
// Model needs to be loaded. Synchronous calls do not load or unload model.
std::vector<std::optional<OutputType>> SendForBatchExecutionSync(
- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
+ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs)
override {
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
@@ -422,7 +422,7 @@ class TFLiteModelExecutor : public Model
// executes it on the model execution thread.
void LoadModelFileAndBatchExecute(
BatchExecutionCallback callback_on_complete,
- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) {
+ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs) {
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
@@ -439,7 +439,7 @@ class TFLiteModelExecutor : public Model
// Batch executes the loaded model for inputs.
void BatchExecuteLoadedModel(
- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
+ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
std::vector<std::optional<OutputType>>* outputs) {
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
@@ -499,7 +499,7 @@ class TFLiteModelExecutor : public Model
// Unloads the model if needed.
void BatchExecuteLoadedModelAndRunCallback(
BatchExecutionCallback callback_on_complete,
- ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
+ typename ModelExecutor<OutputType, InputType>::ConstRefInputVector inputs,
ExecutionStatus execution_status) {
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
diff -up chromium-125.0.6422.60/components/supervised_user/core/browser/proto_fetcher.h.typename chromium-125.0.6422.60/components/supervised_user/core/browser/proto_fetcher.h
--- chromium-125.0.6422.60/components/supervised_user/core/browser/proto_fetcher.h.typename 2024-05-15 23:46:15.000000000 +0200
+++ chromium-125.0.6422.60/components/supervised_user/core/browser/proto_fetcher.h 2024-05-17 12:33:58.739651049 +0200
@@ -458,7 +458,7 @@ class RetryingFetcherImpl final : public
RetryingFetcherImpl(const RetryingFetcherImpl&) = delete;
RetryingFetcherImpl& operator=(const RetryingFetcherImpl&) = delete;
- void Start(ProtoFetcher<Response>::Callback callback) override {
+ void Start(typename ProtoFetcher<Response>::Callback callback) override {
callback_ = std::move(callback);
Retry();
}
@@ -504,7 +504,7 @@ class RetryingFetcherImpl final : public
}
// Client callback.
- TypedProtoFetcher<Response>::Callback callback_;
+ typename TypedProtoFetcher<Response>::Callback callback_;
// Retry controls.
base::OneShotTimer timer_;
@@ -525,7 +525,7 @@ class ParallelFetchManager {
// Deferred fetcher is required because it should be started after it is
// stored internally.
using Fetcher = ProtoFetcher<Response>;
- using KeyType = base::IDMap<std::unique_ptr<Fetcher>>::KeyType;
+ using KeyType = typename base::IDMap<std::unique_ptr<Fetcher>>::KeyType;
public:
// Provides fresh instances of a deferred fetcher for each fetch.
@@ -541,7 +541,7 @@ class ParallelFetchManager {
// Starts the fetch. Underlying fetcher is stored internally, and will be
// cleaned up after finish or when this manager is destroyed.
- void Fetch(const Request& request, Fetcher::Callback callback) {
+ void Fetch(const Request& request, typename Fetcher::Callback callback) {
CHECK(callback) << "Use base::DoNothing() instead of empty callback.";
KeyType key = requests_in_flight_.Add(MakeFetcher(request));
requests_in_flight_.Lookup(key)->Start(
diff -up chromium-125.0.6422.60/mojo/public/cpp/bindings/array_traits.h.typename chromium-125.0.6422.60/mojo/public/cpp/bindings/array_traits.h
--- chromium-125.0.6422.60/mojo/public/cpp/bindings/array_traits.h.typename 2024-05-15 23:46:29.000000000 +0200
+++ chromium-125.0.6422.60/mojo/public/cpp/bindings/array_traits.h 2024-05-17 12:33:58.739651049 +0200
@@ -90,7 +90,7 @@ template <typename Container>
{ c[i] } -> std::same_as<typename Container::reference>;
}
struct ArrayTraits<Container> {
- using Element = Container::value_type;
+ using Element = typename Container::value_type;
// vector-like containers have no built-in null.
static bool IsNull(const Container& c) { return false; }
diff -up chromium-125.0.6422.60/mojo/public/cpp/bindings/type_converter.h.typename chromium-125.0.6422.60/mojo/public/cpp/bindings/type_converter.h
--- chromium-125.0.6422.60/mojo/public/cpp/bindings/type_converter.h.typename 2024-05-15 23:46:30.000000000 +0200
+++ chromium-125.0.6422.60/mojo/public/cpp/bindings/type_converter.h 2024-05-17 12:33:58.740651070 +0200
@@ -127,7 +127,7 @@ using VecValueType = typename Vec::value
template <typename Vec>
using VecPtrLikeUnderlyingValueType =
- std::pointer_traits<VecValueType<Vec>>::element_type;
+ typename std::pointer_traits<VecValueType<Vec>>::element_type;
} // namespace internal
diff -up chromium-125.0.6422.60/third_party/blink/renderer/bindings/core/v8/async_iterable.h.typename chromium-125.0.6422.60/third_party/blink/renderer/bindings/core/v8/async_iterable.h
--- chromium-125.0.6422.60/third_party/blink/renderer/bindings/core/v8/async_iterable.h.typename 2024-05-15 23:46:40.000000000 +0200
+++ chromium-125.0.6422.60/third_party/blink/renderer/bindings/core/v8/async_iterable.h 2024-05-17 12:33:58.740651070 +0200
@@ -245,7 +245,7 @@ class PairAsyncIterable {
private:
virtual IterationSource* CreateIterationSource(
ScriptState* script_state,
- IterationSource::Kind kind,
+ typename IterationSource::Kind kind,
InitArgs... args,
ExceptionState& exception_state) = 0;
};
@@ -291,7 +291,7 @@ class ValueAsyncIterable {
private:
virtual IterationSource* CreateIterationSource(
ScriptState* script_state,
- IterationSource::Kind kind,
+ typename IterationSource::Kind kind,
InitArgs... args,
ExceptionState& exception_state) = 0;
};
diff -up chromium-125.0.6422.60/third_party/blink/renderer/bindings/core/v8/script_promise_property.h.typename chromium-125.0.6422.60/third_party/blink/renderer/bindings/core/v8/script_promise_property.h
--- chromium-125.0.6422.60/third_party/blink/renderer/bindings/core/v8/script_promise_property.h.typename 2024-05-15 23:46:40.000000000 +0200
+++ chromium-125.0.6422.60/third_party/blink/renderer/bindings/core/v8/script_promise_property.h 2024-05-17 12:33:58.740651070 +0200
@@ -171,7 +171,7 @@ class ScriptPromiseProperty final
template <typename T>
requires std::derived_from<T, bindings::EnumerationBase>
static T DefaultPromiseResultValue() {
- return T(static_cast<T::Enum>(0));
+ return T(static_cast<typename T::Enum>(0));
}
State state_ = kPending;
diff -up chromium-125.0.6422.60/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.typename chromium-125.0.6422.60/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc
--- chromium-125.0.6422.60/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.typename 2024-05-15 23:46:41.000000000 +0200
+++ chromium-125.0.6422.60/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc 2024-05-17 12:33:58.741651090 +0200
@@ -210,7 +210,7 @@ class HTMLFastPathParser {
using Span = base::span<const Char>;
using USpan = base::span<const UChar>;
// 32 matches that used by HTMLToken::Attribute.
- typedef std::conditional<std::is_same_v<Char, UChar>,
+ typedef typename std::conditional<std::is_same_v<Char, UChar>,
UCharLiteralBuffer<32>,
LCharLiteralBuffer<32>>::type LiteralBufferType;
static_assert(std::is_same_v<Char, UChar> || std::is_same_v<Char, LChar>);
diff -up chromium-125.0.6422.60/third_party/blink/renderer/core/paint/object_paint_properties.h.typename chromium-125.0.6422.60/third_party/blink/renderer/core/paint/object_paint_properties.h
--- chromium-125.0.6422.60/third_party/blink/renderer/core/paint/object_paint_properties.h.typename 2024-05-15 23:46:41.000000000 +0200
+++ chromium-125.0.6422.60/third_party/blink/renderer/core/paint/object_paint_properties.h 2024-05-17 12:33:58.741651090 +0200
@@ -445,8 +445,8 @@ class CORE_EXPORT ObjectPaintProperties
PaintPropertyChangeType Update(
NodeId node_id,
const ParentType& parent,
- NodeType::State&& state,
- const NodeType::AnimationState& animation_state =
+ typename NodeType::State&& state,
+ const typename NodeType::AnimationState& animation_state =
NodeType::AnimationState()) {
// First, check if we need to add a new node.
if (!nodes_.HasField(node_id)) {
diff -up chromium-125.0.6422.60/third_party/blink/renderer/platform/wtf/hash_table.h.typename chromium-125.0.6422.60/third_party/blink/renderer/platform/wtf/hash_table.h
--- chromium-125.0.6422.60/third_party/blink/renderer/platform/wtf/hash_table.h.typename 2024-05-15 23:46:43.000000000 +0200
+++ chromium-125.0.6422.60/third_party/blink/renderer/platform/wtf/hash_table.h 2024-05-17 12:33:58.742651111 +0200
@@ -2013,7 +2013,7 @@ struct HashTableConstIteratorAdapter {
static_assert(!IsTraceable<typename Traits::TraitType>::value);
using iterator_category = std::bidirectional_iterator_tag;
- using value_type = HashTableType::ValueType;
+ using value_type = typename HashTableType::ValueType;
using difference_type = ptrdiff_t;
using pointer = value_type*;
using reference = value_type&;
@@ -2065,7 +2065,7 @@ struct HashTableConstIteratorAdapter<
public:
using iterator_category = std::bidirectional_iterator_tag;
- using value_type = HashTableType::ValueType;
+ using value_type = typename HashTableType::ValueType;
using difference_type = ptrdiff_t;
using pointer = value_type*;
using reference = value_type&;
@@ -2119,7 +2119,7 @@ struct HashTableIteratorAdapter {
static_assert(!IsTraceable<typename Traits::TraitType>::value);
using iterator_category = std::bidirectional_iterator_tag;
- using value_type = HashTableType::ValueType;
+ using value_type = typename HashTableType::ValueType;
using difference_type = ptrdiff_t;
using pointer = value_type*;
using reference = value_type&;
@@ -2167,7 +2167,7 @@ struct HashTableIteratorAdapter<
public:
using iterator_category = std::bidirectional_iterator_tag;
- using value_type = HashTableType::ValueType;
+ using value_type = typename HashTableType::ValueType;
using difference_type = ptrdiff_t;
using pointer = value_type*;
using reference = value_type&;

View file

@ -1,105 +0,0 @@
commit 62274859104bd828373ae406aa9309e610449ac5
Author: Ted Meyer <tmathmeyer@chromium.org>
Date: Fri Mar 22 19:56:55 2024 +0000
Replace deprecated use of AVCodecContext::reordered_opaque
We can use the AV_CODEC_FLAG_COPY_OPAQUE flag on the codec context
now to trigger timestamp propagation.
Bug: 330573128
Change-Id: I6bc57241a35ab5283742aad8d42acb4dc5e85858
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5384308
Commit-Queue: Ted (Chromium) Meyer <tmathmeyer@chromium.org>
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1277051}
diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
index bd75477feeabb..8a658a58caac5 100644
--- a/media/filters/ffmpeg_video_decoder.cc
+++ b/media/filters/ffmpeg_video_decoder.cc
@@ -134,7 +134,7 @@ bool FFmpegVideoDecoder::IsCodecSupported(VideoCodec codec) {
}
FFmpegVideoDecoder::FFmpegVideoDecoder(MediaLog* media_log)
- : media_log_(media_log) {
+ : media_log_(media_log), timestamp_map_(128) {
DVLOG(1) << __func__;
DETACH_FROM_SEQUENCE(sequence_checker_);
}
@@ -363,8 +363,10 @@ bool FFmpegVideoDecoder::FFmpegDecode(const DecoderBuffer& buffer) {
DCHECK(packet->data);
DCHECK_GT(packet->size, 0);
- // Let FFmpeg handle presentation timestamp reordering.
- codec_context_->reordered_opaque = buffer.timestamp().InMicroseconds();
+ const int64_t timestamp = buffer.timestamp().InMicroseconds();
+ const TimestampId timestamp_id = timestamp_id_generator_.GenerateNextId();
+ timestamp_map_.Put(std::make_pair(timestamp_id, timestamp));
+ packet->opaque = reinterpret_cast<void*>(timestamp_id.GetUnsafeValue());
}
FFmpegDecodingLoop::DecodeStatus decode_status = decoding_loop_->DecodePacket(
packet, base::BindRepeating(&FFmpegVideoDecoder::OnNewFrame,
@@ -423,7 +425,12 @@ bool FFmpegVideoDecoder::OnNewFrame(AVFrame* frame) {
}
gfx::Size natural_size = aspect_ratio.GetNaturalSize(visible_rect);
- const auto pts = base::Microseconds(frame->reordered_opaque);
+ const auto ts_id = TimestampId(reinterpret_cast<size_t>(frame->opaque));
+ const auto ts_lookup = timestamp_map_.Get(ts_id);
+ if (ts_lookup == timestamp_map_.end()) {
+ return false;
+ }
+ const auto pts = base::Microseconds(std::get<1>(*ts_lookup));
auto video_frame = VideoFrame::WrapExternalDataWithLayout(
opaque->layout, visible_rect, natural_size, opaque->data, opaque->size,
pts);
@@ -498,8 +505,10 @@ bool FFmpegVideoDecoder::ConfigureDecoder(const VideoDecoderConfig& config,
codec_context_->thread_count = GetFFmpegVideoDecoderThreadCount(config);
codec_context_->thread_type =
FF_THREAD_SLICE | (low_delay ? 0 : FF_THREAD_FRAME);
+
codec_context_->opaque = this;
codec_context_->get_buffer2 = GetVideoBufferImpl;
+ codec_context_->flags |= AV_CODEC_FLAG_COPY_OPAQUE;
if (base::FeatureList::IsEnabled(kFFmpegAllowLists)) {
// Note: FFmpeg will try to free this string, so we must duplicate it.
diff --git a/media/filters/ffmpeg_video_decoder.h b/media/filters/ffmpeg_video_decoder.h
index d02cb89c3ddf7..0a2de1c623fff 100644
--- a/media/filters/ffmpeg_video_decoder.h
+++ b/media/filters/ffmpeg_video_decoder.h
@@ -7,10 +7,12 @@
#include <memory>
+#include "base/containers/lru_cache.h"
#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/sequence_checker.h"
+#include "base/types/id_type.h"
#include "media/base/frame_buffer_pool.h"
#include "media/base/supported_video_decoder_config.h"
#include "media/base/video_decoder.h"
@@ -87,6 +89,20 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder {
// FFmpeg structures owned by this object.
std::unique_ptr<AVCodecContext, ScopedPtrAVFreeContext> codec_context_;
+ // The gist here is that timestamps need to be 64 bits to store microsecond
+ // precision. A 32 bit integer would overflow at ~35 minutes at this level of
+ // precision. We can't cast the timestamp to the void ptr object used by the
+ // opaque field in ffmpeg then, because it would lose data on a 32 bit build.
+ // However, we don't actually have 2^31 timestamped frames in a single
+ // playback, so it's fine to use the 32 bit value as a key in a map which
+ // contains the actual timestamps. Additionally, we've in the past set 128
+ // outstanding frames for re-ordering as a limit for cross-thread decoding
+ // tasks, so we'll do that here too with the LRU cache.
+ using TimestampId = base::IdType<int64_t, size_t, 0>;
+
+ TimestampId::Generator timestamp_id_generator_;
+ base::LRUCache<TimestampId, int64_t> timestamp_map_;
+
VideoDecoderConfig config_;
scoped_refptr<FrameBufferPool> frame_pool_;

View file

@ -1,38 +0,0 @@
diff -up chromium-125.0.6422.41/net/filter/brotli_source_stream.cc.system-brotli chromium-125.0.6422.41/net/filter/brotli_source_stream.cc
--- chromium-125.0.6422.41/net/filter/brotli_source_stream.cc.system-brotli 2024-05-08 22:30:00.000000000 +0200
+++ chromium-125.0.6422.41/net/filter/brotli_source_stream.cc 2024-05-12 20:23:30.859178769 +0200
@@ -11,8 +11,8 @@
#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 "third_party/brotli/include/brotli/shared_dictionary.h"
+#include <brotli/decode.h>
+#include <brotli/shared_dictionary.h>
namespace net {
diff -up chromium-125.0.6422.41/net/ssl/cert_compression.cc.system-brotli chromium-125.0.6422.41/net/ssl/cert_compression.cc
--- chromium-125.0.6422.41/net/ssl/cert_compression.cc.system-brotli 2024-05-08 22:30:00.000000000 +0200
+++ chromium-125.0.6422.41/net/ssl/cert_compression.cc 2024-05-12 20:23:30.860178793 +0200
@@ -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-125.0.6422.41/ui/base/resource/resource_bundle.cc.system-brotli chromium-125.0.6422.41/ui/base/resource/resource_bundle.cc
--- chromium-125.0.6422.41/ui/base/resource/resource_bundle.cc.system-brotli 2024-05-12 20:23:30.861178816 +0200
+++ chromium-125.0.6422.41/ui/base/resource/resource_bundle.cc 2024-05-12 21:19:03.775332093 +0200
@@ -33,7 +33,7 @@
#include "net/filter/gzip_header.h"
#include "skia/ext/image_operations.h"
#include "third_party/abseil-cpp/absl/types/variant.h"
-#include "third_party/brotli/include/brotli/decode.h"
+#include "brotli/decode.h"
#include "third_party/skia/include/codec/SkPngDecoder.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkColor.h"

View file

@ -1,22 +0,0 @@
diff -up chromium-126.0.6478.26/build/config/compiler/BUILD.gn.clang16-buildflag chromium-126.0.6478.26/build/config/compiler/BUILD.gn
--- chromium-126.0.6478.26/build/config/compiler/BUILD.gn.clang16-buildflag 2024-06-02 14:55:55.298242780 +0200
+++ chromium-126.0.6478.26/build/config/compiler/BUILD.gn 2024-06-02 15:04:43.839882669 +0200
@@ -1889,9 +1889,6 @@ config("default_warnings") {
# TODO(crbug.com/40286317): Evaluate and possibly enable.
"-Wno-vla-extension",
-
- # TODO(crbug.com/40284799): Fix and re-enable.
- "-Wno-thread-safety-reference-return",
]
cflags_cc += [
@@ -1902,7 +1899,7 @@ config("default_warnings") {
if (!is_nacl) {
cflags_cc += [
# TODO(crbug.com/41486292): Fix and re-enable.
- "-Wno-c++11-narrowing-const-reference",
+ "-Wno-c++11-narrowing",
]
}
}

View file

@ -1,12 +0,0 @@
diff -up chromium-126.0.6478.26/build/config/compiler/BUILD.gn.clang16-disable-auto-upgrade-debug-info chromium-126.0.6478.26/build/config/compiler/BUILD.gn
--- chromium-126.0.6478.26/build/config/compiler/BUILD.gn.clang16-disable-auto-upgrade-debug-info 2024-06-02 18:00:17.914641767 +0200
+++ chromium-126.0.6478.26/build/config/compiler/BUILD.gn 2024-06-02 18:02:32.153544892 +0200
@@ -780,7 +780,7 @@ config("compiler") {
# We only use one version of LLVM within a build so there's no need to
# upgrade debug info, which can be expensive since it runs the verifier.
- ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ]
+ ldflags += [ "" ]
}
# TODO(crbug.com/335365324): Enable on other platforms.

View file

@ -1,681 +0,0 @@
diff -up chromium-126.0.6478.26/ash/style/ash_color_mixer_unittest.cc.mee chromium-126.0.6478.26/ash/style/ash_color_mixer_unittest.cc
--- chromium-126.0.6478.26/ash/style/ash_color_mixer_unittest.cc.mee 2024-05-29 18:00:44.000000000 +0200
+++ chromium-126.0.6478.26/ash/style/ash_color_mixer_unittest.cc 2024-06-03 16:22:10.549568854 +0200
@@ -37,6 +37,9 @@ void InitializeColorProvider(const ui::C
// Roughly mimics the ColorMixer configuration for Ash.
ash::AddCrosStylesColorMixer(&color_provider, key);
ash::AddAshColorMixer(&color_provider, key);
+
+ // Populates the color map with computed color values.
+ color_provider.GenerateColorMap();
}
// Initializes the `color_provider` with `seed_color` and the relevant
diff -up chromium-126.0.6478.26/chrome/browser/chrome_content_browser_client_browsertest.cc.mee chromium-126.0.6478.26/chrome/browser/chrome_content_browser_client_browsertest.cc
--- chromium-126.0.6478.26/chrome/browser/chrome_content_browser_client_browsertest.cc.mee 2024-05-29 18:00:52.000000000 +0200
+++ chromium-126.0.6478.26/chrome/browser/chrome_content_browser_client_browsertest.cc 2024-06-03 16:22:10.550568873 +0200
@@ -602,6 +602,7 @@ class PrefersColorSchemeTest
explicit MockColorProviderSource(bool is_dark) {
key_.color_mode = is_dark ? ui::ColorProviderKey::ColorMode::kDark
: ui::ColorProviderKey::ColorMode::kLight;
+ provider_.GenerateColorMap();
}
MockColorProviderSource(const MockColorProviderSource&) = delete;
MockColorProviderSource& operator=(const MockColorProviderSource&) = delete;
diff -up chromium-126.0.6478.26/chrome/browser/themes/browser_theme_pack_unittest.cc.mee chromium-126.0.6478.26/chrome/browser/themes/browser_theme_pack_unittest.cc
--- chromium-126.0.6478.26/chrome/browser/themes/browser_theme_pack_unittest.cc.mee 2024-05-29 18:00:57.000000000 +0200
+++ chromium-126.0.6478.26/chrome/browser/themes/browser_theme_pack_unittest.cc 2024-06-03 16:22:10.550568873 +0200
@@ -750,6 +750,7 @@ TEST_F(BrowserThemePackTest, TestCreateC
"omnibox_background": [120, 140, 160] })";
LoadColorJSON(color_json);
theme_pack().AddColorMixers(&provider, ui::ColorProviderKey());
+ provider.GenerateColorMap();
EXPECT_EQ(SkColorSetRGB(0, 20, 40), provider.GetColor(kColorToolbar));
EXPECT_EQ(SkColorSetRGB(60, 80, 100), provider.GetColor(kColorOmniboxText));
EXPECT_EQ(SkColorSetRGB(120, 140, 160),
diff -up chromium-126.0.6478.26/chrome/browser/ui/color/material_new_tab_page_color_mixer_unittest.cc.mee chromium-126.0.6478.26/chrome/browser/ui/color/material_new_tab_page_color_mixer_unittest.cc
--- chromium-126.0.6478.26/chrome/browser/ui/color/material_new_tab_page_color_mixer_unittest.cc.mee 2024-05-29 18:00:58.000000000 +0200
+++ chromium-126.0.6478.26/chrome/browser/ui/color/material_new_tab_page_color_mixer_unittest.cc 2024-06-03 16:22:10.551568891 +0200
@@ -26,6 +26,7 @@ class MaterialNewTabPageColorMixerTest :
void AddMaterialColorMixers() {
AddColorMixers(&color_provider_, color_provider_key_);
AddChromeColorMixers(&color_provider_, color_provider_key_);
+ color_provider_.GenerateColorMap();
}
private:
diff -up chromium-126.0.6478.26/chrome/browser/ui/color/new_tab_page_color_mixer_unittest.cc.mee chromium-126.0.6478.26/chrome/browser/ui/color/new_tab_page_color_mixer_unittest.cc
--- chromium-126.0.6478.26/chrome/browser/ui/color/new_tab_page_color_mixer_unittest.cc.mee 2024-05-29 18:00:58.000000000 +0200
+++ chromium-126.0.6478.26/chrome/browser/ui/color/new_tab_page_color_mixer_unittest.cc 2024-06-03 16:22:10.551568891 +0200
@@ -33,6 +33,7 @@ TEST(NewTabPageColorMixer, LightAndDarkT
if (color_utils::IsDark(toolbar_color))
key.color_mode = ui::ColorProviderKey::ColorMode::kDark;
AddNewTabPageColorMixer(&provider, key);
+ provider.GenerateColorMap();
EXPECT_EQ(provider.GetColor(kColorToolbar), toolbar_color);
EXPECT_EQ(provider.GetColor(kColorNewTabPageBackground), toolbar_color);
@@ -51,6 +52,7 @@ TEST(NewTabPageColorMixer, CustomColorCo
key.custom_theme =
base::WrapRefCounted(new CustomThemeSupplier(ThemeType::kAutogenerated));
AddNewTabPageColorMixer(&provider, key);
+ provider.GenerateColorMap();
EXPECT_EQ(provider.GetColor(kColorToolbar), gfx::kGoogleGreen300);
EXPECT_EQ(provider.GetColor(kColorNewTabPageBackground),
@@ -72,6 +74,7 @@ TEST(NewTabPageColorMixer, DefaultColorC
key.custom_theme =
base::WrapRefCounted(new CustomThemeSupplier(ThemeType::kAutogenerated));
AddNewTabPageColorMixer(&provider, key);
+ provider.GenerateColorMap();
EXPECT_EQ(provider.GetColor(kColorToolbar), kSampleToolbarColor);
EXPECT_EQ(provider.GetColor(kColorNewTabPageBackground), kSampleToolbarColor);
diff -up chromium-126.0.6478.26/chrome/browser/ui/color/tools/dump_colors.cc.mee chromium-126.0.6478.26/chrome/browser/ui/color/tools/dump_colors.cc
--- chromium-126.0.6478.26/chrome/browser/ui/color/tools/dump_colors.cc.mee 2024-05-29 18:00:58.000000000 +0200
+++ chromium-126.0.6478.26/chrome/browser/ui/color/tools/dump_colors.cc 2024-06-03 16:22:10.551568891 +0200
@@ -56,6 +56,7 @@ int main(int argc, const char* argv[]) {
ui::AddColorMixers(provider, key);
color::AddComponentsColorMixers(provider, key);
AddChromeColorMixers(provider, key);
+ provider->GenerateColorMap();
};
ui::ColorProvider light_provider, dark_provider, light_high_contrast_provider,
dark_high_contrast_provider;
diff -up chromium-126.0.6478.26/chrome/browser/ui/webui/new_tab_page/new_tab_page_handler_unittest.cc.mee chromium-126.0.6478.26/chrome/browser/ui/webui/new_tab_page/new_tab_page_handler_unittest.cc
--- chromium-126.0.6478.26/chrome/browser/ui/webui/new_tab_page/new_tab_page_handler_unittest.cc.mee 2024-05-29 18:00:59.000000000 +0200
+++ chromium-126.0.6478.26/chrome/browser/ui/webui/new_tab_page/new_tab_page_handler_unittest.cc 2024-06-03 16:22:10.552568911 +0200
@@ -117,7 +117,7 @@ class MockLogoService : public search_pr
class MockColorProviderSource : public ui::ColorProviderSource {
public:
- MockColorProviderSource() = default;
+ MockColorProviderSource() { color_provider_.GenerateColorMap(); }
MockColorProviderSource(const MockColorProviderSource&) = delete;
MockColorProviderSource& operator=(const MockColorProviderSource&) = delete;
~MockColorProviderSource() override = default;
diff -up chromium-126.0.6478.26/content/browser/web_contents/web_contents_impl_browsertest.cc.mee chromium-126.0.6478.26/content/browser/web_contents/web_contents_impl_browsertest.cc
--- chromium-126.0.6478.26/content/browser/web_contents/web_contents_impl_browsertest.cc.mee 2024-05-29 18:01:13.000000000 +0200
+++ chromium-126.0.6478.26/content/browser/web_contents/web_contents_impl_browsertest.cc 2024-06-03 16:22:10.553568929 +0200
@@ -6300,7 +6300,7 @@ IN_PROC_BROWSER_TEST_F(WebContentsImplSt
class MockColorProviderSource : public ui::ColorProviderSource {
public:
- MockColorProviderSource() = default;
+ MockColorProviderSource() { provider_.GenerateColorMap(); }
MockColorProviderSource(const MockColorProviderSource&) = delete;
MockColorProviderSource& operator=(const MockColorProviderSource&) = delete;
~MockColorProviderSource() override = default;
diff -up chromium-126.0.6478.26/content/browser/web_contents/web_contents_impl_unittest.cc.mee chromium-126.0.6478.26/content/browser/web_contents/web_contents_impl_unittest.cc
--- chromium-126.0.6478.26/content/browser/web_contents/web_contents_impl_unittest.cc.mee 2024-05-29 18:01:13.000000000 +0200
+++ chromium-126.0.6478.26/content/browser/web_contents/web_contents_impl_unittest.cc 2024-06-03 16:22:10.554568949 +0200
@@ -337,7 +337,7 @@ class MockPageBroadcast : public TestPag
class TestColorProviderSource : public ui::ColorProviderSource {
public:
- TestColorProviderSource() = default;
+ TestColorProviderSource() { provider_.GenerateColorMap(); }
const ui::ColorProvider* GetColorProvider() const override {
return &provider_;
diff -up chromium-126.0.6478.26/content/public/test/render_view_test.cc.mee chromium-126.0.6478.26/content/public/test/render_view_test.cc
--- chromium-126.0.6478.26/content/public/test/render_view_test.cc.mee 2024-05-29 18:01:14.000000000 +0200
+++ chromium-126.0.6478.26/content/public/test/render_view_test.cc 2024-06-03 16:22:10.554568949 +0200
@@ -150,7 +150,7 @@ class FailingURLLoaderFactory : public n
class MockColorProviderSource : public ui::ColorProviderSource {
public:
- explicit MockColorProviderSource() = default;
+ explicit MockColorProviderSource() { provider_.GenerateColorMap(); }
MockColorProviderSource(const MockColorProviderSource&) = delete;
MockColorProviderSource& operator=(const MockColorProviderSource&) = delete;
~MockColorProviderSource() override = default;
diff -up chromium-126.0.6478.26/extensions/browser/extension_host.cc.mee chromium-126.0.6478.26/extensions/browser/extension_host.cc
--- chromium-126.0.6478.26/extensions/browser/extension_host.cc.mee 2024-05-29 18:01:22.000000000 +0200
+++ chromium-126.0.6478.26/extensions/browser/extension_host.cc 2024-06-03 16:22:10.555568967 +0200
@@ -58,7 +58,7 @@ namespace {
// the UI-less extension background page.
class NoOpColorProviderSource : public ui::ColorProviderSource {
public:
- NoOpColorProviderSource() = default;
+ NoOpColorProviderSource() { color_provider_.GenerateColorMap(); }
NoOpColorProviderSource(const NoOpColorProviderSource&) = delete;
NoOpColorProviderSource& operator=(const NoOpColorProviderSource&) = delete;
~NoOpColorProviderSource() override = default;
diff -up chromium-126.0.6478.26/third_party/blink/renderer/core/layout/layout_theme.cc.mee chromium-126.0.6478.26/third_party/blink/renderer/core/layout/layout_theme.cc
--- chromium-126.0.6478.26/third_party/blink/renderer/core/layout/layout_theme.cc.mee 2024-05-29 18:01:39.000000000 +0200
+++ chromium-126.0.6478.26/third_party/blink/renderer/core/layout/layout_theme.cc 2024-06-03 16:22:10.555568967 +0200
@@ -677,7 +677,7 @@ Color LayoutTheme::SystemColorFromColorP
CSSValueID css_value_id,
mojom::blink::ColorScheme color_scheme,
const ui::ColorProvider* color_provider) const {
- CHECK(color_provider->HasMixers());
+ CHECK(!color_provider->IsColorMapEmpty());
SkColor system_theme_color;
switch (css_value_id) {
case CSSValueID::kActivetext:
diff -up chromium-126.0.6478.26/ui/base/models/image_model_unittest.cc.mee chromium-126.0.6478.26/ui/base/models/image_model_unittest.cc
--- chromium-126.0.6478.26/ui/base/models/image_model_unittest.cc.mee 2024-05-29 18:02:31.000000000 +0200
+++ chromium-126.0.6478.26/ui/base/models/image_model_unittest.cc 2024-06-03 16:22:10.555568967 +0200
@@ -224,6 +224,7 @@ TEST(ImageModelTest, ShouldRasterizeEmpt
TEST(ImageModelTest, ShouldRasterizeVectorIcon) {
ui::ColorProvider color_provider;
+ color_provider.GenerateColorMap();
gfx::ImageSkia image_skia =
ui::ImageModel::FromVectorIcon(vector_icons::kSyncIcon)
.Rasterize(&color_provider);
diff -up chromium-126.0.6478.26/ui/color/color_provider.cc.mee chromium-126.0.6478.26/ui/color/color_provider.cc
--- chromium-126.0.6478.26/ui/color/color_provider.cc.mee 2024-06-03 16:03:15.596432761 +0200
+++ chromium-126.0.6478.26/ui/color/color_provider.cc 2024-06-03 16:22:10.555568967 +0200
@@ -4,7 +4,6 @@
#include "ui/color/color_provider.h"
-#include <forward_list>
#include <map>
#include <set>
#include <utility>
@@ -18,106 +17,6 @@
namespace ui {
-////////////////////////////////////////////////////////////////////////////////
-// ColorProvider::ColorProviderInternal:
-
-class ColorProvider::ColorProviderInternal {
- public:
- using Mixers = std::forward_list<ColorMixer>;
-
- ColorProviderInternal() = default;
- ColorProviderInternal(const ColorProviderInternal&) = delete;
- ColorProviderInternal& operator=(const ColorProviderInternal&) = delete;
- ~ColorProviderInternal() = default;
-
- ColorMixer& AddMixer() {
- color_map_.clear();
- mixers_.emplace_after(
- first_postprocessing_mixer_,
- base::BindRepeating([](const ColorMixer* mixer) { return mixer; },
- GetLastNonPostprocessingMixer()),
- base::BindRepeating(&ColorProvider::ColorProviderInternal::
- GetLastNonPostprocessingMixer,
- base::Unretained(this)));
-
- return *std::next(first_postprocessing_mixer_, 1);
- }
-
- ColorMixer& AddPostprocessingMixer() {
- color_map_.clear();
- if (first_postprocessing_mixer_ == mixers_.before_begin()) {
- // The first postprocessing mixer points to the last regular mixer.
- auto previous_mixer_getter = base::BindRepeating(
- &ColorProvider::ColorProviderInternal::GetLastNonPostprocessingMixer,
- base::Unretained(this));
- mixers_.emplace_front(previous_mixer_getter, previous_mixer_getter);
- first_postprocessing_mixer_ = mixers_.begin();
- } else {
- // Other postprocessing mixers point to the next postprocessing mixer.
- auto previous_mixer_getter =
- base::BindRepeating([](const ColorMixer* mixer) { return mixer; },
- base::Unretained(&mixers_.front()));
- mixers_.emplace_front(previous_mixer_getter, previous_mixer_getter);
- }
- return mixers_.front();
- }
-
- SkColor GetColor(ColorId id) const {
- auto i = color_map_.find(id);
- if (i == color_map_.end()) {
- if (mixers_.empty()) {
- DVLOG(2) << "ColorProvider::GetColor: No mixers defined!";
- return gfx::kPlaceholderColor;
- }
- DVLOG(2) << "ColorProvider::GetColor: Computing color for ColorId: "
- << ColorIdName(id);
- const SkColor color = mixers_.front().GetResultColor(id);
- if (color == gfx::kPlaceholderColor) {
- return gfx::kPlaceholderColor;
- }
- i = color_map_.insert({id, color}).first;
- }
-
- DVLOG(2) << "ColorProvider::GetColor: ColorId: " << ColorIdName(id)
- << " Value: " << SkColorName(i->second);
- return i->second;
- }
-
- const ColorMixer* GetLastNonPostprocessingMixer() const {
- const auto it = std::next(first_postprocessing_mixer_, 1);
- return (it == mixers_.cend()) ? nullptr : &(*it);
- }
-
- bool HasMixers() const { return !mixers_.empty(); }
-
- void SetColorForTesting(ColorId id, SkColor color) { color_map_[id] = color; }
-
- void GenerateColorMapForTesting() {
- for (const auto& mixer : mixers_) {
- const auto mixer_color_ids = mixer.GetDefinedColorIds();
- for (const auto color_id : mixer_color_ids) {
- GetColor(color_id);
- }
- }
- }
-
- const ColorProvider::ColorMap& color_map_for_testing() { return color_map_; }
-
- private:
- // The entire color pipeline, in reverse order (that is, the "last" mixer is
- // at the front).
- Mixers mixers_;
-
- // The first mixer in the chain that is a "postprocessing" mixer.
- Mixers::iterator first_postprocessing_mixer_ = mixers_.before_begin();
-
- // A cached map of ColorId => SkColor mappings for this provider.
- mutable ColorMap color_map_;
-};
-
-////////////////////////////////////////////////////////////////////////////////
-// ColorProvider:
-
ColorProvider::ColorProvider() = default;
ColorProvider::ColorProvider(ColorProvider&&) = default;
@@ -127,31 +26,96 @@ ColorProvider& ColorProvider::operator=(
ColorProvider::~ColorProvider() = default;
ColorMixer& ColorProvider::AddMixer() {
- return internal_->AddMixer();
+ DCHECK(!color_map_);
+
+ mixers_.emplace_after(
+ first_postprocessing_mixer_,
+ base::BindRepeating([](const ColorMixer* mixer) { return mixer; },
+ GetLastNonPostprocessingMixer()),
+ base::BindRepeating(&ColorProvider::GetLastNonPostprocessingMixer,
+ base::Unretained(this)));
+
+ return *std::next(first_postprocessing_mixer_, 1);
}
ColorMixer& ColorProvider::AddPostprocessingMixer() {
- return internal_->AddPostprocessingMixer();
+ DCHECK(!color_map_);
+
+ if (first_postprocessing_mixer_ == mixers_.before_begin()) {
+ // The first postprocessing mixer points to the last regular mixer.
+ auto previous_mixer_getter = base::BindRepeating(
+ &ColorProvider::GetLastNonPostprocessingMixer, base::Unretained(this));
+ mixers_.emplace_front(previous_mixer_getter, previous_mixer_getter);
+ first_postprocessing_mixer_ = mixers_.begin();
+ } else {
+ // Other postprocessing mixers point to the next postprocessing mixer.
+ auto previous_mixer_getter =
+ base::BindRepeating([](const ColorMixer* mixer) { return mixer; },
+ base::Unretained(&mixers_.front()));
+ mixers_.emplace_front(previous_mixer_getter, previous_mixer_getter);
+ }
+ return mixers_.front();
}
SkColor ColorProvider::GetColor(ColorId id) const {
- return internal_->GetColor(id);
-}
+ CHECK(color_map_);
+ auto i = color_map_->find(id);
+ return i == color_map_->end() ? gfx::kPlaceholderColor : i->second;
+}
+
+void ColorProvider::GenerateColorMap() {
+ // This should only be called to generate the `color_map_` once.
+ DCHECK(!color_map_);
+
+ if (mixers_.empty())
+ DVLOG(2) << "ColorProvider::GenerateColorMap: No mixers defined!";
+
+ // Iterate over associated mixers and extract the ColorIds defined for this
+ // provider.
+ std::set<ColorId> color_ids;
+ for (const auto& mixer : mixers_) {
+ const auto mixer_color_ids = mixer.GetDefinedColorIds();
+ color_ids.insert(mixer_color_ids.begin(), mixer_color_ids.end());
+ }
+
+ // Iterate through all defined ColorIds and seed the `color_map` with the
+ // computed values. Use a std::map rather than a base::flat_map since it has
+ // frequent inserts and could grow very large.
+ std::map<ColorId, SkColor> color_map;
+ for (const auto& color_id : color_ids) {
+ SkColor resulting_color = mixers_.front().GetResultColor(color_id);
+ DVLOG(2) << "GenerateColorMap:"
+ << " Color Id: " << ColorIdName(color_id)
+ << " Resulting Color: " << SkColorName(resulting_color);
+ color_map.insert({color_id, resulting_color});
+ }
+
+ // Construct the color_map_.
+ color_map_ = ColorMap(color_map.begin(), color_map.end());
-bool ColorProvider::HasMixers() const {
- return internal_->HasMixers();
+ // Clear away all associated mixers as these are no longer needed.
+ mixers_.clear();
+ first_postprocessing_mixer_ = mixers_.before_begin();
}
-void ColorProvider::SetColorForTesting(ColorId id, SkColor color) {
- internal_->SetColorForTesting(id, color); // IN-TEST
+bool ColorProvider::IsColorMapEmpty() const {
+ DCHECK(color_map_);
+ return color_map_->empty();
}
-void ColorProvider::GenerateColorMapForTesting() {
- internal_->GenerateColorMapForTesting(); // IN-TEST
+void ColorProvider::SetColorForTesting(ColorId id, SkColor color) {
+ if (color_map_) {
+ (*color_map_)[id] = color;
+ } else {
+ if (mixers_.empty())
+ AddMixer();
+ (*std::next(first_postprocessing_mixer_, 1))[id] = {color};
+ }
}
-const ColorProvider::ColorMap& ColorProvider::color_map_for_testing() {
- return internal_->color_map_for_testing(); // IN-TEST
+const ColorMixer* ColorProvider::GetLastNonPostprocessingMixer() const {
+ const auto it = std::next(first_postprocessing_mixer_, 1);
+ return (it == mixers_.cend()) ? nullptr : &(*it);
}
} // namespace ui
diff -up chromium-126.0.6478.26/ui/color/color_provider.h.mee chromium-126.0.6478.26/ui/color/color_provider.h
--- chromium-126.0.6478.26/ui/color/color_provider.h.mee 2024-06-03 16:13:48.739166275 +0200
+++ chromium-126.0.6478.26/ui/color/color_provider.h 2024-06-03 16:22:10.555568967 +0200
@@ -5,11 +5,12 @@
#ifndef UI_COLOR_COLOR_PROVIDER_H_
#define UI_COLOR_COLOR_PROVIDER_H_
-#include <map>
+#include <forward_list>
#include <memory>
#include <optional>
#include "base/component_export.h"
+#include "base/containers/flat_map.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/color/color_id.h"
#include "ui/color/color_mixer.h"
@@ -24,7 +25,7 @@ namespace ui {
// TODO(pkasting): Figure out ownership model and lifetime.
class COMPONENT_EXPORT(COLOR) ColorProvider {
public:
- using ColorMap = std::map<ColorId, SkColor>;
+ using ColorMap = base::flat_map<ColorId, SkColor>;
ColorProvider();
ColorProvider(const ColorProvider&) = delete;
@@ -48,25 +49,39 @@ class COMPONENT_EXPORT(COLOR) ColorProvi
// |id|.
SkColor GetColor(ColorId id) const;
- // Returns true if mixers is not empty. It's the case for some browser
+ // Generates the `color_map_` used by this provider for all ColorIds defined
+ // by attached mixers. After the map is generated attached mixers and their
+ // associated objects are discarded. Mixers should not be added to the
+ // provider after this has been called.
+ void GenerateColorMap();
+
+ // Returns true if the color_map_ is empty. It's the case for some browser
// tests that run in single process mode but access colors that are
// initialized on renderer process launch, for example, controls in
// NaiveThemeBase and its children classes. Please see more details:
// https://crbug.com/1376775.
- bool HasMixers() const;
+ bool IsColorMapEmpty() const;
void SetColorForTesting(ColorId id, SkColor color);
- void GenerateColorMapForTesting();
- const ColorMap& color_map_for_testing();
+ const ColorMap& color_map_for_testing() { return *color_map_; }
private:
- // ColorProviderInternal provides the actual implementation of ColorProvider.
- // It's non-movable and non-copyable so that ColorMixer's callbacks can safely
- // bind to it.
- class ColorProviderInternal;
+ using Mixers = std::forward_list<ColorMixer>;
- std::unique_ptr<ColorProviderInternal> internal_ =
- std::make_unique<ColorProviderInternal>();
+ // Returns the last mixer in the chain that is not a "postprocessing" mixer,
+ // or nullptr.
+ const ColorMixer* GetLastNonPostprocessingMixer() const;
+
+ // The entire color pipeline, in reverse order (that is, the "last" mixer is
+ // at the front).
+ Mixers mixers_;
+
+ // The first mixer in the chain that is a "postprocessing" mixer.
+ Mixers::iterator first_postprocessing_mixer_ = mixers_.before_begin();
+
+ // A cached map of ColorId => SkColor mappings for this provider. This will be
+ // generated in the call to `GenerateColorMap()`.
+ std::optional<ColorMap> color_map_;
};
} // namespace ui
diff -up chromium-126.0.6478.26/ui/color/color_provider_manager.cc.mee chromium-126.0.6478.26/ui/color/color_provider_manager.cc
--- chromium-126.0.6478.26/ui/color/color_provider_manager.cc.mee 2024-05-29 18:02:31.000000000 +0200
+++ chromium-126.0.6478.26/ui/color/color_provider_manager.cc 2024-06-03 16:22:10.556568986 +0200
@@ -109,6 +109,7 @@ ColorProvider* ColorProviderManager::Get
if (!initializer_list_->empty())
initializer_list_->Notify(provider.get(), key);
+ provider->GenerateColorMap();
RecordTimeSpentInitializingColorProvider(timer.Elapsed());
++num_providers_initialized_;
diff -up chromium-126.0.6478.26/ui/color/color_provider_unittest.cc.mee chromium-126.0.6478.26/ui/color/color_provider_unittest.cc
--- chromium-126.0.6478.26/ui/color/color_provider_unittest.cc.mee 2024-05-29 18:02:31.000000000 +0200
+++ chromium-126.0.6478.26/ui/color/color_provider_unittest.cc 2024-06-03 16:22:10.556568986 +0200
@@ -17,6 +17,7 @@ namespace {
// Tests that when there are no mixers, GetColor() returns a placeholder value.
TEST(ColorProviderTest, GetColorNoMixers) {
ColorProvider provider;
+ provider.GenerateColorMap();
EXPECT_EQ(gfx::kPlaceholderColor, provider.GetColor(kColorTest0));
}
@@ -25,6 +26,7 @@ TEST(ColorProviderTest, GetColorNoMixers
TEST(ColorProviderTest, SingleMixer) {
ColorProvider provider;
provider.AddMixer()[kColorTest0] = {SK_ColorGREEN};
+ provider.GenerateColorMap();
EXPECT_EQ(SK_ColorGREEN, provider.GetColor(kColorTest0));
EXPECT_EQ(gfx::kPlaceholderColor, provider.GetColor(kColorTest1));
}
@@ -35,6 +37,7 @@ TEST(ColorProviderTest, NonOverlappingMi
ColorProvider provider;
provider.AddMixer()[kColorTest0] = {SK_ColorGREEN};
provider.AddMixer()[kColorTest1] = {SK_ColorRED};
+ provider.GenerateColorMap();
EXPECT_EQ(SK_ColorGREEN, provider.GetColor(kColorTest0));
EXPECT_EQ(SK_ColorRED, provider.GetColor(kColorTest1));
}
@@ -45,6 +48,7 @@ TEST(ColorProviderTest, OverlappingMixer
ColorProvider provider;
provider.AddMixer()[kColorTest0] = {SK_ColorGREEN};
provider.AddMixer()[kColorTest0] = {SK_ColorRED};
+ provider.GenerateColorMap();
EXPECT_EQ(SK_ColorRED, provider.GetColor(kColorTest0));
}
@@ -55,6 +59,7 @@ TEST(ColorProviderTest, WithProcessing)
provider.AddMixer()[kColorTest0] = {SK_ColorBLACK};
provider.AddPostprocessingMixer()[kColorTest0] =
GetColorWithMaxContrast(FromTransformInput());
+ provider.GenerateColorMap();
EXPECT_EQ(SK_ColorWHITE, provider.GetColor(kColorTest0));
}
@@ -65,6 +70,7 @@ TEST(ColorProviderTest, WithProcessingAd
provider.AddPostprocessingMixer()[kColorTest0] =
GetColorWithMaxContrast(FromTransformInput());
provider.AddMixer()[kColorTest0] = {SK_ColorBLACK};
+ provider.GenerateColorMap();
EXPECT_EQ(SK_ColorWHITE, provider.GetColor(kColorTest0));
}
@@ -76,6 +82,7 @@ TEST(ColorProviderTest, Redefinition) {
mixer0[kColorTest0] = {SK_ColorBLACK};
mixer0[kColorTest1] = AlphaBlend(SK_ColorRED, kColorTest0, 0x01);
provider.AddMixer()[kColorTest0] = {SK_ColorWHITE};
+ provider.GenerateColorMap();
EXPECT_EQ(SK_ColorWHITE, provider.GetColor(kColorTest0));
EXPECT_FALSE(color_utils::IsDark(provider.GetColor(kColorTest1)));
}
@@ -90,6 +97,7 @@ TEST(ColorProviderTest, RedefinitionWith
provider.AddMixer()[kColorTest0] = {SK_ColorWHITE};
provider.AddPostprocessingMixer()[kColorTest0] =
GetColorWithMaxContrast(FromTransformInput());
+ provider.GenerateColorMap();
EXPECT_NE(SK_ColorWHITE, provider.GetColor(kColorTest0));
EXPECT_FALSE(color_utils::IsDark(provider.GetColor(kColorTest1)));
}
@@ -97,6 +105,7 @@ TEST(ColorProviderTest, RedefinitionWith
TEST(ColorProviderTest, SetColorForTesting) {
ColorProvider provider;
provider.SetColorForTesting(kColorTest0, SK_ColorGREEN);
+ provider.GenerateColorMap();
EXPECT_EQ(SK_ColorGREEN, provider.GetColor(kColorTest0));
EXPECT_EQ(gfx::kPlaceholderColor, provider.GetColor(kColorTest1));
provider.SetColorForTesting(kColorTest1, SK_ColorBLUE);
diff -up chromium-126.0.6478.26/ui/color/color_provider_utils.cc.mee chromium-126.0.6478.26/ui/color/color_provider_utils.cc
--- chromium-126.0.6478.26/ui/color/color_provider_utils.cc.mee 2024-05-29 18:02:31.000000000 +0200
+++ chromium-126.0.6478.26/ui/color/color_provider_utils.cc 2024-06-03 16:22:10.556568986 +0200
@@ -367,6 +367,7 @@ ColorProvider CreateColorProviderFromRen
for (const auto& table : kRendererColorIdMap)
mixer[table.color_id] = {renderer_color_map.at(table.renderer_color_id)};
+ color_provider.GenerateColorMap();
return color_provider;
}
@@ -425,6 +426,7 @@ ColorProvider CreateEmulatedForcedColors
mixer[kColorSeparator] = {kColorMidground};
CompleteDefaultNonWebNativeRendererColorIdsDefinition(mixer);
+ color_provider.GenerateColorMap();
return color_provider;
}
@@ -479,6 +481,7 @@ ColorProvider CreateEmulatedForcedColors
mixer[kColorWebNativeControlSliderHovered] = {SK_ColorCYAN};
mixer[kColorWebNativeControlSliderPressed] = {SK_ColorCYAN};
+ color_provider.GenerateColorMap();
return color_provider;
}
@@ -652,6 +655,7 @@ ColorProvider COMPONENT_EXPORT(COLOR)
SkColorSetRGB(0x37, 0x93, 0xFF)};
}
+ color_provider.GenerateColorMap();
return color_provider;
}
diff -up chromium-126.0.6478.26/ui/color/color_provider_utils_unittest.cc.mee chromium-126.0.6478.26/ui/color/color_provider_utils_unittest.cc
--- chromium-126.0.6478.26/ui/color/color_provider_utils_unittest.cc.mee 2024-05-29 18:02:31.000000000 +0200
+++ chromium-126.0.6478.26/ui/color/color_provider_utils_unittest.cc 2024-06-03 16:22:10.556568986 +0200
@@ -49,6 +49,7 @@ TEST_F(ColorProviderUtilsTest, RendererC
ui::ColorMixer& mixer = color_provider.AddMixer();
for (int i = ui::kUiColorsStart + 1; i < ui::kUiColorsEnd; ++i)
mixer[i] = {static_cast<SkColor>(i)};
+ color_provider.GenerateColorMap();
// The size of the RendererColorMap should match number of defined
// RendererColorIds.
@@ -60,7 +61,6 @@ TEST_F(ColorProviderUtilsTest, RendererC
// also match the number of defined RendererColorIds.
auto new_color_provider =
ui::CreateColorProviderFromRendererColorMap(renderer_color_map);
- new_color_provider.GenerateColorMapForTesting();
EXPECT_EQ(kTotaltRendererColorIds,
new_color_provider.color_map_for_testing().size());
}
@@ -73,6 +73,7 @@ TEST_F(ColorProviderUtilsTest, ColorProv
for (int i = ui::kUiColorsStart + 1; i < ui::kUiColorsEnd; ++i) {
mixer[i] = {static_cast<SkColor>(i)};
}
+ color_provider.GenerateColorMap();
// A renderer color map generated from its source provider should have
// equivalent mappings.
@@ -84,6 +85,7 @@ TEST_F(ColorProviderUtilsTest, ColorProv
// Providers with different renderer color mappings should not be flagged as
// equivalent.
ui::ColorProvider new_color_provider;
+ new_color_provider.GenerateColorMap();
EXPECT_FALSE(IsRendererColorMappingEquivalent(&new_color_provider,
renderer_color_map));
}
@@ -119,6 +121,7 @@ TEST_F(ColorProviderUtilsTest, DefaultBl
ui::ColorProvider random_color_provider;
ui::ColorMixer& mixer = random_color_provider.AddMixer();
mixer[ui::kColorPrimaryBackground] = {SK_ColorWHITE};
+ random_color_provider.GenerateColorMap();
ui::RendererColorMap random_color_map =
ui::CreateRendererColorMap(random_color_provider);
diff -up chromium-126.0.6478.26/ui/color/sys_color_mixer_unittest.cc.mee chromium-126.0.6478.26/ui/color/sys_color_mixer_unittest.cc
--- chromium-126.0.6478.26/ui/color/sys_color_mixer_unittest.cc.mee 2024-05-29 18:02:31.000000000 +0200
+++ chromium-126.0.6478.26/ui/color/sys_color_mixer_unittest.cc 2024-06-03 16:22:10.556568986 +0200
@@ -36,6 +36,7 @@ class SysColorMixerTest
AddRefColorMixer(&color_provider_, key);
AddSysColorMixer(&color_provider_, key);
+ color_provider_.GenerateColorMap();
}
protected:
diff -up chromium-126.0.6478.26/ui/native_theme/native_theme_base.cc.mee chromium-126.0.6478.26/ui/native_theme/native_theme_base.cc
--- chromium-126.0.6478.26/ui/native_theme/native_theme_base.cc.mee 2024-05-29 18:02:32.000000000 +0200
+++ chromium-126.0.6478.26/ui/native_theme/native_theme_base.cc 2024-06-03 16:22:10.556568986 +0200
@@ -1763,9 +1763,8 @@ bool NativeThemeBase::IsColorPipelineSup
ControlColorId color_id) const {
// Color providers are not yet supported on Android so we need to check that
// the color_provider is not null here.
- if (!color_provider || !color_provider->HasMixers()) {
+ if (!color_provider || color_provider->IsColorMapEmpty())
return false;
- }
static constexpr auto kControlColorIdsSet =
base::MakeFixedFlatSet<ControlColorId>({kBorder,
diff -up chromium-126.0.6478.26/ui/native_theme/native_theme_fluent_unittest.cc.mee chromium-126.0.6478.26/ui/native_theme/native_theme_fluent_unittest.cc
--- chromium-126.0.6478.26/ui/native_theme/native_theme_fluent_unittest.cc.mee 2024-05-29 18:02:32.000000000 +0200
+++ chromium-126.0.6478.26/ui/native_theme/native_theme_fluent_unittest.cc 2024-06-03 16:22:10.556568986 +0200
@@ -134,6 +134,7 @@ TEST_P(NativeThemeFluentTest, VerifyArro
TEST_F(NativeThemeFluentTest, PaintThumbRoundedCorners) {
cc::RecordPaintCanvas canvas;
ColorProvider color_provider;
+ color_provider.GenerateColorMap();
constexpr gfx::Rect kRect(15, 100);
// `is_web_test` is `false` by default.
const NativeTheme::ScrollbarThumbExtraParams extra_params;
diff -up chromium-126.0.6478.26/ui/wm/core/shadow_controller_unittest.cc.mee chromium-126.0.6478.26/ui/wm/core/shadow_controller_unittest.cc
--- chromium-126.0.6478.26/ui/wm/core/shadow_controller_unittest.cc.mee 2024-05-29 18:02:32.000000000 +0200
+++ chromium-126.0.6478.26/ui/wm/core/shadow_controller_unittest.cc 2024-06-03 16:22:10.556568986 +0200
@@ -285,6 +285,7 @@ TEST_F(ShadowControllerTest, SetColorsMa
mixer[ui::kColorShadowValueAmbientShadowElevationTwelve] = {SK_ColorRED};
mixer[ui::kColorShadowValueKeyShadowElevationTwentyFour] = {SK_ColorGREEN};
mixer[ui::kColorShadowValueAmbientShadowElevationTwentyFour] = {SK_ColorBLUE};
+ color_provider.GenerateColorMap();
shadow->SetElevationToColorsMap(
ShadowController::GenerateShadowColorsMap(&color_provider));

View file

@ -1,248 +0,0 @@
diff -up chromium-126.0.6478.26/chrome/browser/ui/lens/lens_untrusted_ui.h.constexpr chromium-126.0.6478.26/chrome/browser/ui/lens/lens_untrusted_ui.h
--- chromium-126.0.6478.26/chrome/browser/ui/lens/lens_untrusted_ui.h.constexpr 2024-05-29 18:00:58.000000000 +0200
+++ chromium-126.0.6478.26/chrome/browser/ui/lens/lens_untrusted_ui.h 2024-06-02 23:51:25.539916606 +0200
@@ -47,7 +47,7 @@ class LensUntrustedUI : public Untrusted
mojo::PendingReceiver<color_change_listener::mojom::PageHandler>
receiver);
- static constexpr std::string GetWebUIName() { return "LensUntrusted"; }
+ static const std::string GetWebUIName() { return "LensUntrusted"; }
private:
// lens::mojom::LensPageHandlerFactory:
diff -up chromium-126.0.6478.26/chrome/browser/ui/lens/search_bubble_ui.h.constexpr chromium-126.0.6478.26/chrome/browser/ui/lens/search_bubble_ui.h
--- chromium-126.0.6478.26/chrome/browser/ui/lens/search_bubble_ui.h.constexpr 2024-05-29 18:00:58.000000000 +0200
+++ chromium-126.0.6478.26/chrome/browser/ui/lens/search_bubble_ui.h 2024-06-02 23:51:25.539916606 +0200
@@ -25,7 +25,7 @@ class SearchBubbleUI : public TopChromeW
mojo::PendingReceiver<lens::mojom::SearchBubblePageHandlerFactory>
receiver);
- static constexpr std::string GetWebUIName() { return "LensSearchBubble"; }
+ static const std::string GetWebUIName() { return "LensSearchBubble"; }
private:
// lens::mojom::SearchBubblePageHandlerFactory
diff -up chromium-126.0.6478.26/chrome/browser/ui/webui/commerce/shopping_insights_side_panel_ui.h.constexpr chromium-126.0.6478.26/chrome/browser/ui/webui/commerce/shopping_insights_side_panel_ui.h
--- chromium-126.0.6478.26/chrome/browser/ui/webui/commerce/shopping_insights_side_panel_ui.h.constexpr 2024-05-29 18:00:59.000000000 +0200
+++ chromium-126.0.6478.26/chrome/browser/ui/webui/commerce/shopping_insights_side_panel_ui.h 2024-06-02 23:51:25.539916606 +0200
@@ -55,7 +55,7 @@ class ShoppingInsightsSidePanelUI
mojo::PendingReceiver<
shopping_service::mojom::ShoppingServiceHandlerFactory> receiver);
- static constexpr std::string GetWebUIName() {
+ static const std::string GetWebUIName() {
return "ShoppingInsightsSidePanel";
}
diff -up chromium-126.0.6478.26/chrome/browser/ui/webui/compose/compose_untrusted_ui.h.constexpr chromium-126.0.6478.26/chrome/browser/ui/webui/compose/compose_untrusted_ui.h
--- chromium-126.0.6478.26/chrome/browser/ui/webui/compose/compose_untrusted_ui.h.constexpr 2024-05-29 18:00:59.000000000 +0200
+++ chromium-126.0.6478.26/chrome/browser/ui/webui/compose/compose_untrusted_ui.h 2024-06-02 23:51:25.540916630 +0200
@@ -58,7 +58,7 @@ class ComposeUntrustedUI
triggering_web_contents_ = web_contents->GetWeakPtr();
}
- static constexpr std::string GetWebUIName() { return "Compose"; }
+ static const std::string GetWebUIName() { return "Compose"; }
private:
void CreateComposeSessionUntrustedPageHandler(
diff -up chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/bookmarks/bookmarks_side_panel_ui.h.constexpr chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/bookmarks/bookmarks_side_panel_ui.h
--- chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/bookmarks/bookmarks_side_panel_ui.h.constexpr 2024-05-29 18:00:59.000000000 +0200
+++ chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/bookmarks/bookmarks_side_panel_ui.h 2024-06-02 23:51:25.540916630 +0200
@@ -75,7 +75,7 @@ class BookmarksSidePanelUI
commerce::ShoppingListContextMenuController*
GetShoppingListContextMenuController();
- static constexpr std::string GetWebUIName() { return "BookmarksSidePanel"; }
+ static const std::string GetWebUIName() { return "BookmarksSidePanel"; }
private:
// side_panel::mojom::BookmarksPageHandlerFactory:
diff -up chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/companion/companion_side_panel_untrusted_ui.h.constexpr chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/companion/companion_side_panel_untrusted_ui.h
--- chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/companion/companion_side_panel_untrusted_ui.h.constexpr 2024-06-03 18:20:28.504604071 +0200
+++ chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/companion/companion_side_panel_untrusted_ui.h 2024-06-03 18:20:44.559016497 +0200
@@ -34,7 +34,7 @@ class CompanionSidePanelUntrustedUI
// Gets a weak pointer to this object.
base::WeakPtr<CompanionSidePanelUntrustedUI> GetWeakPtr();
- static constexpr std::string GetWebUIName() {
+ static const std::string GetWebUIName() {
return "CompanionSidePanelUntrusted";
}
diff -up chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_ui.h.constexpr chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_ui.h
--- chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_ui.h.constexpr 2024-06-03 18:13:52.741282949 +0200
+++ chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_ui.h 2024-06-03 18:14:34.718442888 +0200
@@ -111,7 +111,7 @@ class CustomizeChromeUI
side_panel::customize_chrome::mojom::CustomizeToolbarHandlerFactory>
receiver);
- static constexpr std::string GetWebUIName() { return "CustomizeChrome"; }
+ static const std::string GetWebUIName() { return "CustomizeChrome"; }
private:
// side_panel::mojom::CustomizeChromePageHandlerFactory
diff -up chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/history_clusters/history_clusters_side_panel_ui.h.constexpr chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/history_clusters/history_clusters_side_panel_ui.h
--- chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/history_clusters/history_clusters_side_panel_ui.h.constexpr 2024-05-29 18:00:59.000000000 +0200
+++ chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/history_clusters/history_clusters_side_panel_ui.h 2024-06-02 23:51:25.540916630 +0200
@@ -70,7 +70,7 @@ class HistoryClustersSidePanelUI : publi
void DidFinishNavigation(
content::NavigationHandle* navigation_handle) override;
- static constexpr std::string GetWebUIName() {
+ static const std::string GetWebUIName() {
return "HistoryClustersSidePanel";
}
diff -up chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/performance_controls/performance_side_panel_ui.h.constexpr chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/performance_controls/performance_side_panel_ui.h
--- chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/performance_controls/performance_side_panel_ui.h.constexpr 2024-05-29 18:00:59.000000000 +0200
+++ chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/performance_controls/performance_side_panel_ui.h 2024-06-02 23:51:25.540916630 +0200
@@ -41,7 +41,7 @@ class PerformanceSidePanelUI
mojo::PendingReceiver<color_change_listener::mojom::PageHandler>
pending_receiver);
- static constexpr std::string GetWebUIName() { return "PerformanceSidePanel"; }
+ static const std::string GetWebUIName() { return "PerformanceSidePanel"; }
private:
// side_panel::mojom::PerformancePageHandlerFactory:
diff -up chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_ui.h.constexpr chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_ui.h
--- chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_ui.h.constexpr 2024-05-29 18:01:00.000000000 +0200
+++ chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_ui.h 2024-06-02 23:51:25.541916654 +0200
@@ -55,7 +55,7 @@ class ReadAnythingUntrustedUI
mojo::PendingReceiver<read_anything::mojom::UntrustedPageHandlerFactory>
receiver);
- static constexpr std::string GetWebUIName() {
+ static const std::string GetWebUIName() {
return "ReadAnythingUntrusted";
}
diff -up chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/reading_list/reading_list_ui.h.constexpr chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/reading_list/reading_list_ui.h
--- chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/reading_list/reading_list_ui.h.constexpr 2024-05-29 18:01:00.000000000 +0200
+++ chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/reading_list/reading_list_ui.h 2024-06-02 23:51:25.541916654 +0200
@@ -58,7 +58,7 @@ class ReadingListUI : public TopChromeWe
void SetActiveTabURL(const GURL& url);
- static constexpr std::string GetWebUIName() { return "ReadingList"; }
+ static const std::string GetWebUIName() { return "ReadingList"; }
private:
// reading_list::mojom::PageHandlerFactory:
diff -up chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/user_notes/user_notes_side_panel_ui.h.constexpr chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/user_notes/user_notes_side_panel_ui.h
--- chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/user_notes/user_notes_side_panel_ui.h.constexpr 2024-05-29 18:01:00.000000000 +0200
+++ chromium-126.0.6478.26/chrome/browser/ui/webui/side_panel/user_notes/user_notes_side_panel_ui.h 2024-06-02 23:51:25.541916654 +0200
@@ -35,7 +35,7 @@ class UserNotesSidePanelUI
void set_browser(Browser* browser) { browser_ = browser; }
- static constexpr std::string GetWebUIName() { return "UserNotesSidePanel"; }
+ static const std::string GetWebUIName() { return "UserNotesSidePanel"; }
private:
// user_notes::mojom::UserNotesPageHandlerFactory
diff -up chromium-126.0.6478.26/chrome/browser/ui/webui/tab_search/tab_search_ui.h.constexpr chromium-126.0.6478.26/chrome/browser/ui/webui/tab_search/tab_search_ui.h
--- chromium-126.0.6478.26/chrome/browser/ui/webui/tab_search/tab_search_ui.h.constexpr 2024-05-29 18:01:00.000000000 +0200
+++ chromium-126.0.6478.26/chrome/browser/ui/webui/tab_search/tab_search_ui.h 2024-06-02 23:51:25.542916677 +0200
@@ -58,7 +58,7 @@ class TabSearchUI : public TopChromeWebU
return page_handler_.get();
}
- static constexpr std::string GetWebUIName() { return "TabSearch"; }
+ static const std::string GetWebUIName() { return "TabSearch"; }
private:
// tab_search::mojom::PageHandlerFactory
diff -up chromium-126.0.6478.26/components/autofill/core/browser/data_model/autofill_i18n_api.h.constexpr chromium-126.0.6478.26/components/autofill/core/browser/data_model/autofill_i18n_api.h
--- chromium-126.0.6478.26/components/autofill/core/browser/data_model/autofill_i18n_api.h.constexpr 2024-05-29 18:01:05.000000000 +0200
+++ chromium-126.0.6478.26/components/autofill/core/browser/data_model/autofill_i18n_api.h 2024-06-02 23:51:25.542916677 +0200
@@ -16,8 +16,8 @@ namespace autofill::i18n_model_definitio
// Country code that represents autofill's legacy address hierarchy model as
// stored `kAutofillModelRules`. As a workaround for GCC we declare the
// std::string constexpr first.
-constexpr inline std::string kLegacyHierarchyCountryCodeString{"XX"};
-constexpr AddressCountryCode kLegacyHierarchyCountryCode =
+const inline std::string kLegacyHierarchyCountryCodeString{"XX"};
+const AddressCountryCode kLegacyHierarchyCountryCode =
AddressCountryCode(kLegacyHierarchyCountryCodeString);
// Creates an instance of the address hierarchy model corresponding to the
diff -up chromium-126.0.6478.26/components/autofill/core/browser/form_parsing/transpile_regex_patterns.py.constexpr chromium-126.0.6478.26/components/autofill/core/browser/form_parsing/transpile_regex_patterns.py
--- chromium-126.0.6478.26/components/autofill/core/browser/form_parsing/transpile_regex_patterns.py.constexpr 2024-05-29 18:01:05.000000000 +0200
+++ chromium-126.0.6478.26/components/autofill/core/browser/form_parsing/transpile_regex_patterns.py 2024-06-02 23:51:36.322172739 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/opt/rh/rh-python38/root/usr/bin/python
# Copyright 2020 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
@@ -54,7 +54,7 @@ def generate_matching_pattern_equals(nam
yield '// Checks if all the matching patterns for the given PatternSources'
yield '// and language are the same - meaning that computing predictions for'
yield '// both is unnecessary, since it will yield the same result.'
- yield 'constexpr bool AreMatchingPatternsEqualImpl(PatternSource a,'
+ yield 'const bool AreMatchingPatternsEqualImpl(PatternSource a,'
yield ' PatternSource b,'
yield ' LanguageCode lang_code) {'
yield ' if (a == b) {'
diff -up chromium-126.0.6478.26/components/autofill/core/browser/metrics/log_event.h.constexpr chromium-126.0.6478.26/components/autofill/core/browser/metrics/log_event.h
--- chromium-126.0.6478.26/components/autofill/core/browser/metrics/log_event.h.constexpr 2024-05-29 18:01:05.000000000 +0200
+++ chromium-126.0.6478.26/components/autofill/core/browser/metrics/log_event.h 2024-06-02 23:51:25.542916677 +0200
@@ -57,7 +57,7 @@ struct IsRequired {
// This function is not defined and consteval. Therefore, any evaluation will
// fail and fail at compile time.
template <typename T>
- consteval operator T(); // NOLINT
+ operator T(); // NOLINT
};
} // namespace internal
diff -up chromium-126.0.6478.26/components/history/core/browser/history_types.h.constexpr chromium-126.0.6478.26/components/history/core/browser/history_types.h
--- chromium-126.0.6478.26/components/history/core/browser/history_types.h.constexpr 2024-05-29 18:01:06.000000000 +0200
+++ chromium-126.0.6478.26/components/history/core/browser/history_types.h 2024-06-02 23:51:25.542916677 +0200
@@ -70,7 +70,7 @@ constexpr VisitedLinkID kInvalidVisitedL
typedef std::map<VisitID, VisitSource> VisitSourceMap;
// Constant used to represent that no app_id is used for matching.
-inline constexpr std::optional<std::string> kNoAppIdFilter = std::nullopt;
+inline const std::optional<std::string> kNoAppIdFilter = std::nullopt;
// VisitRow -------------------------------------------------------------------
diff -up chromium-126.0.6478.26/components/omnibox/browser/on_device_tail_model_service.cc.constexpr chromium-126.0.6478.26/components/omnibox/browser/on_device_tail_model_service.cc
--- chromium-126.0.6478.26/components/omnibox/browser/on_device_tail_model_service.cc.constexpr 2024-05-29 18:01:07.000000000 +0200
+++ chromium-126.0.6478.26/components/omnibox/browser/on_device_tail_model_service.cc 2024-06-02 23:51:25.543916702 +0200
@@ -30,7 +30,7 @@ namespace {
// The maximum idle time before the model executor is unloaded from memory.
constexpr base::TimeDelta kMaxExecutorIdleSeconds = base::Seconds(60);
// Constants for TFlite model validation.
-constexpr std::string kTestPrefix = "face";
+const std::string kTestPrefix = "face";
constexpr std::string_view kModelValidationSwitchName =
"omnibox-on-device-tail-model-validation";
diff -up chromium-126.0.6478.26/services/network/shared_dictionary/simple_url_pattern_matcher.cc.constexpr chromium-126.0.6478.26/services/network/shared_dictionary/simple_url_pattern_matcher.cc
--- chromium-126.0.6478.26/services/network/shared_dictionary/simple_url_pattern_matcher.cc.constexpr 2024-05-29 18:01:36.000000000 +0200
+++ chromium-126.0.6478.26/services/network/shared_dictionary/simple_url_pattern_matcher.cc 2024-06-02 23:51:25.543916702 +0200
@@ -28,17 +28,17 @@ namespace network {
namespace {
// https://urlpattern.spec.whatwg.org/#default-options
-constexpr liburlpattern::Options kDefaultOptions = {.delimiter_list = "",
+const liburlpattern::Options kDefaultOptions = {.delimiter_list = "",
.prefix_list = "",
.sensitive = true,
.strict = true};
// https://urlpattern.spec.whatwg.org/#hostname-options
-constexpr liburlpattern::Options kHostnameOptions = {.delimiter_list = ".",
+const liburlpattern::Options kHostnameOptions = {.delimiter_list = ".",
.prefix_list = "",
.sensitive = true,
.strict = true};
// https://urlpattern.spec.whatwg.org/#pathname-options
-constexpr liburlpattern::Options kPathnameOptions = {.delimiter_list = "/",
+const liburlpattern::Options kPathnameOptions = {.delimiter_list = "/",
.prefix_list = "/",
.sensitive = true,
.strict = true};

View file

@ -1,47 +0,0 @@
diff -up chromium-126.0.6478.26/third_party/wayland/src/cursor/os-compatibility.c.el7-memfd-fcntl-include chromium-126.0.6478.26/third_party/wayland/src/cursor/os-compatibility.c
--- chromium-126.0.6478.26/third_party/wayland/src/cursor/os-compatibility.c.el7-memfd-fcntl-include 2024-05-29 18:03:08.000000000 +0200
+++ chromium-126.0.6478.26/third_party/wayland/src/cursor/os-compatibility.c 2024-06-02 15:13:21.636638066 +0200
@@ -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>
diff -up chromium-126.0.6478.26/third_party/wayland/src/src/wayland-shm.c.el7-memfd-fcntl-include chromium-126.0.6478.26/third_party/wayland/src/src/wayland-shm.c
--- chromium-126.0.6478.26/third_party/wayland/src/src/wayland-shm.c.el7-memfd-fcntl-include 2024-05-29 18:03:08.000000000 +0200
+++ chromium-126.0.6478.26/third_party/wayland/src/src/wayland-shm.c 2024-06-02 15:13:21.635638045 +0200
@@ -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-126.0.6478.26/ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v1.cc.el7-memfd-fcntl-include chromium-126.0.6478.26/ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v1.cc
--- chromium-126.0.6478.26/ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v1.cc.el7-memfd-fcntl-include 2024-06-02 15:13:21.636638066 +0200
+++ chromium-126.0.6478.26/ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v1.cc 2024-06-02 15:16:18.202679909 +0200
@@ -5,6 +5,7 @@
#include "ui/ozone/platform/wayland/host/zwp_text_input_wrapper_v1.h"
#include <sys/mman.h>
+#include <linux/memfd.h>
#include <string>
#include <string_view>
diff -up chromium-126.0.6478.26/v8/src/base/platform/platform-posix.cc.el7-memfd-fcntl-include chromium-126.0.6478.26/v8/src/base/platform/platform-posix.cc
--- chromium-126.0.6478.26/v8/src/base/platform/platform-posix.cc.el7-memfd-fcntl-include 2024-05-29 18:03:35.000000000 +0200
+++ chromium-126.0.6478.26/v8/src/base/platform/platform-posix.cc 2024-06-02 15:13:21.635638045 +0200
@@ -60,6 +60,7 @@
#if V8_OS_LINUX
#include <sys/prctl.h> // for prctl
+#include <linux/memfd.h> // for MFD_CLOEXEC
#endif
#if defined(V8_OS_FUCHSIA)

View file

@ -1,12 +0,0 @@
diff -up chromium-126.0.6478.26/net/third_party/quiche/src/quiche/quic/core/quic_interval_deque.h.me chromium-126.0.6478.26/net/third_party/quiche/src/quiche/quic/core/quic_interval_deque.h
--- chromium-126.0.6478.26/net/third_party/quiche/src/quiche/quic/core/quic_interval_deque.h.me 2024-06-03 15:01:54.724207324 +0200
+++ chromium-126.0.6478.26/net/third_party/quiche/src/quiche/quic/core/quic_interval_deque.h 2024-06-03 14:58:16.244189794 +0200
@@ -144,7 +144,7 @@ class QUICHE_NO_EXPORT QuicIntervalDeque
// for efficient std::lower_bound() calls.
class QUICHE_NO_EXPORT Iterator {
public:
- using iterator_category = std::random_access_iterator_tag;
+ using iterator_category = std::forward_iterator_tag;
using value_type = T;
using difference_type = std::ptrdiff_t;
using pointer = T*;

File diff suppressed because it is too large Load diff

View file

@ -1,137 +0,0 @@
diff -up chromium-126.0.6478.26/printing/backend/cups_helper.cc.el7cups chromium-126.0.6478.26/printing/backend/cups_helper.cc
--- chromium-126.0.6478.26/printing/backend/cups_helper.cc.el7cups 2024-06-03 17:16:32.197509643 +0200
+++ chromium-126.0.6478.26/printing/backend/cups_helper.cc 2024-06-03 17:32:23.028376333 +0200
@@ -41,18 +41,6 @@ namespace printing {
// This section contains helper code for PPD parsing for semantic capabilities.
namespace {
-// Function availability can be tested by checking whether its address is not
-// nullptr. Weak symbols remove the need for platform specific build flags and
-// allow for appropriate CUPS usage on platforms with non-uniform version
-// support, namely Linux.
-#define WEAK_CUPS_FN(x) extern "C" __attribute__((weak)) decltype(x) x
-
-WEAK_CUPS_FN(httpConnect2);
-
-// Timeout for establishing a CUPS connection. It is expected that cupsd is
-// able to start and respond on all systems within this duration.
-constexpr base::TimeDelta kCupsTimeout = base::Seconds(5);
-
// CUPS default max copies value (parsed from kCupsMaxCopies PPD attribute).
constexpr int32_t kDefaultMaxCopies = 9999;
constexpr char kCupsMaxCopies[] = "cupsMaxCopies";
@@ -761,8 +749,7 @@ const int kDefaultIPPServerPort = 631;
// Helper wrapper around http_t structure, with connection and cleanup
// functionality.
HttpConnectionCUPS::HttpConnectionCUPS(const GURL& print_server_url,
- http_encryption_t encryption,
- bool blocking) {
+ http_encryption_t encryption) {
// If we have an empty url, use default print server.
if (print_server_url.is_empty())
return;
@@ -771,31 +758,22 @@ HttpConnectionCUPS::HttpConnectionCUPS(c
if (port == url::PORT_UNSPECIFIED)
port = kDefaultIPPServerPort;
- if (httpConnect2) {
- http_.reset(httpConnect2(print_server_url.host().c_str(), port,
- /*addrlist=*/nullptr, AF_UNSPEC, encryption,
- blocking ? 1 : 0, kCupsTimeout.InMilliseconds(),
- /*cancel=*/nullptr));
- } else {
- // Continue to use deprecated CUPS calls because because older Linux
- // distribution such as RHEL/CentOS 7 are shipped with CUPS 1.6.
- http_.reset(
+ http_.reset(
httpConnectEncrypt(print_server_url.host().c_str(), port, encryption));
- }
if (!http_) {
LOG(ERROR) << "CP_CUPS: Failed connecting to print server: "
<< print_server_url;
return;
}
-
- if (!httpConnect2) {
- httpBlocking(http(), blocking ? 1 : 0);
- }
}
HttpConnectionCUPS::~HttpConnectionCUPS() = default;
+void HttpConnectionCUPS::SetBlocking(bool blocking) {
+ httpBlocking(http(), blocking ? 1 : 0);
+}
+
http_t* HttpConnectionCUPS::http() {
return http_.get();
}
diff -up chromium-126.0.6478.26/printing/backend/cups_helper.h.el7cups chromium-126.0.6478.26/printing/backend/cups_helper.h
--- chromium-126.0.6478.26/printing/backend/cups_helper.h.el7cups 2024-06-03 17:23:35.923307842 +0200
+++ chromium-126.0.6478.26/printing/backend/cups_helper.h 2024-06-03 17:25:50.887855460 +0200
@@ -36,10 +36,11 @@ constexpr cups_ptype_t kDestinationsFilt
class COMPONENT_EXPORT(PRINT_BACKEND) HttpConnectionCUPS {
public:
HttpConnectionCUPS(const GURL& print_server_url,
- http_encryption_t encryption,
- bool blocking);
+ http_encryption_t encryption);
~HttpConnectionCUPS();
+ void SetBlocking(bool blocking);
+
http_t* http();
private:
diff -up chromium-126.0.6478.26/printing/backend/print_backend_cups.cc.el7cups chromium-126.0.6478.26/printing/backend/print_backend_cups.cc
--- chromium-126.0.6478.26/printing/backend/print_backend_cups.cc.el7cups 2024-06-03 17:26:44.607871149 +0200
+++ chromium-126.0.6478.26/printing/backend/print_backend_cups.cc 2024-06-03 17:29:15.889810651 +0200
@@ -149,7 +149,7 @@ mojom::ResultCode PrintBackendCUPS::Enum
// not showing as available. Using cupsEnumDests() allows us to do our own
// filtering should any duplicates occur.
CupsDestsData dests_data = {0, nullptr};
- ipp_status_t last_error = IPP_STATUS_OK;
+ ipp_status_t last_error = IPP_OK;
if (print_server_url_.is_empty()) {
VLOG(1) << "CUPS: using cupsEnumDests to enumerate printers";
if (!cupsEnumDests(CUPS_DEST_FLAGS_NONE, kCupsTimeoutMs,
@@ -176,7 +176,7 @@ mojom::ResultCode PrintBackendCUPS::Enum
// no printer drivers installed. Rely upon CUPS error code to distinguish
// between these.
DCHECK(!dests_data.dests);
- if (last_error != IPP_STATUS_ERROR_NOT_FOUND) {
+ if (last_error != IPP_NOT_FOUND) {
VLOG(1) << "CUPS: Error getting printers from CUPS server"
<< ", server: " << print_server_url_
<< ", error: " << static_cast<int>(last_error) << " - "
@@ -311,7 +311,8 @@ int PrintBackendCUPS::GetDests(cups_dest
if (print_server_url_.is_empty())
return cupsGetDests2(CUPS_HTTP_DEFAULT, dests);
- HttpConnectionCUPS http(print_server_url_, cups_encryption_, blocking_);
+ HttpConnectionCUPS http(print_server_url_, cups_encryption_);
+ http.SetBlocking(blocking_);
// This call must be made in the same scope as `http` because its destructor
// closes the connection.
@@ -337,7 +338,8 @@ base::FilePath PrintBackendCUPS::GetPPD(
// connection will timeout after 10 seconds of no data period. And it will
// return the same way as if data was completely and successfully
// downloaded.
- HttpConnectionCUPS http(print_server_url_, cups_encryption_, blocking_);
+ HttpConnectionCUPS http(print_server_url_, cups_encryption_);
+ http.SetBlocking(blocking_);
ppd_file_path = cupsGetPPD2(http.http(), name);
// Check if the get full PPD, since non-blocking call may simply return
// normally after timeout expired.
@@ -373,7 +375,8 @@ ScopedDestination PrintBackendCUPS::GetN
// Use default (local) print server.
dest = cupsGetNamedDest(CUPS_HTTP_DEFAULT, printer_name.c_str(), nullptr);
} else {
- HttpConnectionCUPS http(print_server_url_, cups_encryption_, blocking_);
+ HttpConnectionCUPS http(print_server_url_, cups_encryption_);
+ http.SetBlocking(blocking_);
dest = cupsGetNamedDest(http.http(), printer_name.c_str(), nullptr);
}
return ScopedDestination(dest);

File diff suppressed because it is too large Load diff

View file

@ -1,96 +0,0 @@
diff -up chromium-126.0.6478.26/components/visited_url_ranking/internal/visited_url_ranking_service_impl.cc.std_variant chromium-126.0.6478.26/components/visited_url_ranking/internal/visited_url_ranking_service_impl.cc
--- chromium-126.0.6478.26/components/visited_url_ranking/internal/visited_url_ranking_service_impl.cc.std_variant 2024-06-04 12:31:10.602282813 +0200
+++ chromium-126.0.6478.26/components/visited_url_ranking/internal/visited_url_ranking_service_impl.cc 2024-06-04 13:21:50.121345183 +0200
@@ -7,7 +7,6 @@
#include <map>
#include <memory>
#include <queue>
-#include <variant>
#include <vector>
#include "base/barrier_callback.h"
@@ -41,20 +40,16 @@ std::vector<URLVisitAggregate> ComputeUR
for (std::pair<const URLMergeKey, URLVisitAggregate::URLVisitVariant>&
url_data : result.data) {
URLVisitAggregate& aggregate = url_visit_map[url_data.first];
- std::visit(
- URLVisitVariantHelper{
- [&aggregate](URLVisitAggregate::TabData& tab_data) {
- aggregate.fetcher_data_map.emplace(
- tab_data.last_active_tab.session_name.has_value()
- ? Fetcher::kSession
- : Fetcher::kTabModel,
- std::move(tab_data));
- },
- [&aggregate](URLVisitAggregate::HistoryData& history_data) {
- aggregate.fetcher_data_map.emplace(Fetcher::kHistory,
- std::move(history_data));
- }},
- url_data.second);
+ if (std::holds_alternative<URLVisitAggregate::TabData>(url_data.second)) {
+ auto& tab_data = std::get<URLVisitAggregate::TabData>(url_data.second);
+ aggregate.fetcher_data_map.emplace(
+ tab_data.last_active_tab.session_name.has_value()
+ ? Fetcher::kSession
+ : Fetcher::kTabModel,
+ std::move(tab_data));
+ }
+ // TODO(crbug.com/330580109): Add support for history fetcher and
+ // associated aggregate data type.
}
}
diff -up chromium-126.0.6478.26/components/visited_url_ranking/public/url_visit.cc.std_variant chromium-126.0.6478.26/components/visited_url_ranking/public/url_visit.cc
--- chromium-126.0.6478.26/components/visited_url_ranking/public/url_visit.cc.std_variant 2024-06-04 12:29:20.593240495 +0200
+++ chromium-126.0.6478.26/components/visited_url_ranking/public/url_visit.cc 2024-06-04 12:29:57.253921979 +0200
@@ -37,14 +37,12 @@ URLVisitAggregate& URLVisitAggregate::op
std::set<const GURL*> URLVisitAggregate::GetAssociatedURLs() const {
std::set<const GURL*> urls = {};
for (const auto& fetcher_entry : fetcher_data_map) {
- std::visit(URLVisitVariantHelper{
- [&urls](const URLVisitAggregate::TabData& tab_data) {
- urls.insert(&tab_data.last_active_tab.visit.url);
- },
- [&urls](const URLVisitAggregate::HistoryData& history_data) {
- urls.insert(&history_data.last_visited.url_row.url());
- }},
- fetcher_entry.second);
+ if (std::holds_alternative<URLVisitAggregate::TabData>(
+ fetcher_entry.second)) {
+ const auto& tab_data =
+ std::get<URLVisitAggregate::TabData>(fetcher_entry.second);
+ urls.insert(&tab_data.last_active_tab.visit.url);
+ }
}
return urls;
}
diff -up chromium-126.0.6478.26/components/visited_url_ranking/public/url_visit.h.std_variant chromium-126.0.6478.26/components/visited_url_ranking/public/url_visit.h
--- chromium-126.0.6478.26/components/visited_url_ranking/public/url_visit.h.std_variant 2024-06-04 11:05:39.505847241 +0200
+++ chromium-126.0.6478.26/components/visited_url_ranking/public/url_visit.h 2024-06-04 13:22:26.518007748 +0200
@@ -8,6 +8,7 @@
#include <memory>
#include <optional>
#include <set>
+#include <variant>
#include <vector>
#include "base/functional/callback.h"
@@ -140,18 +141,6 @@ struct URLVisitAggregate {
bool bookmarked = false;
};
-// Helper to visit each variant of URLVisitVariant.
-// Usage:
-// std::visit(URLVisitVariantHelper{
-// [](Variant1& variant1) {},
-// [](Variant2& variant1) {},
-// [](Variant3& variant1) {},
-// variant_data);
-template <class... Ts>
-struct URLVisitVariantHelper : Ts... {
- using Ts::operator()...;
-};
-
} // namespace visited_url_ranking
#endif // COMPONENTS_VISITED_URL_RANKING_PUBLIC_URL_VISIT_H_

View file

@ -1,21 +0,0 @@
diff -up chromium-126.0.6478.26/chrome/renderer/accessibility/read_anything_app_model.cc.stdformat chromium-126.0.6478.26/chrome/renderer/accessibility/read_anything_app_model.cc
--- chromium-126.0.6478.26/chrome/renderer/accessibility/read_anything_app_model.cc.stdformat 2024-06-03 22:52:18.596936767 +0200
+++ chromium-126.0.6478.26/chrome/renderer/accessibility/read_anything_app_model.cc 2024-06-03 23:26:46.024734453 +0200
@@ -1059,7 +1059,7 @@ std::string ReadAnythingAppModel::GetHtm
int32_t hierarchical_level =
ax_node->GetIntAttribute(ax::mojom::IntAttribute::kHierarchicalLevel);
if (hierarchical_level) {
- return std::format("h{}", hierarchical_level);
+ return std::string("h" + std::to_string(hierarchical_level));
}
}
@@ -1159,7 +1159,7 @@ std::string ReadAnythingAppModel::GetHea
int32_t hierarchical_level =
ax_node->GetIntAttribute(ax::mojom::IntAttribute::kHierarchicalLevel);
if (hierarchical_level) {
- return std::format("h{}", hierarchical_level);
+ return std::string("h" + std::to_string(hierarchical_level));
}
return html_tag;
}

View file

@ -1,30 +0,0 @@
diff -up chromium-126.0.6478.26/components/plus_addresses/plus_address_service.cc.el7-type-alias chromium-126.0.6478.26/components/plus_addresses/plus_address_service.cc
--- chromium-126.0.6478.26/components/plus_addresses/plus_address_service.cc.el7-type-alias 2024-05-29 18:01:08.000000000 +0200
+++ chromium-126.0.6478.26/components/plus_addresses/plus_address_service.cc 2024-06-02 17:32:29.917153207 +0200
@@ -196,7 +196,7 @@ std::vector<Suggestion> PlusAddressServi
bool is_off_the_record,
std::u16string_view focused_field_value,
autofill::AutofillSuggestionTriggerSource trigger_source) {
- using enum autofill::AutofillSuggestionTriggerSource;
+ using autofill::AutofillSuggestionTriggerSource;
if (!SupportsPlusAddresses(last_committed_primary_main_frame_origin,
is_off_the_record)) {
return {};
@@ -207,7 +207,7 @@ std::vector<Suggestion> PlusAddressServi
std::optional<std::string> maybe_address =
GetPlusAddress(OriginToFacet(last_committed_primary_main_frame_origin));
if (maybe_address == std::nullopt) {
- if (trigger_source != kManualFallbackPlusAddresses &&
+ if (trigger_source != AutofillSuggestionTriggerSource::kManualFallbackPlusAddresses &&
!normalized_field_value.empty()) {
return {};
}
@@ -222,7 +222,7 @@ std::vector<Suggestion> PlusAddressServi
// Only suggest filling a plus address whose prefix matches the field's value.
std::u16string address = base::UTF8ToUTF16(*maybe_address);
- if (trigger_source != kManualFallbackPlusAddresses &&
+ if (trigger_source != AutofillSuggestionTriggerSource::kManualFallbackPlusAddresses &&
!address.starts_with(normalized_field_value)) {
return {};
}

View file

@ -1,15 +0,0 @@
diff -up chromium-126.0.6478.55/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h.me chromium-126.0.6478.55/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h
--- chromium-126.0.6478.55/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h.me 2024-06-12 13:09:47.539620293 -0400
+++ chromium-126.0.6478.55/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h 2024-06-12 13:12:10.570739701 -0400
@@ -10,9 +10,11 @@
#include "partition_alloc/build_config.h"
#include "partition_alloc/partition_alloc_buildflags.h"
+#if 0
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)
#define HAS_HW_CAPS
#endif
+#endif
#if defined(ARCH_CPU_ARM64) && defined(HAS_HW_CAPS)
#include <asm/hwcap.h>

View file

@ -1,667 +0,0 @@
diff -up chromium-126.0.6478.26/base/allocator/partition_allocator/src/partition_alloc/starscan/stats_collector.h.system-libstdc++ chromium-126.0.6478.26/base/allocator/partition_allocator/src/partition_alloc/starscan/stats_collector.h
--- chromium-126.0.6478.26/base/allocator/partition_allocator/src/partition_alloc/starscan/stats_collector.h.system-libstdc++ 2024-05-29 18:00:45.000000000 +0200
+++ chromium-126.0.6478.26/base/allocator/partition_allocator/src/partition_alloc/starscan/stats_collector.h 2024-06-02 23:51:25.562917154 +0200
@@ -14,7 +14,7 @@
#include <unordered_map>
#include <utility>
-#include "partition_alloc/internal_allocator_forward.h"
+#include "partition_alloc/internal_allocator.h"
#include "partition_alloc/partition_alloc_base/threading/platform_thread.h"
#include "partition_alloc/partition_alloc_base/time/time.h"
#include "partition_alloc/partition_alloc_check.h"
diff -up chromium-126.0.6478.26/chrome/browser/ui/tabs/tab_strip_model.h.system-libstdc++ chromium-126.0.6478.26/chrome/browser/ui/tabs/tab_strip_model.h
--- chromium-126.0.6478.26/chrome/browser/ui/tabs/tab_strip_model.h.system-libstdc++ 2024-05-29 18:00:59.000000000 +0200
+++ chromium-126.0.6478.26/chrome/browser/ui/tabs/tab_strip_model.h 2024-06-02 23:51:25.563917178 +0200
@@ -12,6 +12,7 @@
#include <memory>
#include <optional>
#include <string>
+#include <variant>
#include <vector>
#include "base/containers/span.h"
diff -up chromium-126.0.6478.26/components/viz/service/display/surface_aggregator.cc.system-libstdc++ chromium-126.0.6478.26/components/viz/service/display/surface_aggregator.cc
--- chromium-126.0.6478.26/components/viz/service/display/surface_aggregator.cc.system-libstdc++ 2024-05-29 18:01:12.000000000 +0200
+++ chromium-126.0.6478.26/components/viz/service/display/surface_aggregator.cc 2024-06-02 23:51:25.563917178 +0200
@@ -2296,7 +2296,7 @@ AggregatedFrame SurfaceAggregator::Aggre
root_surface_id_ = surface_id;
// Start recording new stats for this aggregation.
- stats_.emplace();
+ stats_ = AggregateStatistics{};
base::ElapsedTimer prewalk_timer;
ResolvedFrameData* resolved_frame = GetResolvedFrame(surface_id);
diff -up chromium-126.0.6478.26/content/browser/first_party_sets/first_party_sets_handler_database_helper.cc.system-libstdc++ chromium-126.0.6478.26/content/browser/first_party_sets/first_party_sets_handler_database_helper.cc
--- chromium-126.0.6478.26/content/browser/first_party_sets/first_party_sets_handler_database_helper.cc.system-libstdc++ 2024-05-29 18:01:12.000000000 +0200
+++ chromium-126.0.6478.26/content/browser/first_party_sets/first_party_sets_handler_database_helper.cc 2024-06-02 23:51:25.563917178 +0200
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <optional>
#include "content/browser/first_party_sets/first_party_sets_handler_database_helper.h"
#include "base/containers/contains.h"
diff -up chromium-126.0.6478.26/content/services/auction_worklet/real_time_reporting_bindings.h.system-libstdc++ chromium-126.0.6478.26/content/services/auction_worklet/real_time_reporting_bindings.h
--- chromium-126.0.6478.26/content/services/auction_worklet/real_time_reporting_bindings.h.system-libstdc++ 2024-06-04 13:52:43.689553459 +0200
+++ chromium-126.0.6478.26/content/services/auction_worklet/real_time_reporting_bindings.h 2024-06-04 13:52:01.117778943 +0200
@@ -12,7 +12,7 @@
#include "content/common/content_export.h"
#include "content/services/auction_worklet/auction_v8_helper.h"
#include "content/services/auction_worklet/context_recycler.h"
-#include "content/services/auction_worklet/public/mojom/real_time_reporting.mojom-forward.h"
+#include "content/services/auction_worklet/public/mojom/real_time_reporting.mojom.h"
#include "v8/include/v8-forward.h"
namespace auction_worklet {
diff -up chromium-126.0.6478.26/gpu/command_buffer/service/shared_image/shared_image_backing.h.system-libstdc++ chromium-126.0.6478.26/gpu/command_buffer/service/shared_image/shared_image_backing.h
--- chromium-126.0.6478.26/gpu/command_buffer/service/shared_image/shared_image_backing.h.system-libstdc++ 2024-05-29 18:01:26.000000000 +0200
+++ chromium-126.0.6478.26/gpu/command_buffer/service/shared_image/shared_image_backing.h 2024-06-02 23:51:25.564917202 +0200
@@ -111,6 +111,25 @@ using VideoDecodeDevice = Microsoft::WRL
using VideoDecodeDevice = void*;
#endif // BUILDFLAG(IS_WIN)
+class ScopedWriteUMA {
+ public:
+ ScopedWriteUMA() = default;
+
+ ScopedWriteUMA(const ScopedWriteUMA&) = delete;
+ ScopedWriteUMA& operator=(const ScopedWriteUMA&) = delete;
+
+ ~ScopedWriteUMA() {
+ UMA_HISTOGRAM_BOOLEAN("GPU.SharedImage.ContentConsumed",
+ content_consumed_);
+ }
+
+ bool content_consumed() const { return content_consumed_; }
+ void SetConsumed() { content_consumed_ = true; }
+
+ private:
+ bool content_consumed_ = false;
+};
+
// Represents the actual storage (GL texture, VkImage, GMB) for a SharedImage.
// Should not be accessed directly, instead is accessed through a
// SharedImageRepresentation.
@@ -384,25 +403,6 @@ class GPU_GLES2_EXPORT SharedImageBackin
mutable std::optional<base::Lock> lock_;
private:
- class ScopedWriteUMA {
- public:
- ScopedWriteUMA() = default;
-
- ScopedWriteUMA(const ScopedWriteUMA&) = delete;
- ScopedWriteUMA& operator=(const ScopedWriteUMA&) = delete;
-
- ~ScopedWriteUMA() {
- UMA_HISTOGRAM_BOOLEAN("GPU.SharedImage.ContentConsumed",
- content_consumed_);
- }
-
- bool content_consumed() const { return content_consumed_; }
- void SetConsumed() { content_consumed_ = true; }
-
- private:
- bool content_consumed_ = false;
- };
-
const Mailbox mailbox_;
const viz::SharedImageFormat format_;
const gfx::Size size_;
diff -up chromium-126.0.6478.26/mojo/public/cpp/bindings/lib/multiplex_router.cc.system-libstdc++ chromium-126.0.6478.26/mojo/public/cpp/bindings/lib/multiplex_router.cc
--- chromium-126.0.6478.26/mojo/public/cpp/bindings/lib/multiplex_router.cc.system-libstdc++ 2024-05-29 18:01:33.000000000 +0200
+++ chromium-126.0.6478.26/mojo/public/cpp/bindings/lib/multiplex_router.cc 2024-06-02 23:51:25.564917202 +0200
@@ -893,7 +893,7 @@ bool MultiplexRouter::ExclusiveSyncWaitF
DCHECK(!exclusive_sync_wait_);
scoped_refptr<MultiplexRouter> keep_alive(this);
- exclusive_sync_wait_.emplace();
+ exclusive_sync_wait_ = ExclusiveSyncWaitInfo{};
exclusive_sync_wait_->interface_id = interface_id;
exclusive_sync_wait_->request_id = request_id;
while (!exclusive_sync_wait_->finished) {
diff -up chromium-126.0.6478.26/third_party/blink/common/interest_group/auction_config_mojom_traits.cc.system-libstdc++ chromium-126.0.6478.26/third_party/blink/common/interest_group/auction_config_mojom_traits.cc
--- chromium-126.0.6478.26/third_party/blink/common/interest_group/auction_config_mojom_traits.cc.system-libstdc++ 2024-05-29 18:01:37.000000000 +0200
+++ chromium-126.0.6478.26/third_party/blink/common/interest_group/auction_config_mojom_traits.cc 2024-06-02 23:51:25.565917225 +0200
@@ -225,8 +225,6 @@ bool StructTraits<blink::mojom::AuctionA
!data.ReadAllBuyersPrioritySignals(&out->all_buyers_priority_signals) ||
!data.ReadAuctionReportBuyerKeys(&out->auction_report_buyer_keys) ||
!data.ReadAuctionReportBuyers(&out->auction_report_buyers) ||
- !data.ReadAuctionReportBuyerDebugModeConfig(
- &out->auction_report_buyer_debug_mode_config) ||
!data.ReadRequiredSellerCapabilities(
&out->required_seller_capabilities) ||
!data.ReadRequestedSize(&out->requested_size) ||
diff -up chromium-126.0.6478.26/third_party/blink/renderer/core/loader/history_item.cc.system-libstdc++ chromium-126.0.6478.26/third_party/blink/renderer/core/loader/history_item.cc
--- chromium-126.0.6478.26/third_party/blink/renderer/core/loader/history_item.cc.system-libstdc++ 2024-05-29 18:01:39.000000000 +0200
+++ chromium-126.0.6478.26/third_party/blink/renderer/core/loader/history_item.cc 2024-06-02 23:51:25.565917225 +0200
@@ -182,26 +182,26 @@ void HistoryItem::SetReferrerPolicy(netw
void HistoryItem::SetVisualViewportScrollOffset(const ScrollOffset& offset) {
if (!view_state_)
- view_state_ = std::make_optional<ViewState>();
+ view_state_ = blink::HistoryItem::ViewState{};
view_state_->visual_viewport_scroll_offset_ = offset;
}
void HistoryItem::SetScrollOffset(const ScrollOffset& offset) {
if (!view_state_)
- view_state_ = std::make_optional<ViewState>();
+ view_state_ = blink::HistoryItem::ViewState{};
view_state_->scroll_offset_ = offset;
}
void HistoryItem::SetPageScaleFactor(float scale_factor) {
if (!view_state_)
- view_state_ = std::make_optional<ViewState>();
+ view_state_ = blink::HistoryItem::ViewState{};
view_state_->page_scale_factor_ = scale_factor;
}
void HistoryItem::SetScrollAnchorData(
const ScrollAnchorData& scroll_anchor_data) {
if (!view_state_)
- view_state_ = std::make_optional<ViewState>();
+ view_state_ = blink::HistoryItem::ViewState{};
view_state_->scroll_anchor_data_ = scroll_anchor_data;
}
diff -up chromium-126.0.6478.26/third_party/blink/renderer/core/page/page_popup_controller.h.system-libstdc++ chromium-126.0.6478.26/third_party/blink/renderer/core/page/page_popup_controller.h
--- chromium-126.0.6478.26/third_party/blink/renderer/core/page/page_popup_controller.h.system-libstdc++ 2024-06-04 17:01:05.066469613 +0200
+++ chromium-126.0.6478.26/third_party/blink/renderer/core/page/page_popup_controller.h 2024-06-04 16:51:41.076869743 +0200
@@ -31,6 +31,7 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_PAGE_POPUP_CONTROLLER_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_PAGE_POPUP_CONTROLLER_H_
+#include <optional>
#include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
#include "third_party/blink/renderer/platform/heap/collection_support/heap_vector.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
diff -up chromium-126.0.6478.26/third_party/blink/renderer/core/paint/fragment_data_iterator.h.system-libstdc++ chromium-126.0.6478.26/third_party/blink/renderer/core/paint/fragment_data_iterator.h
--- chromium-126.0.6478.26/third_party/blink/renderer/core/paint/fragment_data_iterator.h.system-libstdc++ 2024-05-29 18:01:40.000000000 +0200
+++ chromium-126.0.6478.26/third_party/blink/renderer/core/paint/fragment_data_iterator.h 2024-06-02 23:51:25.565917225 +0200
@@ -22,7 +22,7 @@ class FragmentDataIteratorBase {
public:
explicit FragmentDataIteratorBase(Head& head) : fragment_head_(head) {}
- explicit FragmentDataIteratorBase(nullptr_t) {}
+ explicit FragmentDataIteratorBase(std::nullptr_t) {}
Data* GetFragmentData() const {
return !IsDone() ? &fragment_head_.at(idx_) : nullptr;
diff -up chromium-126.0.6478.26/third_party/blink/renderer/modules/encoding/text_decoder.h.system-libstdc++ chromium-126.0.6478.26/third_party/blink/renderer/modules/encoding/text_decoder.h
--- chromium-126.0.6478.26/third_party/blink/renderer/modules/encoding/text_decoder.h.system-libstdc++ 2024-06-03 23:14:03.138724802 +0200
+++ chromium-126.0.6478.26/third_party/blink/renderer/modules/encoding/text_decoder.h 2024-06-03 23:14:41.395654435 +0200
@@ -31,6 +31,7 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_ENCODING_TEXT_DECODER_H_
#define THIRD_PARTY_BLINK_RENDERER_MODULES_ENCODING_TEXT_DECODER_H_
+#include <optional>
#include <memory>
#include "third_party/blink/renderer/bindings/core/v8/v8_typedefs.h"
diff -up chromium-126.0.6478.26/third_party/blink/renderer/modules/media_controls/elements/media_control_timeline_element.cc.system-libstdc++ chromium-126.0.6478.26/third_party/blink/renderer/modules/media_controls/elements/media_control_timeline_element.cc
--- chromium-126.0.6478.26/third_party/blink/renderer/modules/media_controls/elements/media_control_timeline_element.cc.system-libstdc++ 2024-05-29 18:01:40.000000000 +0200
+++ chromium-126.0.6478.26/third_party/blink/renderer/modules/media_controls/elements/media_control_timeline_element.cc 2024-06-02 23:51:25.566917250 +0200
@@ -102,7 +102,7 @@ void MediaControlTimelineElement::Update
void MediaControlTimelineElement::SetPosition(double current_time,
bool suppress_aria) {
if (is_live_ && !live_anchor_time_ && current_time != 0) {
- live_anchor_time_.emplace();
+ live_anchor_time_ = LiveAnchorTime{};
live_anchor_time_->clock_time_ = base::TimeTicks::Now();
live_anchor_time_->media_time_ = MediaElement().currentTime();
}
diff -up chromium-126.0.6478.26/third_party/blink/renderer/platform/fonts/shaping/run_segmenter.h.system-libstdc++ chromium-126.0.6478.26/third_party/blink/renderer/platform/fonts/shaping/run_segmenter.h
--- chromium-126.0.6478.26/third_party/blink/renderer/platform/fonts/shaping/run_segmenter.h.system-libstdc++ 2024-06-04 16:52:15.268516255 +0200
+++ chromium-126.0.6478.26/third_party/blink/renderer/platform/fonts/shaping/run_segmenter.h 2024-06-04 16:56:23.906705337 +0200
@@ -7,6 +7,7 @@
#include <unicode/uscript.h>
#include <memory>
+#include <optional>
#include "third_party/blink/renderer/platform/fonts/font_orientation.h"
#include "third_party/blink/renderer/platform/fonts/orientation_iterator.h"
#include "third_party/blink/renderer/platform/fonts/script_run_iterator.h"
diff -up chromium-126.0.6478.26/third_party/blink/renderer/platform/graphics/paint/geometry_mapper_transform_cache.cc.system-libstdc++ chromium-126.0.6478.26/third_party/blink/renderer/platform/graphics/paint/geometry_mapper_transform_cache.cc
--- chromium-126.0.6478.26/third_party/blink/renderer/platform/graphics/paint/geometry_mapper_transform_cache.cc.system-libstdc++ 2024-05-29 18:01:41.000000000 +0200
+++ chromium-126.0.6478.26/third_party/blink/renderer/platform/graphics/paint/geometry_mapper_transform_cache.cc 2024-06-02 23:51:25.566917250 +0200
@@ -70,7 +70,7 @@ void GeometryMapperTransformCache::Updat
to_2d_translation_root_ += translation;
if (parent.plane_root_transform_) {
- plane_root_transform_.emplace();
+ plane_root_transform_ = PlaneRootTransform{};
plane_root_transform_->plane_root = parent.plane_root();
plane_root_transform_->to_plane_root = parent.to_plane_root();
plane_root_transform_->to_plane_root.Translate(translation.x(),
@@ -98,7 +98,7 @@ void GeometryMapperTransformCache::Updat
// as the 2d translation root.
plane_root_transform_ = std::nullopt;
} else {
- plane_root_transform_.emplace();
+ plane_root_transform_ = PlaneRootTransform{};
plane_root_transform_->plane_root = parent.plane_root();
plane_root_transform_->to_plane_root.MakeIdentity();
parent.ApplyToPlaneRoot(plane_root_transform_->to_plane_root);
@@ -140,7 +140,7 @@ void GeometryMapperTransformCache::Updat
parent_node->UpdateScreenTransform();
const auto& parent = parent_node->GetTransformCache();
- screen_transform_.emplace();
+ screen_transform_ = ScreenTransform{};
parent.ApplyToScreen(screen_transform_->to_screen);
if (node.FlattensInheritedTransform())
screen_transform_->to_screen.Flatten();
diff -up chromium-126.0.6478.26/third_party/ruy/src/ruy/profiler/instrumentation.h.system-libstdc++ chromium-126.0.6478.26/third_party/ruy/src/ruy/profiler/instrumentation.h
--- chromium-126.0.6478.26/third_party/ruy/src/ruy/profiler/instrumentation.h.system-libstdc++ 2024-05-29 18:03:01.000000000 +0200
+++ chromium-126.0.6478.26/third_party/ruy/src/ruy/profiler/instrumentation.h 2024-06-02 23:51:25.566917250 +0200
@@ -19,6 +19,7 @@ limitations under the License.
#ifdef RUY_PROFILER
#include <cstdio>
#include <mutex>
+#include <string>
#include <vector>
#endif
diff -up chromium-126.0.6478.26/third_party/webrtc/modules/congestion_controller/goog_cc/loss_based_bwe_v2.cc.system-libstdc++ chromium-126.0.6478.26/third_party/webrtc/modules/congestion_controller/goog_cc/loss_based_bwe_v2.cc
--- chromium-126.0.6478.26/third_party/webrtc/modules/congestion_controller/goog_cc/loss_based_bwe_v2.cc.system-libstdc++ 2024-05-29 18:03:48.000000000 +0200
+++ chromium-126.0.6478.26/third_party/webrtc/modules/congestion_controller/goog_cc/loss_based_bwe_v2.cc 2024-06-02 23:51:25.567917273 +0200
@@ -549,7 +549,7 @@ absl::optional<LossBasedBweV2::Config> L
if (!enabled.Get()) {
return config;
}
- config.emplace();
+ config = Config{};
config->bandwidth_rampup_upper_bound_factor =
bandwidth_rampup_upper_bound_factor.Get();
config->bandwidth_rampup_upper_bound_factor_in_hold =
diff -up chromium-126.0.6478.26/ui/gfx/x/generated_protos/randr.cc.system-libstdc++ chromium-126.0.6478.26/ui/gfx/x/generated_protos/randr.cc
--- chromium-126.0.6478.26/ui/gfx/x/generated_protos/randr.cc.system-libstdc++ 2024-05-29 18:02:32.000000000 +0200
+++ chromium-126.0.6478.26/ui/gfx/x/generated_protos/randr.cc 2024-06-02 23:51:25.568917297 +0200
@@ -305,7 +305,7 @@ void ReadEvent<RandR::NotifyEvent>(RandR
// data
auto data_expr = subCode;
if (CaseEq(data_expr, RandR::Notify::CrtcChange)) {
- data.cc.emplace();
+ data.cc = RandR::NotifyEvent::Cc{};
auto& timestamp = (*data.cc).timestamp;
auto& window = (*data.cc).window;
auto& crtc = (*data.cc).crtc;
@@ -349,7 +349,7 @@ void ReadEvent<RandR::NotifyEvent>(RandR
Read(&height, &buf);
}
if (CaseEq(data_expr, RandR::Notify::OutputChange)) {
- data.oc.emplace();
+ data.oc = RandR::NotifyEvent::Oc{};
auto& timestamp = (*data.oc).timestamp;
auto& config_timestamp = (*data.oc).config_timestamp;
auto& window = (*data.oc).window;
@@ -394,7 +394,7 @@ void ReadEvent<RandR::NotifyEvent>(RandR
subpixel_order = static_cast<Render::SubPixel>(tmp6);
}
if (CaseEq(data_expr, RandR::Notify::OutputProperty)) {
- data.op.emplace();
+ data.op = RandR::NotifyEvent::Op{};
auto& window = (*data.op).window;
auto& output = (*data.op).output;
auto& atom = (*data.op).atom;
@@ -422,7 +422,7 @@ void ReadEvent<RandR::NotifyEvent>(RandR
Pad(&buf, 11);
}
if (CaseEq(data_expr, RandR::Notify::ProviderChange)) {
- data.pc.emplace();
+ data.pc = RandR::NotifyEvent::Pc{};
auto& timestamp = (*data.pc).timestamp;
auto& window = (*data.pc).window;
auto& provider = (*data.pc).provider;
@@ -440,7 +440,7 @@ void ReadEvent<RandR::NotifyEvent>(RandR
Pad(&buf, 16);
}
if (CaseEq(data_expr, RandR::Notify::ProviderProperty)) {
- data.pp.emplace();
+ data.pp = RandR::NotifyEvent::Pp{};
auto& window = (*data.pp).window;
auto& provider = (*data.pp).provider;
auto& atom = (*data.pp).atom;
@@ -466,7 +466,7 @@ void ReadEvent<RandR::NotifyEvent>(RandR
Pad(&buf, 11);
}
if (CaseEq(data_expr, RandR::Notify::ResourceChange)) {
- data.rc.emplace();
+ data.rc = RandR::NotifyEvent::Rc{};
auto& timestamp = (*data.rc).timestamp;
auto& window = (*data.rc).window;
@@ -480,7 +480,7 @@ void ReadEvent<RandR::NotifyEvent>(RandR
Pad(&buf, 20);
}
if (CaseEq(data_expr, RandR::Notify::Lease)) {
- data.lc.emplace();
+ data.lc = RandR::NotifyEvent::Lc{};
auto& timestamp = (*data.lc).timestamp;
auto& window = (*data.lc).window;
auto& lease = (*data.lc).lease;
diff -up chromium-126.0.6478.26/ui/gfx/x/generated_protos/xinput.cc.system-libstdc++ chromium-126.0.6478.26/ui/gfx/x/generated_protos/xinput.cc
--- chromium-126.0.6478.26/ui/gfx/x/generated_protos/xinput.cc.system-libstdc++ 2024-05-29 18:02:32.000000000 +0200
+++ chromium-126.0.6478.26/ui/gfx/x/generated_protos/xinput.cc 2024-06-02 23:51:25.569917321 +0200
@@ -560,7 +560,7 @@ void ReadEvent<Input::DeviceChangedEvent
// data
auto data_expr = type;
if (CaseEq(data_expr, Input::DeviceClassType::Key)) {
- data.key.emplace();
+ data.key = Input::DeviceClass::Key{};
uint16_t num_keys{};
auto& keys = (*data.key).keys;
@@ -575,7 +575,7 @@ void ReadEvent<Input::DeviceChangedEvent
}
}
if (CaseEq(data_expr, Input::DeviceClassType::Button)) {
- data.button.emplace();
+ data.button = Input::DeviceClass::Button{};
uint16_t num_buttons{};
auto& state = (*data.button).state;
auto& labels = (*data.button).labels;
@@ -598,7 +598,7 @@ void ReadEvent<Input::DeviceChangedEvent
}
}
if (CaseEq(data_expr, Input::DeviceClassType::Valuator)) {
- data.valuator.emplace();
+ data.valuator = Input::DeviceClass::Valuator{};
auto& number = (*data.valuator).number;
auto& label = (*data.valuator).label;
auto& min = (*data.valuator).min;
@@ -661,7 +661,7 @@ void ReadEvent<Input::DeviceChangedEvent
Pad(&buf, 3);
}
if (CaseEq(data_expr, Input::DeviceClassType::Scroll)) {
- data.scroll.emplace();
+ data.scroll = Input::DeviceClass::Scroll{};
auto& number = (*data.scroll).number;
auto& scroll_type = (*data.scroll).scroll_type;
auto& flags = (*data.scroll).flags;
@@ -696,7 +696,7 @@ void ReadEvent<Input::DeviceChangedEvent
}
}
if (CaseEq(data_expr, Input::DeviceClassType::Touch)) {
- data.touch.emplace();
+ data.touch = Input::DeviceClass::Touch{};
auto& mode = (*data.touch).mode;
auto& num_touches = (*data.touch).num_touches;
@@ -709,7 +709,7 @@ void ReadEvent<Input::DeviceChangedEvent
Read(&num_touches, &buf);
}
if (CaseEq(data_expr, Input::DeviceClassType::Gesture)) {
- data.gesture.emplace();
+ data.gesture = Input::DeviceClass::Gesture{};
auto& num_touches = (*data.gesture).num_touches;
// num_touches
@@ -2187,7 +2187,7 @@ std::unique_ptr<Input::ListInputDevicesR
// info
auto info_expr = class_id;
if (CaseEq(info_expr, Input::InputClass::Key)) {
- info.key.emplace();
+ info.key = Input::InputInfo::Key{};
auto& min_keycode = (*info.key).min_keycode;
auto& max_keycode = (*info.key).max_keycode;
auto& num_keys = (*info.key).num_keys;
@@ -2205,14 +2205,14 @@ std::unique_ptr<Input::ListInputDevicesR
Pad(&buf, 2);
}
if (CaseEq(info_expr, Input::InputClass::Button)) {
- info.button.emplace();
+ info.button = Input::InputInfo::Button{};
auto& num_buttons = (*info.button).num_buttons;
// num_buttons
Read(&num_buttons, &buf);
}
if (CaseEq(info_expr, Input::InputClass::Valuator)) {
- info.valuator.emplace();
+ info.valuator = Input::InputInfo::Valuator{};
uint8_t axes_len{};
auto& mode = (*info.valuator).mode;
auto& motion_size = (*info.valuator).motion_size;
@@ -3818,7 +3818,7 @@ std::unique_ptr<Input::GetFeedbackContro
// data
auto data_expr = class_id;
if (CaseEq(data_expr, Input::FeedbackClass::Keyboard)) {
- data.keyboard.emplace();
+ data.keyboard = x11::Input::FeedbackState::Keyboard{};
auto& pitch = (*data.keyboard).pitch;
auto& duration = (*data.keyboard).duration;
auto& led_mask = (*data.keyboard).led_mask;
@@ -3859,7 +3859,7 @@ std::unique_ptr<Input::GetFeedbackContro
}
}
if (CaseEq(data_expr, Input::FeedbackClass::Pointer)) {
- data.pointer.emplace();
+ data.pointer = x11::Input::FeedbackState::Pointer{};
auto& accel_num = (*data.pointer).accel_num;
auto& accel_denom = (*data.pointer).accel_denom;
auto& threshold = (*data.pointer).threshold;
@@ -3877,7 +3877,7 @@ std::unique_ptr<Input::GetFeedbackContro
Read(&threshold, &buf);
}
if (CaseEq(data_expr, Input::FeedbackClass::String)) {
- data.string.emplace();
+ data.string = x11::Input::FeedbackState::String{};
auto& max_symbols = (*data.string).max_symbols;
uint16_t num_keysyms{};
auto& keysyms = (*data.string).keysyms;
@@ -3896,7 +3896,7 @@ std::unique_ptr<Input::GetFeedbackContro
}
}
if (CaseEq(data_expr, Input::FeedbackClass::Integer)) {
- data.integer.emplace();
+ data.integer = x11::Input::FeedbackState::Integer{};
auto& resolution = (*data.integer).resolution;
auto& min_value = (*data.integer).min_value;
auto& max_value = (*data.integer).max_value;
@@ -3911,7 +3911,7 @@ std::unique_ptr<Input::GetFeedbackContro
Read(&max_value, &buf);
}
if (CaseEq(data_expr, Input::FeedbackClass::Led)) {
- data.led.emplace();
+ data.led = x11::Input::FeedbackState::Led{};
auto& led_mask = (*data.led).led_mask;
auto& led_values = (*data.led).led_values;
@@ -3922,7 +3922,7 @@ std::unique_ptr<Input::GetFeedbackContro
Read(&led_values, &buf);
}
if (CaseEq(data_expr, Input::FeedbackClass::Bell)) {
- data.bell.emplace();
+ data.bell = x11::Input::FeedbackState::Bell{};
auto& percent = (*data.bell).percent;
auto& pitch = (*data.bell).pitch;
auto& duration = (*data.bell).duration;
@@ -4735,7 +4735,7 @@ std::unique_ptr<Input::QueryDeviceStateR
// data
auto data_expr = class_id;
if (CaseEq(data_expr, Input::InputClass::Key)) {
- data.key.emplace();
+ data.key = x11::Input::InputState::Key{};
auto& num_keys = (*data.key).num_keys;
auto& keys = (*data.key).keys;
@@ -4752,7 +4752,7 @@ std::unique_ptr<Input::QueryDeviceStateR
}
}
if (CaseEq(data_expr, Input::InputClass::Button)) {
- data.button.emplace();
+ data.button = x11::Input::InputState::Button{};
auto& num_buttons = (*data.button).num_buttons;
auto& buttons = (*data.button).buttons;
@@ -4769,7 +4769,7 @@ std::unique_ptr<Input::QueryDeviceStateR
}
}
if (CaseEq(data_expr, Input::InputClass::Valuator)) {
- data.valuator.emplace();
+ data.valuator = x11::Input::InputState::Valuator{};
uint8_t num_valuators{};
auto& mode = (*data.valuator).mode;
auto& valuators = (*data.valuator).valuators;
@@ -5039,7 +5039,7 @@ std::unique_ptr<Input::GetDeviceControlR
// data
auto data_expr = control_id;
if (CaseEq(data_expr, Input::DeviceControl::resolution)) {
- data.resolution.emplace();
+ data.resolution = x11::Input::DeviceState::Resolution{};
uint32_t num_valuators{};
auto& resolution_values = (*data.resolution).resolution_values;
auto& resolution_min = (*data.resolution).resolution_min;
@@ -5070,7 +5070,7 @@ std::unique_ptr<Input::GetDeviceControlR
}
}
if (CaseEq(data_expr, Input::DeviceControl::abs_calib)) {
- data.abs_calib.emplace();
+ data.abs_calib = x11::Input::DeviceState::AbsCalib{};
auto& min_x = (*data.abs_calib).min_x;
auto& max_x = (*data.abs_calib).max_x;
auto& min_y = (*data.abs_calib).min_y;
@@ -5105,7 +5105,7 @@ std::unique_ptr<Input::GetDeviceControlR
Read(&button_threshold, &buf);
}
if (CaseEq(data_expr, Input::DeviceControl::core)) {
- data.core.emplace();
+ data.core = x11::Input::DeviceState::Core{};
auto& status = (*data.core).status;
auto& iscore = (*data.core).iscore;
@@ -5119,7 +5119,7 @@ std::unique_ptr<Input::GetDeviceControlR
Pad(&buf, 2);
}
if (CaseEq(data_expr, Input::DeviceControl::enable)) {
- data.enable.emplace();
+ data.enable = x11::Input::DeviceState::Enable{};
auto& enable = (*data.enable).enable;
// enable
@@ -5129,7 +5129,7 @@ std::unique_ptr<Input::GetDeviceControlR
Pad(&buf, 3);
}
if (CaseEq(data_expr, Input::DeviceControl::abs_area)) {
- data.abs_area.emplace();
+ data.abs_area = x11::Input::DeviceState::AbsArea{};
auto& offset_x = (*data.abs_area).offset_x;
auto& offset_y = (*data.abs_area).offset_y;
auto& width = (*data.abs_area).width;
@@ -6610,7 +6610,7 @@ std::unique_ptr<Input::XIQueryDeviceRepl
// data
auto data_expr = type;
if (CaseEq(data_expr, Input::DeviceClassType::Key)) {
- data.key.emplace();
+ data.key = Input::DeviceClass::Key{};
uint16_t num_keys{};
auto& keys = (*data.key).keys;
@@ -6625,7 +6625,7 @@ std::unique_ptr<Input::XIQueryDeviceRepl
}
}
if (CaseEq(data_expr, Input::DeviceClassType::Button)) {
- data.button.emplace();
+ data.button = Input::DeviceClass::Button{};
uint16_t num_buttons{};
auto& state = (*data.button).state;
auto& labels = (*data.button).labels;
@@ -6648,7 +6648,7 @@ std::unique_ptr<Input::XIQueryDeviceRepl
}
}
if (CaseEq(data_expr, Input::DeviceClassType::Valuator)) {
- data.valuator.emplace();
+ data.valuator = Input::DeviceClass::Valuator{};
auto& number = (*data.valuator).number;
auto& label = (*data.valuator).label;
auto& min = (*data.valuator).min;
@@ -6711,7 +6711,7 @@ std::unique_ptr<Input::XIQueryDeviceRepl
Pad(&buf, 3);
}
if (CaseEq(data_expr, Input::DeviceClassType::Scroll)) {
- data.scroll.emplace();
+ data.scroll = Input::DeviceClass::Scroll{};
auto& number = (*data.scroll).number;
auto& scroll_type = (*data.scroll).scroll_type;
auto& flags = (*data.scroll).flags;
@@ -6746,7 +6746,7 @@ std::unique_ptr<Input::XIQueryDeviceRepl
}
}
if (CaseEq(data_expr, Input::DeviceClassType::Touch)) {
- data.touch.emplace();
+ data.touch = Input::DeviceClass::Touch{};
auto& mode = (*data.touch).mode;
auto& num_touches = (*data.touch).num_touches;
@@ -6759,7 +6759,7 @@ std::unique_ptr<Input::XIQueryDeviceRepl
Read(&num_touches, &buf);
}
if (CaseEq(data_expr, Input::DeviceClassType::Gesture)) {
- data.gesture.emplace();
+ data.gesture = Input::DeviceClass::Gesture{};
auto& num_touches = (*data.gesture).num_touches;
// num_touches
diff -up chromium-126.0.6478.26/ui/gfx/x/generated_protos/xkb.cc.system-libstdc++ chromium-126.0.6478.26/ui/gfx/x/generated_protos/xkb.cc
--- chromium-126.0.6478.26/ui/gfx/x/generated_protos/xkb.cc.system-libstdc++ 2024-05-29 18:02:32.000000000 +0200
+++ chromium-126.0.6478.26/ui/gfx/x/generated_protos/xkb.cc 2024-06-02 23:51:25.570917345 +0200
@@ -2344,7 +2344,7 @@ std::unique_ptr<Xkb::GetMapReply> detail
// map
auto map_expr = present;
if (CaseAnd(map_expr, Xkb::MapPart::KeyTypes)) {
- map.types_rtrn.emplace();
+ map.types_rtrn = std::vector<Xkb::KeyType>{};
auto& types_rtrn = *map.types_rtrn;
// types_rtrn
@@ -5207,7 +5207,7 @@ std::unique_ptr<Xkb::GetKbdByNameReply>
if (CaseAnd(replies_expr, Xkb::GBNDetail::Types) ||
CaseAnd(replies_expr, Xkb::GBNDetail::ClientSymbols) ||
CaseAnd(replies_expr, Xkb::GBNDetail::ServerSymbols)) {
- replies.types.emplace();
+ replies.types = Xkb::GetKbdByNameReply::Types{};
auto& getmap_type = (*replies.types).getmap_type;
auto& typeDeviceID = (*replies.types).typeDeviceID;
auto& getmap_sequence = (*replies.types).getmap_sequence;
@@ -5626,7 +5626,7 @@ std::unique_ptr<Xkb::GetKbdByNameReply>
}
}
if (CaseAnd(replies_expr, Xkb::GBNDetail::CompatMap)) {
- replies.compat_map.emplace();
+ replies.compat_map = Xkb::GetKbdByNameReply::CompatMap{};
auto& compatmap_type = (*replies.compat_map).compatmap_type;
auto& compatDeviceID = (*replies.compat_map).compatDeviceID;
auto& compatmap_sequence = (*replies.compat_map).compatmap_sequence;
@@ -5747,7 +5747,7 @@ std::unique_ptr<Xkb::GetKbdByNameReply>
}
}
if (CaseAnd(replies_expr, Xkb::GBNDetail::IndicatorMaps)) {
- replies.indicator_maps.emplace();
+ replies.indicator_maps = Xkb::GetKbdByNameReply::IndicatorMaps{};
auto& indicatormap_type = (*replies.indicator_maps).indicatormap_type;
auto& indicatorDeviceID = (*replies.indicator_maps).indicatorDeviceID;
auto& indicatormap_sequence =
@@ -5840,7 +5840,7 @@ std::unique_ptr<Xkb::GetKbdByNameReply>
}
if (CaseAnd(replies_expr, Xkb::GBNDetail::KeyNames) ||
CaseAnd(replies_expr, Xkb::GBNDetail::OtherNames)) {
- replies.key_names.emplace();
+ replies.key_names = Xkb::GetKbdByNameReply::KeyNames{};
auto& keyname_type = (*replies.key_names).keyname_type;
auto& keyDeviceID = (*replies.key_names).keyDeviceID;
auto& keyname_sequence = (*replies.key_names).keyname_sequence;
@@ -6087,7 +6087,7 @@ std::unique_ptr<Xkb::GetKbdByNameReply>
}
}
if (CaseAnd(replies_expr, Xkb::GBNDetail::Geometry)) {
- replies.geometry.emplace();
+ replies.geometry = Xkb::GetKbdByNameReply::Geometry{};
auto& geometry_type = (*replies.geometry).geometry_type;
auto& geometryDeviceID = (*replies.geometry).geometryDeviceID;
auto& geometry_sequence = (*replies.geometry).geometry_sequence;

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

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