import chromium-122.0.6261.128-1.el8

i8ce changed/i8ce/chromium-122.0.6261.128-1.el8
MSVSphere Packaging Team 9 months ago
parent 40e741c0b6
commit 7b635873d0

@ -1,8 +1,5 @@
4599a68d92690b24e583966e47cec2d908f1f97a SOURCES/chromium-121.0.6167.184.tar.xz
dea187019741602d57aaf189a80abba261fbd2aa SOURCES/linux-x64-0.19.2.tgz
8e7fe8dd9ce8087ad1ecb87269149807a72952ae SOURCES/chromium-122.0.6261.128-clean.tar.xz
7e5d2c7864c5c83ec789b59c77cd9c20d2594916 SOURCES/linux-arm64-0.19.2.tgz
769196d081c6a0ad37f1c63dec56febfff3370de SOURCES/node-v20.6.1-linux-x64.tar.xz
dea187019741602d57aaf189a80abba261fbd2aa SOURCES/linux-x64-0.19.2.tgz
3e94bb4f999c636293bc745b02d98e7925da5616 SOURCES/node-v20.6.1-linux-arm64.tar.xz
8e9bc55cce3899627b2810ecfe87116c5a9147b5 SOURCES/chromium-browser-gost-icons.tar.xz
3492a65d81b8b01d419eb15bd8dc68d23f210bc9 SOURCES/Chromium-Gost-be00390a8bd3cf445bcaaeccada3324f4e1067b3.tar.xz
8217473520ee01277f8279bb69877fe12be3818b SOURCES/msspi-6a2dba691dfcaa7a17aace6f798b8d5024631489.tar.xz
769196d081c6a0ad37f1c63dec56febfff3370de SOURCES/node-v20.6.1-linux-x64.tar.xz

9
.gitignore vendored

@ -1,8 +1,5 @@
SOURCES/chromium-121.0.6167.184.tar.xz
SOURCES/linux-x64-0.19.2.tgz
SOURCES/chromium-122.0.6261.128-clean.tar.xz
SOURCES/linux-arm64-0.19.2.tgz
SOURCES/node-v20.6.1-linux-x64.tar.xz
SOURCES/linux-x64-0.19.2.tgz
SOURCES/node-v20.6.1-linux-arm64.tar.xz
SOURCES/chromium-browser-gost-icons.tar.xz
SOURCES/Chromium-Gost-be00390a8bd3cf445bcaaeccada3324f4e1067b3.tar.xz
SOURCES/msspi-6a2dba691dfcaa7a17aace6f798b8d5024631489.tar.xz
SOURCES/node-v20.6.1-linux-x64.tar.xz

File diff suppressed because it is too large Load Diff

@ -0,0 +1,23 @@
From 61dcf0ff9603e8f5b0a859fb0837c51527ebae43 Mon Sep 17 00:00:00 2001
From: Colin Samples <colin.samples+git@gmail.com>
Date: Fri, 1 Nov 2019 11:50:52 -0400
Subject: [PATCH] Add PPC64 support for libdav1d
---
third_party/dav1d/BUILD.gn | 21 ++++++++++++++++++++
third_party/dav1d/generate_configs.py | 28 ++-------------------------
third_party/dav1d/generate_source.py | 2 ++
3 files changed, 25 insertions(+), 26 deletions(-)
Index: chromium-120.0.6099.71/third_party/dav1d/generate_configs.py
===================================================================
--- chromium-120.0.6099.71.orig/third_party/dav1d/generate_configs.py
+++ chromium-120.0.6099.71/third_party/dav1d/generate_configs.py
@@ -203,6 +203,7 @@ def main():
linux_env = os.environ
linux_env['CC'] = 'clang'
+ GenerateConfig('config/linux/ppc64', linux_env)
GenerateConfig('config/linux/x64', linux_env)
noasm_dir = 'config/linux-noasm/x64'

@ -0,0 +1,57 @@
From 40309fb53e39477490fd6928ebe67c4fb78de380 Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawnanastasio@gmail.com>
Date: Sun, 10 Mar 2019 21:01:37 -0500
Subject: [PATCH] Add ppc64 target to libaom
---
third_party/libaom/BUILD.gn | 12 ++++++++++++
third_party/libaom/cmake_update.sh | 3 +++
2 files changed, 15 insertions(+)
Index: chromium-120.0.6099.71/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") {
}
}
+if (current_cpu == "ppc64") {
+ source_set("libaom_intrinsics_vsx") {
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ configs += [ ":libaom_config" ]
+ sources = [
+ "//third_party/libaom/source/libaom/aom_ports/ppc_cpudetect.c",
+ ]
+ sources += aom_av1_common_intrin_vsx
+ }
+}
+
static_library("libaom") {
check_includes = false
if (!is_debug && is_win) {
@@ -312,6 +324,9 @@ static_library("libaom") {
# This is needed by all arm boards due to aom_arm_cpu_caps()
sources += [ "source/libaom/aom_ports/aarch32_cpudetect.c" ]
}
+ if (current_cpu == "ppc64") {
+ deps += [ ":libaom_intrinsics_vsx" ]
+ }
if (is_android) {
deps += [ "//third_party/cpu_features:ndk_compat" ]
}
Index: chromium-120.0.6099.71/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}"
+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"/* \

@ -1,40 +0,0 @@
From 851e3ceb1021d1824557c7132ec6236c6232ccce Mon Sep 17 00:00:00 2001
From: Sergey Cherevko <s.cherevko@msvsphere.ru>
Date: Fri, 11 Aug 2023 16:03:17 +0300
Subject: [PATCH] Added Russian description and summary for gnome-software
---
.../chromium-browser.appdata.xml | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/chrome/installer/linux/common/chromium-browser/chromium-browser.appdata.xml b/chrome/installer/linux/common/chromium-browser/chromium-browser.appdata.xml
index e46c2624f..62e60cd3c 100644
--- a/chrome/installer/linux/common/chromium-browser/chromium-browser.appdata.xml
+++ b/chrome/installer/linux/common/chromium-browser/chromium-browser.appdata.xml
@@ -17,9 +17,20 @@
new generation of web applications.
</p>
<p>
- Chromium supports Vorbis, Theora, WebM and HTML5 audio and video standards, but
- does not include the non-free AAC, H.264, MP3 or Adobe Flash code that is found
- in Chrome.
+ Chromium supports Vorbis, Theora, WebM and HTML5 audio and video standards,
+ including AAC, H.264, MP3 and Wideine.
+ </p>
+ <p xml:lang="ru">
+ Chromium - это проект браузера с открытым исходным кодом, целью которого является
+ создание более безопасного, быстрого и стабильного способа работы в Интернете.
+ </p>
+ <p xml:lang="ru">
+ Мы приглашаем вас присоединиться к нашим усилиям по созданию мощной платформы для
+ разработки веб-приложений нового поколения.
+ </p>
+ <p xml:lang="ru">
+ Chromium поддерживает стандарты аудио и видео Vorbis, Theora, WebM и HTML5, включая
+ AAC, H.264, MP3 и Widevine.
</p>
</description>
<url type="homepage">https://www.chromium.org/Home</url>
--
2.41.0

@ -1,637 +0,0 @@
From cd262ed6e5143fde90e0f03d782815f87ad9d168 Mon Sep 17 00:00:00 2001
From: tigro <tigro@msvsphere-os.ru>
Date: Wed, 24 Jan 2024 13:28:09 +0300
Subject: [PATCH] Added Yandex search bar as default on newtab and new-tab-page
---
chrome/app/generated_resources.grd | 3 --
.../app/resources/generated_resources_be.xtb | 2 +-
.../resources/generated_resources_en-GB.xtb | 2 +-
.../app/resources/generated_resources_ru.xtb | 2 +-
.../app/resources/generated_resources_uk.xtb | 2 +-
chrome/browser/history/top_sites_factory.cc | 4 +--
.../resources/new_tab_page/lens_form.html | 1 +
.../resources/new_tab_page/lens_form.ts | 19 ++++++++++++-
.../new_tab_page/lens_upload_dialog.html | 10 +++----
.../browser/resources/new_tab_page/logo.html | 5 +---
chrome/browser/resources/new_tab_page/logo.ts | 2 +-
.../new_tab_page/realbox/realbox.html | 7 +++++
chrome/browser/search/search.cc | 7 +++++
chrome/browser/search/search.h | 2 ++
.../ui/webui/new_tab_page/new_tab_page_ui.cc | 5 ++++
components/search/search.cc | 14 ++++++++++
components/search/search.h | 7 +++++
components/search_engines/keyword_table.cc | 4 +++
.../search_engines/prepopulated_engines.json | 21 +++++++-------
.../search_engines/template_url_data_util.cc | 6 +++-
.../template_url_prepopulate_data.cc | 28 +++++++++++++++----
21 files changed, 117 insertions(+), 36 deletions(-)
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index ef461fb3ce..838886d275 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -7514,13 +7514,10 @@ Keep your key file in a safe place. You will need it to create new versions of y
<!-- NTP -->
<message name="IDS_GOOGLE_SEARCH_BOX_EMPTY_HINT" desc="The text displayed in the fakebox (on the New Tab page) when it is empty, and Google is the default search engine.">
- Search Google or type URL
</message>
<message name="IDS_GOOGLE_SEARCH_BOX_EMPTY_HINT_MD" desc="The text displayed in the fakebox (on the New Tab page) when it is empty, Google is the default search engine, and the Material Design UI is enabled.">
- Search Google or type a URL
</message>
<message name="IDS_GOOGLE_SEARCH_BOX_EMPTY_HINT_SHORT" desc="The text displayed in the fakebox (on the New Tab page) when it is empty, Google is the default search engine, and short hint text is enabled.">
- Search Google
</message>
<message name="IDS_NTP_CUSTOM_LINKS_ADD_SHORTCUT_TOOLTIP" desc="The tooltip for adding a custom link shortcut. (On the New Tab Page)">
Add shortcut
diff --git a/chrome/app/resources/generated_resources_be.xtb b/chrome/app/resources/generated_resources_be.xtb
index 9e28f256f0..4c05572d7e 100644
--- a/chrome/app/resources/generated_resources_be.xtb
+++ b/chrome/app/resources/generated_resources_be.xtb
@@ -8979,7 +8979,7 @@
<translation id="8048728378294435881">Стварайце рэзервовыя копіі сваіх даных, каб іх можна было выкарыстоўваць на іншых прыладах</translation>
<translation id="8048977114738515028">Стварыце ярлык на працоўным стале прылады, каб мець прамы доступ да гэтага профілю</translation>
<translation id="8049029041626250638">Падключыце клавіятуру або мыш. Калі вы выкарыстоўваеце прылады з Bluetooth, упэўніцеся, што яны гатовыя да спалучэння.</translation>
-<translation id="8049122382261047457">Шукайце відарысы з дапамогай Google Аб'ектыва</translation>
+<translation id="8049122382261047457">Шукайце відарысы</translation>
<translation id="8049705080247101012">У Google пашырэнне "<ph name="EXTENSION_NAME" />" абазначана як шкоднае. Яго ўсталяванне было прадухілена</translation>
<translation id="8049948037269924837">Адваротная прагортка сэнсарнай панэллю</translation>
<translation id="8050038245906040378">Камерцыйнае падпісванне кода ў Microsoft</translation>
diff --git a/chrome/app/resources/generated_resources_en-GB.xtb b/chrome/app/resources/generated_resources_en-GB.xtb
index 400a5d3cd6..01925039b9 100644
--- a/chrome/app/resources/generated_resources_en-GB.xtb
+++ b/chrome/app/resources/generated_resources_en-GB.xtb
@@ -8994,7 +8994,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
<translation id="8048728378294435881">Back up your stuff and use it on any device</translation>
<translation id="8048977114738515028">Create a desktop shortcut on your device to access directly to this profile</translation>
<translation id="8049029041626250638">Connect a keyboard or mouse. If you are using Bluetooth devices, make sure that your devices are ready to pair.</translation>
-<translation id="8049122382261047457">Search any image with Google Lens</translation>
+<translation id="8049122382261047457">Search any image</translation>
<translation id="8049705080247101012">Google has flagged '<ph name="EXTENSION_NAME" />' as malicious, and installation has been prevented</translation>
<translation id="8049948037269924837">Touchpad reverse scrolling</translation>
<translation id="8050038245906040378">Microsoft Commercial Code Signing</translation>
diff --git a/chrome/app/resources/generated_resources_ru.xtb b/chrome/app/resources/generated_resources_ru.xtb
index 5a326f9534..6bdd77f1fc 100644
--- a/chrome/app/resources/generated_resources_ru.xtb
+++ b/chrome/app/resources/generated_resources_ru.xtb
@@ -8985,7 +8985,7 @@
<translation id="8048728378294435881">Создайте резервную копию данных и используйте их на любом устройстве.</translation>
<translation id="8048977114738515028">Чтобы быстро переключаться на этот профиль, создайте ярлык на рабочем столе</translation>
<translation id="8049029041626250638">Подключите мышь или клавиатуру. Если вы используете устройства Bluetooth, убедитесь, что они готовы к подключению.</translation>
-<translation id="8049122382261047457">Ищите по изображениям с Google Объективом</translation>
+<translation id="8049122382261047457">Ищите по изображениям</translation>
<translation id="8049705080247101012">Google заблокировал установку потенциально опасной программы (<ph name="EXTENSION_NAME" />).</translation>
<translation id="8049948037269924837">Обратное направление прокрутки с помощью сенсорной панели</translation>
<translation id="8050038245906040378">Подписывание коммерческого кода Microsoft</translation>
diff --git a/chrome/app/resources/generated_resources_uk.xtb b/chrome/app/resources/generated_resources_uk.xtb
index ecc3988cce..8e6e574e6f 100644
--- a/chrome/app/resources/generated_resources_uk.xtb
+++ b/chrome/app/resources/generated_resources_uk.xtb
@@ -8999,7 +8999,7 @@
<translation id="8048728378294435881">Створюйте резервні копії даних і використовуйте їх на будь-якому пристрої</translation>
<translation id="8048977114738515028">Створити ярлик на робочому столі, щоб відразу переходити до цього профілю</translation>
<translation id="8049029041626250638">Підключіть клавіатуру або мишу. Якщо ви користуєтеся пристроями з Bluetooth, переконайтеся, що вони готові до підключення.</translation>
-<translation id="8049122382261047457">Шукайте будь-яке зображення через Google Об’єктив</translation>
+<translation id="8049122382261047457">Шукайте будь-яке зображення</translation>
<translation id="8049705080247101012">Система Google позначила розширення <ph name="EXTENSION_NAME" /> як шкідливе та заборонила встановлення</translation>
<translation id="8049948037269924837">Зворотне прокручування на сенсорній панелі</translation>
<translation id="8050038245906040378">Підписування комерційного коду Microsoft</translation>
diff --git a/chrome/browser/history/top_sites_factory.cc b/chrome/browser/history/top_sites_factory.cc
index 55d07e905b..70c6e15cfb 100644
--- a/chrome/browser/history/top_sites_factory.cc
+++ b/chrome/browser/history/top_sites_factory.cc
@@ -54,7 +54,7 @@ struct RawPrepopulatedPage {
// roughly match favicon).
};
-#if !BUILDFLAG(IS_ANDROID)
+#if !BUILDFLAG(IS_ANDROID) && 0 // no prepopulated
// Android does not use prepopulated pages.
const RawPrepopulatedPage kRawPrepopulatedPages[] = {
{
@@ -69,7 +69,7 @@ const RawPrepopulatedPage kRawPrepopulatedPages[] = {
void InitializePrepopulatedPageList(
Profile* profile,
history::PrepopulatedPageList* prepopulated_pages) {
-#if !BUILDFLAG(IS_ANDROID)
+#if !BUILDFLAG(IS_ANDROID) && 0 // no prepopulated
DCHECK(prepopulated_pages);
PrefService* pref_service = profile->GetPrefs();
bool hide_web_store_icon =
diff --git a/chrome/browser/resources/new_tab_page/lens_form.html b/chrome/browser/resources/new_tab_page/lens_form.html
index b35fd09415..0e92d175b8 100644
--- a/chrome/browser/resources/new_tab_page/lens_form.html
+++ b/chrome/browser/resources/new_tab_page/lens_form.html
@@ -18,6 +18,7 @@
<form id="urlForm"
action="[[uploadUrlAction_]]"
method="GET">
+ <input name="rpt" value="imageview"></input>
<input name="url" value="[[uploadUrl_]]"></input>
<input name="ep" value="[[uploadUrlEntrypoint_]]"></input>
<input name="hl" value="[[language_]]"></input>
diff --git a/chrome/browser/resources/new_tab_page/lens_form.ts b/chrome/browser/resources/new_tab_page/lens_form.ts
index aaf2da3675..cd71c76b08 100644
--- a/chrome/browser/resources/new_tab_page/lens_form.ts
+++ b/chrome/browser/resources/new_tab_page/lens_form.ts
@@ -11,11 +11,14 @@ import {getTemplate} from './lens_form.html.js';
/** Lens service endpoint for the Upload by File action. */
const SCOTTY_UPLOAD_FILE_ACTION: string = 'https://lens.google.com/upload';
const DIRECT_UPLOAD_FILE_ACTION: string = 'https://lens.google.com/v3/upload';
+const SCOTTY_UPLOAD_FILE_ACTION_YA: string = 'https://yandex.ru/images/search';
+const DIRECT_UPLOAD_FILE_ACTION_YA: string = 'https://yandex.ru/images/search';
/** Entrypoint for the upload by file action. */
const UPLOAD_FILE_ENTRYPOINT: string = 'cntpubb';
/** Lens service endpoint for the Upload by URL action. */
+const UPLOAD_BY_URL_ACTION_YA: string = 'https://yandex.ru/images/search';
const UPLOAD_BY_URL_ACTION: string = 'https://lens.google.com/uploadbyurl';
/** Entrypoint for the upload by url action. */
@@ -73,6 +76,7 @@ export class LensFormElement extends PolymerElement {
}
static get properties() {
+ let isYandex = loadTimeData.getBoolean('googleLensForYandex');
return {
supportedFileTypes_: {
type: String,
@@ -98,7 +102,7 @@ export class LensFormElement extends PolymerElement {
uploadUrlAction_: {
type: String,
readOnly: true,
- value: UPLOAD_BY_URL_ACTION,
+ value: ((isYandex == true)?UPLOAD_BY_URL_ACTION_YA:UPLOAD_BY_URL_ACTION),
},
uploadUrl_: String,
uploadUrlEntrypoint_: {
@@ -116,6 +120,11 @@ export class LensFormElement extends PolymerElement {
readOnly: true,
value: loadTimeData.getString('realboxLensVariations'),
},
+ useYandexForPics_: {
+ type: Boolean,
+ readOnly: true,
+ value: isYandex,
+ },
};
}
@@ -125,6 +134,7 @@ export class LensFormElement extends PolymerElement {
private startTime_: string|null = null;
private clientData_: string;
private useDirectUpload_: boolean;
+ private isYandexProp_: boolean = loadTimeData.getBoolean('googleLensForYandex');
openSystemFilePicker() {
this.$.fileInput.click();
@@ -152,6 +162,11 @@ export class LensFormElement extends PolymerElement {
}
private async submitFile_(file: File) {
+
+ if (this.isYandexProp_ == true) {
+ return;
+ } else {
+
if (!SUPPORTED_FILE_TYPES.includes(file.type)) {
this.dispatchError_(LensErrorType.FILE_TYPE);
return;
@@ -193,8 +208,10 @@ export class LensFormElement extends PolymerElement {
processedFile.imageWidth ? processedFile.imageWidth.toString() : '');
this.uploadFileAction_ = action.toString();
+
this.dispatchLoading_(LensSubmitType.FILE);
this.$.fileForm.submit();
+ }
}
submitUrl(urlString: string) {
diff --git a/chrome/browser/resources/new_tab_page/lens_upload_dialog.html b/chrome/browser/resources/new_tab_page/lens_upload_dialog.html
index 71e6ef74b9..8e787ee6c7 100644
--- a/chrome/browser/resources/new_tab_page/lens_upload_dialog.html
+++ b/chrome/browser/resources/new_tab_page/lens_upload_dialog.html
@@ -98,7 +98,7 @@
display: flex;
flex-direction: column;
flex-grow: 1;
- height: 280px;
+ height: 110px;
padding: 20px;
position: relative;
width: 100%;
@@ -364,7 +364,7 @@
</template>
<!-- Normal state -->
<template is="dom-if" if="{{isNormalOrError_}}">
- <div class="drag-drop-title-container">
+ <!--<div class="drag-drop-title-container">
<div id="dragDropIllustration"></div>
<div class="drag-drop-title">
<span id="dragText">$i18n{lensSearchUploadDialogDragTitle}</span>
@@ -373,13 +373,13 @@
$i18n{lensSearchUploadDialogUploadFileTitle}
</span>
</div>
- </div>
+ </div>//-->
<div id="urlUploadContainer">
- <div id="sectionDivider">
+ <!--<div id="sectionDivider">
<div class="divider-line"></div>
<div id="orLabel">$i18n{lensSearchUploadDialogOrText}</div>
<div class="divider-line"></div>
- </div>
+ </div>//-->
<div id="inputContainer">
<input id="inputBox" autocomplete="false" autocorrect="false"
placeholder="$i18n{lensSearchUploadDialogTextPlaceholder}"
diff --git a/chrome/browser/resources/new_tab_page/logo.html b/chrome/browser/resources/new_tab_page/logo.html
index f1bf028553..1bc12e7588 100644
--- a/chrome/browser/resources/new_tab_page/logo.html
+++ b/chrome/browser/resources/new_tab_page/logo.html
@@ -23,10 +23,7 @@
}
:host([single-colored]) #logo {
- -webkit-mask-image: url(./icons/google_logo.svg);
- -webkit-mask-repeat: no-repeat;
- -webkit-mask-size: 100%;
- background-color: var(--ntp-logo-color);
+ background-image: url(./icons/google_logo.svg);
}
:host(:not([single-colored])) #logo {
diff --git a/chrome/browser/resources/new_tab_page/logo.ts b/chrome/browser/resources/new_tab_page/logo.ts
index 20a2a2aa1e..eab610aef8 100644
--- a/chrome/browser/resources/new_tab_page/logo.ts
+++ b/chrome/browser/resources/new_tab_page/logo.ts
@@ -256,7 +256,7 @@ export class LogoElement extends PolymerElement {
}
private computeShowLogo_(): boolean {
- return !!this.loaded_ && !this.showDoodle_;
+ return false; //!!this.loaded_ && !this.showDoodle_;
}
private computeShowDoodle_(): boolean {
diff --git a/chrome/browser/resources/new_tab_page/realbox/realbox.html b/chrome/browser/resources/new_tab_page/realbox/realbox.html
index a3114401e1..78fc32dadc 100644
--- a/chrome/browser/resources/new_tab_page/realbox/realbox.html
+++ b/chrome/browser/resources/new_tab_page/realbox/realbox.html
@@ -1,4 +1,11 @@
<style include="cr-icons">
+ #voiceSearchButton {
+ visibility: hidden;
+ }
+ #lensSearchButton {
+ visibility: visible;
+ }
+
:host {
--cr-realbox-height: 44px;
--cr-realbox-min-width: var(--ntp-search-box-width);
diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc
index 3e0db181ac..0843b2ef36 100644
--- a/chrome/browser/search/search.cc
+++ b/chrome/browser/search/search.cc
@@ -179,6 +179,8 @@ struct NewTabURLDetails {
#if BUILDFLAG(IS_ANDROID)
const GURL local_url;
+ #elif 1 // Always use built-in NTp page
+ const GURL local_url(chrome::kChromeUINewTabPageURL);
#else
const bool default_is_google = DefaultSearchProviderIsGoogle(profile);
const GURL local_url(default_is_google
@@ -245,6 +247,11 @@ bool DefaultSearchProviderIsGoogle(Profile* profile) {
TemplateURLServiceFactory::GetForProfile(profile));
}
+bool DefaultSearchProviderIsYandex(Profile* profile) {
+ return DefaultSearchProviderIsYandex(
+ TemplateURLServiceFactory::GetForProfile(profile));
+}
+
bool IsNTPOrRelatedURL(const GURL& url, Profile* profile) {
if (!url.is_valid()) {
return false;
diff --git a/chrome/browser/search/search.h b/chrome/browser/search/search.h
index c7ae65114f..5859d72731 100644
--- a/chrome/browser/search/search.h
+++ b/chrome/browser/search/search.h
@@ -21,6 +21,8 @@ namespace search {
// Returns whether Google is selected as the default search engine.
bool DefaultSearchProviderIsGoogle(Profile* profile);
+bool DefaultSearchProviderIsYandex(Profile* profile);
+
// Returns true if |url| corresponds to a New Tab page or its service worker.
bool IsNTPOrRelatedURL(const GURL& url, Profile* profile);
diff --git a/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc b/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc
index d9b6c3500f..a2b1bfb9df 100644
--- a/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc
+++ b/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc
@@ -36,6 +36,7 @@
#include "chrome/browser/search/background/ntp_custom_background_service_factory.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/search_provider_logos/logo_service_factory.h"
+#include "chrome/browser/search/search.h"
#include "chrome/browser/signin/identity_manager_factory.h"
#include "chrome/browser/sync/sync_service_factory.h"
#include "chrome/browser/themes/theme_service_factory.h"
@@ -621,6 +622,10 @@ content::WebUIDataSource* CreateAndAddNewTabPageUiHtmlSource(Profile* profile) {
source->AddBoolean("historyClustersModuleDiscountsEnabled",
base::FeatureList::IsEnabled(
ntp_features::kNtpHistoryClustersModuleDiscounts));
+
+ source->AddBoolean(
+ "googleLensForYandex",
+ search::DefaultSearchProviderIsYandex(profile));
webui::SetupChromeRefresh2023(source);
diff --git a/components/search/search.cc b/components/search/search.cc
index a7167fae92..67d36156c5 100644
--- a/components/search/search.cc
+++ b/components/search/search.cc
@@ -34,4 +34,18 @@ bool TemplateURLIsGoogle(const TemplateURL* template_url,
template_url->GetEngineType(search_terms_data) == SEARCH_ENGINE_GOOGLE;
}
+bool DefaultSearchProviderIsYandex(
+ const TemplateURLService* template_url_service) {
+ if (!template_url_service)
+ return false;
+ return TemplateURLIsYandex(template_url_service->GetDefaultSearchProvider(),
+ template_url_service->search_terms_data());
+}
+
+bool TemplateURLIsYandex(const TemplateURL* template_url,
+ const SearchTermsData& search_terms_data) {
+ return template_url != nullptr &&
+ template_url->GetEngineType(search_terms_data) == SEARCH_ENGINE_YANDEX;
+}
+
} // namespace search
diff --git a/components/search/search.h b/components/search/search.h
index 98572faa77..cfb6727848 100644
--- a/components/search/search.h
+++ b/components/search/search.h
@@ -22,6 +22,13 @@ bool DefaultSearchProviderIsGoogle(
// Returns whether supplied template URL is Google template URL.
bool TemplateURLIsGoogle(const TemplateURL* template_url,
const SearchTermsData& search_terms_data);
+
+bool DefaultSearchProviderIsYandex(
+ const TemplateURLService* template_url_service);
+
+// Returns whether supplied template URL is Google template URL.
+bool TemplateURLIsYandex(const TemplateURL* template_url,
+ const SearchTermsData& search_terms_data);
} // namespace search
#endif // COMPONENTS_SEARCH_SEARCH_H_
diff --git a/components/search_engines/keyword_table.cc b/components/search_engines/keyword_table.cc
index 5e616ec8b2..f0ffa97e6b 100644
--- a/components/search_engines/keyword_table.cc
+++ b/components/search_engines/keyword_table.cc
@@ -170,7 +170,9 @@ void BindURLToStatement(const TemplateURLData& data,
s->BindString(starting_column + 16, data.search_url_post_params);
s->BindString(starting_column + 17, data.suggestions_url_post_params);
s->BindString(starting_column + 18, data.image_url_post_params);
+#if 0 // Disable new tab overriding by search engines
s->BindString(starting_column + 19, data.new_tab_url);
+#endif
s->BindTime(starting_column + 20, data.last_visited);
s->BindBool(starting_column + 21, data.created_from_play_api);
s->BindInt(starting_column + 22, static_cast<int>(data.is_active));
@@ -521,7 +523,9 @@ bool KeywordTable::GetKeywordDataFromStatement(sql::Statement& s,
data->SetURL(s.ColumnString(4));
data->suggestions_url = s.ColumnString(10);
data->image_url = s.ColumnString(16);
+#if 0 // Disable new tab overriding by search engines
data->new_tab_url = s.ColumnString(20);
+#endif
data->search_url_post_params = s.ColumnString(17);
data->suggestions_url_post_params = s.ColumnString(18);
data->image_url_post_params = s.ColumnString(19);
diff --git a/components/search_engines/prepopulated_engines.json b/components/search_engines/prepopulated_engines.json
index 9f4e01c1bf..4574d793d2 100644
--- a/components/search_engines/prepopulated_engines.json
+++ b/components/search_engines/prepopulated_engines.json
@@ -639,7 +639,7 @@
"suggest_url": "https://suggest.yandex.by/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
"image_url": "https://yandex.by/images/search/?rpt=imageview",
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
- "new_tab_url": "https://www.yandex.by/chrome/newtab",
+ "new_tab_url": "chrome://new-tab-page",
"type": "SEARCH_ENGINE_YANDEX",
"id": 15
},
@@ -648,10 +648,11 @@
"name": "Yandex",
"keyword": "yandex.com",
"favicon_url": "https://yastatic.net/lego/_/rBTjd6UOPk5913OSn5ZQVYMTQWQ.ico",
- "search_url": "https://yandex.com/search/?text={searchTerms}&from=os&clid=1836588",
+ "search_url": "https://yandex.com/search/?text={searchTerms}from=os&{yandex:referralID}",
"suggest_url": "https://suggest.yandex.com/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}&uil=en&v=3&sn=5",
"image_url": "https://yandex.com/images/search?rpt=imageview",
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
+ "new_tab_url": "chrome://new-tab-page",
"type": "SEARCH_ENGINE_YANDEX",
"id": 15
},
@@ -661,11 +662,11 @@
"keyword": "yandex.kz",
"favicon_url": "https://yastatic.net/lego/_/pDu9OWAQKB0s2J9IojKpiS_Eho.ico",
"logo_url": "https://storage.ape.yandex.net/get/browser/Doodles/yandex/drawable-xxhdpi/yandex.png",
- "search_url": "https://yandex.kz/{yandex:searchPath}?text={searchTerms}",
+ "search_url": "https://yandex.kz/{yandex:searchPath}?text={searchTerms}&from=os&{yandex:referralID}",
"suggest_url": "https://suggest.yandex.kz/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
"image_url": "https://yandex.kz/images/search/?rpt=imageview",
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
- "new_tab_url": "https://www.yandex.kz/chrome/newtab",
+ "new_tab_url": "chrome://new-tab-page",
"type": "SEARCH_ENGINE_YANDEX",
"id": 15
},
@@ -675,11 +676,11 @@
"keyword": "yandex.ru",
"favicon_url": "https://yastatic.net/lego/_/pDu9OWAQKB0s2J9IojKpiS_Eho.ico",
"logo_url": "https://storage.ape.yandex.net/get/browser/Doodles/yandex/drawable-xxhdpi/yandex.png",
- "search_url": "https://yandex.ru/{yandex:searchPath}?text={searchTerms}&{yandex:referralID}",
+ "search_url": "https://yandex.ru/{yandex:searchPath}?text={searchTerms}&from=os&{yandex:referralID}",
"suggest_url": "https://suggest.yandex.ru/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
"image_url": "https://yandex.ru/images/search/?rpt=imageview",
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
- "new_tab_url": "https://www.yandex.ru/chrome/newtab",
+ "new_tab_url": "chrome://new-tab-page",
"type": "SEARCH_ENGINE_YANDEX",
"id": 15
},
@@ -688,11 +689,11 @@
"name": "Yandex",
"keyword": "yandex.com.tr",
"favicon_url": "https://yastatic.net/lego/_/rBTjd6UOPk5913OSn5ZQVYMTQWQ.ico",
- "search_url": "https://www.yandex.com.tr/{yandex:searchPath}?text={searchTerms}",
+ "search_url": "https://www.yandex.com.tr/{yandex:searchPath}?text={searchTerms}&from=os&{yandex:referralID}",
"suggest_url": "https://suggest.yandex.com.tr/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
"image_url": "https://yandex.com.tr/gorsel/search?rpt=imageview",
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
- "new_tab_url": "https://www.yandex.com.tr/chrome/newtab",
+ "new_tab_url": "chrome://new-tab-page",
"type": "SEARCH_ENGINE_YANDEX",
"id": 15
},
@@ -702,11 +703,11 @@
"keyword": "yandex.ua",
"favicon_url": "https://yastatic.net/lego/_/pDu9OWAQKB0s2J9IojKpiS_Eho.ico",
"logo_url": "https://storage.ape.yandex.net/get/browser/Doodles/yandex/drawable-xxhdpi/yandex.png",
- "search_url": "https://yandex.ua/{yandex:searchPath}?text={searchTerms}",
+ "search_url": "https://yandex.ua/{yandex:searchPath}?text={searchTerms}&from=os&{yandex:referralID}",
"suggest_url": "https://suggest.yandex.ua/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
"image_url": "https://yandex.ua/images/search/?rpt=imageview",
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
- "new_tab_url": "https://www.yandex.ua/chrome/newtab",
+ "new_tab_url": "chrome://new-tab-page",
"type": "SEARCH_ENGINE_YANDEX",
"id": 15
},
diff --git a/components/search_engines/template_url_data_util.cc b/components/search_engines/template_url_data_util.cc
index f81d966533..6188b52c47 100644
--- a/components/search_engines/template_url_data_util.cc
+++ b/components/search_engines/template_url_data_util.cc
@@ -71,10 +71,12 @@ std::unique_ptr<TemplateURLData> TemplateURLDataFromDictionary(
if (string_value) {
result->image_translate_url = *string_value;
}
+#if 0 // Disable new tab overriding by search engines
string_value = dict.FindString(DefaultSearchManager::kNewTabURL);
if (string_value) {
result->new_tab_url = *string_value;
}
+#endif
string_value = dict.FindString(DefaultSearchManager::kContextualSearchURL);
if (string_value) {
result->contextual_search_url = *string_value;
@@ -344,7 +346,7 @@ std::unique_ptr<TemplateURLData> TemplateURLDataFromPrepopulatedEngine(
ToStringPiece(engine.search_url), ToStringPiece(engine.suggest_url),
ToStringPiece(engine.image_url),
ToStringPiece(engine.image_translate_url),
- ToStringPiece(engine.new_tab_url),
+ base::StringPiece(), //ToStringPiece(engine.new_tab_url),
ToStringPiece(engine.contextual_search_url),
ToStringPiece(engine.logo_url), ToStringPiece(engine.doodle_url),
ToStringPiece(engine.search_url_post_params),
@@ -435,10 +437,12 @@ std::unique_ptr<TemplateURLData> TemplateURLDataFromOverrideDictionary(
if (string_value) {
image_translate_url = *string_value;
}
+#if 0 // Disable new tab overriding by search engines
string_value = engine_dict.FindString("new_tab_url");
if (string_value) {
new_tab_url = *string_value;
}
+#endif
string_value = engine_dict.FindString("contextual_search_url");
if (string_value) {
contextual_search_url = *string_value;
diff --git a/components/search_engines/template_url_prepopulate_data.cc b/components/search_engines/template_url_prepopulate_data.cc
index 05845f86a6..e7473c1850 100644
--- a/components/search_engines/template_url_prepopulate_data.cc
+++ b/components/search_engines/template_url_prepopulate_data.cc
@@ -61,6 +61,7 @@ struct EngineAndTier {
// Default (for countries with no better engine set)
constexpr EngineAndTier engines_default[] = {
+ {SearchEngineTier::kTopEngines, &yandex_com},
{SearchEngineTier::kTopEngines, &google},
{SearchEngineTier::kTopEngines, &bing},
{SearchEngineTier::kTopEngines, &yahoo},
@@ -214,8 +215,8 @@ constexpr EngineAndTier engines_BR[] = {
// Belarus
constexpr EngineAndTier engines_BY[] = {
- {SearchEngineTier::kTopEngines, &google},
{SearchEngineTier::kTopEngines, &yandex_by},
+ {SearchEngineTier::kTopEngines, &google},
{SearchEngineTier::kTopEngines, &bing},
{SearchEngineTier::kTopEngines, &duckduckgo},
{SearchEngineTier::kTopEngines, &mail_ru},
@@ -602,9 +603,9 @@ constexpr EngineAndTier engines_IN[] = {
// Iraq
constexpr EngineAndTier engines_IQ[] = {
+ {SearchEngineTier::kTopEngines, &yandex_tr},
{SearchEngineTier::kTopEngines, &google},
{SearchEngineTier::kTopEngines, &bing},
- {SearchEngineTier::kTopEngines, &yandex_tr},
{SearchEngineTier::kTopEngines, &yahoo},
{SearchEngineTier::kTopEngines, &duckduckgo},
};
@@ -707,8 +708,8 @@ constexpr EngineAndTier engines_KW[] = {
// Kazakhstan
constexpr EngineAndTier engines_KZ[] = {
- {SearchEngineTier::kTopEngines, &google},
{SearchEngineTier::kTopEngines, &yandex_kz},
+ {SearchEngineTier::kTopEngines, &google},
{SearchEngineTier::kTopEngines, &bing},
{SearchEngineTier::kTopEngines, &mail_ru},
{SearchEngineTier::kTopEngines, &yahoo},
@@ -1177,8 +1178,8 @@ constexpr EngineAndTier engines_TN[] = {
// Turkey
constexpr EngineAndTier engines_TR[] = {
- {SearchEngineTier::kTopEngines, &google},
{SearchEngineTier::kTopEngines, &yandex_tr},
+ {SearchEngineTier::kTopEngines, &google},
{SearchEngineTier::kTopEngines, &yahoo_tr},
{SearchEngineTier::kTopEngines, &bing},
{SearchEngineTier::kTopEngines, &duckduckgo},
@@ -1692,6 +1693,12 @@ GetPrepopulatedEnginesForEeaRegionCountries(int country_id,
current_number_of_engines++;
}
+
+ const auto itr =
+ base::ranges::find(t_urls, yandex_ru.id, &TemplateURLData::prepopulate_id);
+ if (itr == t_urls.end()) {
+ t_urls.push_back(TemplateURLDataFromPrepopulatedEngine(yandex_com));
+ }
return t_urls;
}
@@ -1818,12 +1825,23 @@ std::vector<std::unique_ptr<TemplateURLData>> GetPrepopulatedEngines(
}
}
}
+
if (default_search_provider_index) {
const auto itr =
- base::ranges::find(t_urls, google.id, &TemplateURLData::prepopulate_id);
+ base::ranges::find(t_urls, yandex_ru.id, &TemplateURLData::prepopulate_id);
*default_search_provider_index =
itr == t_urls.end() ? 0 : std::distance(t_urls.begin(), itr);
}
+
+ /* Making yandex_ru be the first in "const PrepopulatedEngine* const engines_RU[]"
+ * makes it be the first item in chrome://settings/search,
+ * but Google is still chosen by default.
+ * Removed code calculated the distance between 0 and Google's position
+ * and assign that position to default_search_provider_index,
+ * so that Google still was the default search engine.
+ * Instead, just use the first search engine as the default one.
+ */
+ //if (default_search_provider_index) *default_search_provider_index = 0;
return t_urls;
}
--
2.43.0

@ -0,0 +1,14 @@
Index: chromium-120.0.6099.71/third_party/highway/BUILD.gn
===================================================================
--- chromium-120.0.6099.71.orig/third_party/highway/BUILD.gn
+++ chromium-120.0.6099.71/third_party/highway/BUILD.gn
@@ -13,6 +13,9 @@ config("libhwy_external_config") {
# explicitly disabling AVX2 and AVX3 targets.
defines += [ "HWY_BROKEN_TARGETS=(HWY_AVX2|HWY_AVX3)" ]
}
+ if (target_cpu == "ppc64") {
+ defines += [ "TOOLCHAIN_MISS_ASM_HWCAP_H" ]
+ }
}
source_set("libhwy") {

@ -0,0 +1,33 @@
From e14024659e0fc2af3df6ec56ce39a8e93b75722d Mon Sep 17 00:00:00 2001
From: Colin Samples <colin.samples+git@gmail.com>
Date: Sun, 8 Dec 2019 19:25:02 -0500
Subject: [PATCH] Fix libdav1d compilation on clang ppc
---
src/ppc/dav1d_types.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)
Index: chromium-120.0.6099.71/third_party/dav1d/libdav1d/src/ppc/dav1d_types.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/dav1d/libdav1d/src/ppc/dav1d_types.h
+++ chromium-120.0.6099.71/third_party/dav1d/libdav1d/src/ppc/dav1d_types.h
@@ -51,4 +51,19 @@
#define u16l_to_i32(v) ((i32x4) vec_mergel((u16x8) v, vec_splat_u16(0)))
#define i16l_to_i32(v) ((i32x4) vec_unpackl((i16x8)v))
+#if defined(__clang__)
+#undef vec_splats
+#define vec_splats(N) \
+ _Generic((N), \
+ unsigned char: ((u8x16)(N)), \
+ signed char: ((i8x16)(N)), \
+ unsigned short: ((u16x8)(N)), \
+ signed short: ((i16x8)(N)), \
+ unsigned int: ((u32x4)(N)), \
+ signed int: ((i32x4)(N)), \
+ unsigned long long: ((u64x2)(N)), \
+ signed long long: ((i64x2)(N)) \
+ )
+#endif
+
#endif /* DAV1D_SRC_PPC_TYPES_H */

@ -0,0 +1,27 @@
From ea104a841fca1ff4d5430915f1b7c52c6a642f13 Mon Sep 17 00:00:00 2001
From: Timothy Pearson <tpearson@raptorengineering.com>
Date: Fri, 21 Sep 2018 21:44:17 -0500
Subject: [PATCH] Force baseline POWER8 / AltiVec / VSX CPU features when on a
PPC64 platform in LE mode
---
BUILD.gn | 6 ++++++
1 file changed, 6 insertions(+)
Index: chromium-120.0.6099.71/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" ]
+ 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") {

File diff suppressed because it is too large Load Diff

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

@ -1,145 +0,0 @@
From a3f478e7c8b93c6aad5db97f43560db46492c5ea Mon Sep 17 00:00:00 2001
From: tigro <arkadiy.sheyn@softline.com>
Date: Thu, 2 Nov 2023 18:55:06 +0300
Subject: [PATCH] Yandex as default search engine
---
.../search_engines/prepopulated_engines.json | 11 +++++----
.../template_url_prepopulate_data.cc | 24 +++++++++++--------
2 files changed, 20 insertions(+), 15 deletions(-)
diff --git a/components/search_engines/prepopulated_engines.json b/components/search_engines/prepopulated_engines.json
index 8ab6a40d2e..eded2b55e1 100644
--- a/components/search_engines/prepopulated_engines.json
+++ b/components/search_engines/prepopulated_engines.json
@@ -639,7 +639,7 @@
"suggest_url": "https://suggest.yandex.by/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
"image_url": "https://yandex.by/images/search/?rpt=imageview",
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
- "new_tab_url": "https://www.yandex.by/chrome/newtab",
+ "new_tab_url": "chrome://new-tab-page",
"type": "SEARCH_ENGINE_YANDEX",
"id": 15
},
@@ -652,6 +652,7 @@
"suggest_url": "https://suggest.yandex.com/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}&uil=en&v=3&sn=5",
"image_url": "https://yandex.com/images/search?rpt=imageview",
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
+ "new_tab_url": "chrome://new-tab-page",
"type": "SEARCH_ENGINE_YANDEX",
"id": 15
},
@@ -665,7 +666,7 @@
"suggest_url": "https://suggest.yandex.kz/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
"image_url": "https://yandex.kz/images/search/?rpt=imageview",
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
- "new_tab_url": "https://www.yandex.kz/chrome/newtab",
+ "new_tab_url": "chrome://new-tab-page",
"type": "SEARCH_ENGINE_YANDEX",
"id": 15
},
@@ -679,7 +680,7 @@
"suggest_url": "https://suggest.yandex.ru/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
"image_url": "https://yandex.ru/images/search/?rpt=imageview",
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
- "new_tab_url": "https://www.yandex.ru/chrome/newtab",
+ "new_tab_url": "chrome://new-tab-page",
"type": "SEARCH_ENGINE_YANDEX",
"id": 15
},
@@ -692,7 +693,7 @@
"suggest_url": "https://suggest.yandex.com.tr/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
"image_url": "https://yandex.com.tr/gorsel/search?rpt=imageview",
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
- "new_tab_url": "https://www.yandex.com.tr/chrome/newtab",
+ "new_tab_url": "chrome://new-tab-page",
"type": "SEARCH_ENGINE_YANDEX",
"id": 15
},
@@ -706,7 +707,7 @@
"suggest_url": "https://suggest.yandex.ua/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
"image_url": "https://yandex.ua/images/search/?rpt=imageview",
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
- "new_tab_url": "https://www.yandex.ua/chrome/newtab",
+ "new_tab_url": "chrome://new-tab-page",
"type": "SEARCH_ENGINE_YANDEX",
"id": 15
},
diff --git a/components/search_engines/template_url_prepopulate_data.cc b/components/search_engines/template_url_prepopulate_data.cc
index 315fa0bc59..08952eec6d 100644
--- a/components/search_engines/template_url_prepopulate_data.cc
+++ b/components/search_engines/template_url_prepopulate_data.cc
@@ -56,6 +56,7 @@ struct EngineAndTier {
// Default (for countries with no better engine set)
constexpr EngineAndTier engines_default[] = {
+ {SearchEngineTier::kTopEngines, &yandex_com},
{SearchEngineTier::kTopEngines, &google},
{SearchEngineTier::kTopEngines, &bing},
{SearchEngineTier::kTopEngines, &yahoo},
@@ -209,8 +210,8 @@ constexpr EngineAndTier engines_BR[] = {
// Belarus
constexpr EngineAndTier engines_BY[] = {
- {SearchEngineTier::kTopEngines, &google},
{SearchEngineTier::kTopEngines, &yandex_by},
+ {SearchEngineTier::kTopEngines, &google},
{SearchEngineTier::kTopEngines, &bing},
{SearchEngineTier::kTopEngines, &duckduckgo},
{SearchEngineTier::kTopEngines, &mail_ru},
@@ -597,9 +598,9 @@ constexpr EngineAndTier engines_IN[] = {
// Iraq
constexpr EngineAndTier engines_IQ[] = {
+ {SearchEngineTier::kTopEngines, &yandex_tr},
{SearchEngineTier::kTopEngines, &google},
{SearchEngineTier::kTopEngines, &bing},
- {SearchEngineTier::kTopEngines, &yandex_tr},
{SearchEngineTier::kTopEngines, &yahoo},
{SearchEngineTier::kTopEngines, &duckduckgo},
};
@@ -702,8 +703,8 @@ constexpr EngineAndTier engines_KW[] = {
// Kazakhstan
constexpr EngineAndTier engines_KZ[] = {
- {SearchEngineTier::kTopEngines, &google},
{SearchEngineTier::kTopEngines, &yandex_kz},
+ {SearchEngineTier::kTopEngines, &google},
{SearchEngineTier::kTopEngines, &bing},
{SearchEngineTier::kTopEngines, &mail_ru},
{SearchEngineTier::kTopEngines, &yahoo},
@@ -1172,8 +1173,8 @@ constexpr EngineAndTier engines_TN[] = {
// Turkey
constexpr EngineAndTier engines_TR[] = {
- {SearchEngineTier::kTopEngines, &google},
{SearchEngineTier::kTopEngines, &yandex_tr},
+ {SearchEngineTier::kTopEngines, &google},
{SearchEngineTier::kTopEngines, &yahoo_tr},
{SearchEngineTier::kTopEngines, &bing},
{SearchEngineTier::kTopEngines, &duckduckgo},
@@ -1774,12 +1775,15 @@ std::vector<std::unique_ptr<TemplateURLData>> GetPrepopulatedEngines(
}
}
}
- if (default_search_provider_index) {
- const auto itr =
- base::ranges::find(t_urls, google.id, &TemplateURLData::prepopulate_id);
- *default_search_provider_index =
- itr == t_urls.end() ? 0 : std::distance(t_urls.begin(), itr);
- }
+ /* Making yandex_ru be the first in "const PrepopulatedEngine* const engines_RU[]"
+ * makes it be the first item in chrome://settings/search,
+ * but Google is still chosen by default.
+ * Removed code calculated the distance between 0 and Google's position
+ * and assign that position to default_search_provider_index,
+ * so that Google still was the default search engine.
+ * Instead, just use the first search engine as the default one.
+ */
+ if (default_search_provider_index) *default_search_provider_index = 0;
return t_urls;
}
--
2.41.0

@ -0,0 +1,37 @@
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.

@ -0,0 +1,23 @@
From 0c65e40ae578b743b5f06956597ebc9700768d18 Mon Sep 17 00:00:00 2001
From: Shawn Anastasio <shawnanastasio@yahoo.com>
Date: Thu, 9 Aug 2018 22:45:47 -0500
Subject: [PATCH 1/1] sandbox: Enable seccomp_bpf for ppc64
---
sandbox/features.gni | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: chromium-120.0.6099.71/sandbox/features.gni
===================================================================
--- chromium-120.0.6099.71.orig/sandbox/features.gni
+++ chromium-120.0.6099.71/sandbox/features.gni
@@ -9,7 +9,8 @@
use_seccomp_bpf = (is_linux || is_chromeos || is_android) &&
(current_cpu == "x86" || current_cpu == "x64" ||
current_cpu == "arm" || current_cpu == "arm64" ||
- current_cpu == "mipsel" || current_cpu == "mips64el")
+ current_cpu == "mipsel" || current_cpu == "mips64el" ||
+ current_cpu == "ppc64")
# SSBD (Speculative Store Bypass Disable) is a mitigation of Spectre Variant 4.
# As Spectre Variant 4 can be mitigated by site isolation, opt-out SSBD on site

@ -0,0 +1,80 @@
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_

@ -0,0 +1,22 @@
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);

@ -0,0 +1,638 @@
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

@ -0,0 +1,27 @@
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

@ -0,0 +1,26 @@
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>

@ -0,0 +1,12 @@
Index: chromium-120.0.6099.71/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
@@ -9,6 +9,7 @@
#ifndef LIBANGLE_CONSTANTS_H_
#define LIBANGLE_CONSTANTS_H_
+#include <cstddef>
#include "common/platform.h"
#include <stddef.h>

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

@ -0,0 +1,22 @@
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,

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

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

@ -0,0 +1,101 @@
Index: chromium-120.0.6099.71/third_party/highway/src/hwy/ops/ppc_vsx-inl.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/highway/src/hwy/ops/ppc_vsx-inl.h
+++ chromium-120.0.6099.71/third_party/highway/src/hwy/ops/ppc_vsx-inl.h
@@ -36,6 +36,8 @@
#include "hwy/ops/shared-inl.h"
+#undef __SIZEOF_INT128__
+
HWY_BEFORE_NAMESPACE();
namespace hwy {
namespace HWY_NAMESPACE {
@@ -2844,7 +2846,6 @@ struct CompressIsPartition {
namespace detail {
-#if HWY_TARGET > HWY_PPC10 || __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__
// fallback for missing vec_extractm
template <size_t N>
HWY_INLINE uint64_t ExtractSignBits(Vec128<uint8_t, N> sign_bits,
@@ -2857,22 +2858,16 @@ HWY_INLINE uint64_t ExtractSignBits(Vec1
return extracted.raw[__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__];
}
-#endif // HWY_TARGET > HWY_PPC10
-
template <typename T, size_t N>
HWY_INLINE uint64_t BitsFromMask(hwy::SizeTag<1> /*tag*/,
Mask128<T, N> mask) {
const DFromM<decltype(mask)> d;
const Repartition<uint8_t, decltype(d)> du8;
const VFromD<decltype(du8)> sign_bits = BitCast(du8, VecFromMask(d, mask));
-#if HWY_TARGET <= HWY_PPC10 && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
- return static_cast<uint64_t>(vec_extractm(sign_bits.raw));
-#else
const __vector unsigned char kBitShuffle = {
120, 112, 104, 96, 88, 80, 72, 64, 56, 48, 40, 32, 24, 16, 8, 0
};
return ExtractSignBits(sign_bits, kBitShuffle);
-#endif // HWY_TARGET <= HWY_PPC10
}
template <typename T, size_t N>
@@ -2882,10 +2877,6 @@ HWY_INLINE uint64_t BitsFromMask(hwy::Si
const Repartition<uint8_t, decltype(d)> du8;
const VFromD<decltype(du8)> sign_bits = BitCast(du8, VecFromMask(d, mask));
-#if HWY_TARGET <= HWY_PPC10 && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
- const RebindToUnsigned<decltype(d)> du;
- return static_cast<uint64_t>(vec_extractm(BitCast(du, sign_bits).raw));
-#else
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
const __vector unsigned char kBitShuffle = {
112, 96, 80, 64, 48, 32, 16, 0, 128, 128, 128, 128, 128, 128, 128, 128};
@@ -2894,7 +2885,6 @@ HWY_INLINE uint64_t BitsFromMask(hwy::Si
128, 128, 128, 128, 128, 128, 128, 128, 112, 96, 80, 64, 48, 32, 16, 0};
#endif
return ExtractSignBits(sign_bits, kBitShuffle);
-#endif // HWY_TARGET <= HWY_PPC10
}
template <typename T, size_t N>
@@ -2903,10 +2893,6 @@ HWY_INLINE uint64_t BitsFromMask(hwy::Si
const DFromM<decltype(mask)> d;
const Repartition<uint8_t, decltype(d)> du8;
const VFromD<decltype(du8)> sign_bits = BitCast(du8, VecFromMask(d, mask));
-#if HWY_TARGET <= HWY_PPC10 && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
- const RebindToUnsigned<decltype(d)> du;
- return static_cast<uint64_t>(vec_extractm(BitCast(du, sign_bits).raw));
-#else
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
const __vector unsigned char kBitShuffle = {
96, 64, 32, 0, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128};
@@ -2915,7 +2901,6 @@ HWY_INLINE uint64_t BitsFromMask(hwy::Si
128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 96, 64, 32, 0};
#endif
return ExtractSignBits(sign_bits, kBitShuffle);
-#endif // HWY_TARGET <= HWY_PPC10
}
template <typename T, size_t N>
@@ -2924,10 +2909,6 @@ HWY_INLINE uint64_t BitsFromMask(hwy::Si
const DFromM<decltype(mask)> d;
const Repartition<uint8_t, decltype(d)> du8;
const VFromD<decltype(du8)> sign_bits = BitCast(du8, VecFromMask(d, mask));
-#if HWY_TARGET <= HWY_PPC10 && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
- const RebindToUnsigned<decltype(d)> du;
- return static_cast<uint64_t>(vec_extractm(BitCast(du, sign_bits).raw));
-#else
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
const __vector unsigned char kBitShuffle = {64, 0, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128,
@@ -2938,7 +2919,6 @@ HWY_INLINE uint64_t BitsFromMask(hwy::Si
128, 128, 64, 0};
#endif
return ExtractSignBits(sign_bits, kBitShuffle);
-#endif // HWY_TARGET <= HWY_PPC10
}
// Returns the lowest N of the mask bits.

@ -0,0 +1,21 @@
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>

@ -0,0 +1,76 @@
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

@ -0,0 +1,168 @@
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
@@ -87,7 +87,7 @@
* Porting to other related platforms should not be difficult.
*/
#if (defined(__i386__) || defined(__x86_64__) || defined(__ARM_ARCH_3__) || \
- defined(__mips__) || defined(__PPC__) || defined(__ARM_EABI__) || \
+ defined(__mips__) || defined(__PPC__) || defined(__powerpc64__) || defined(__ARM_EABI__) || \
defined(__aarch64__) || defined(__s390__) || defined(__e2k__) || \
(defined(__riscv) && __riscv_xlen == 64) || defined(__loongarch_lp64)) \
&& (defined(__linux) || defined(__ANDROID__))
@@ -399,7 +399,7 @@ struct kernel_stat64 {
unsigned __pad2;
unsigned long long st_blocks;
};
-#elif defined __PPC__
+#elif defined __PPC__ && !defined(__powerpc64__)
struct kernel_stat64 {
unsigned long long st_dev;
unsigned long long st_ino;
@@ -421,6 +421,28 @@ struct kernel_stat64 {
unsigned long __unused4;
unsigned long __unused5;
};
+#elif defined(__powerpc64__)
+struct kernel_stat64 {
+ unsigned long int st_dev;
+ unsigned long int st_ino;
+ unsigned int st_mode;
+ unsigned long int st_nlink;
+ unsigned int st_uid;
+ unsigned int st_gid;
+ unsigned long int st_rdev;
+ unsigned short int __pad2;
+ long int st_size;
+ long int st_blksize;
+ long int st_blocks;
+ long int st_atime_;
+ unsigned long int st_atime_nsec_;
+ long int st_mtime_;
+ unsigned long int st_mtime_nsec_;
+ long int st_ctime_;
+ unsigned long int st_ctime_nsec_;
+ unsigned long int __unused4;
+ unsigned long int __unused5;
+};
#elif defined(__e2k__)
struct kernel_stat64 {
unsigned long long st_dev;
@@ -537,7 +559,7 @@ struct kernel_stat {
uint64_t st_ctime_nsec_;
int64_t __unused4[3];
};
-#elif defined(__PPC__)
+#elif defined(__PPC__) && !defined(__powerpc64__)
typedef unsigned long kernel_blkcnt_t;
typedef unsigned long kernel_blksize_t;
typedef unsigned kernel_dev_t;
@@ -568,6 +590,37 @@ struct kernel_stat {
unsigned long __unused4;
unsigned long __unused5;
};
+#elif defined(__powerpc64__)
+typedef long int kernel_blkcnt_t;
+typedef long int kernel_blksize_t;
+typedef unsigned long int kernel_dev_t;
+typedef unsigned int kernel_gid_t;
+typedef unsigned long int kernel_ino_t;
+typedef unsigned int kernel_mode_t;
+typedef unsigned long int kernel_nlink_t;
+typedef long int kernel_off_t;
+typedef long int kernel_time_t;
+typedef unsigned int kernel_uid_t;
+struct kernel_stat {
+ kernel_dev_t st_dev;
+ kernel_ino_t st_ino;
+ kernel_mode_t st_mode;
+ kernel_nlink_t st_nlink;
+ kernel_uid_t st_uid;
+ kernel_gid_t st_gid;
+ kernel_dev_t st_rdev;
+ kernel_off_t st_size;
+ kernel_blksize_t st_blksize;
+ kernel_blkcnt_t st_blocks;
+ kernel_time_t st_atime_;
+ unsigned long int st_atime_nsec_;
+ kernel_time_t st_mtime_;
+ unsigned long int st_mtime_nsec_;
+ kernel_time_t st_ctime_;
+ unsigned long int st_ctime_nsec_;
+ unsigned long int __unused4;
+ unsigned long int __unused5;
+};
#elif (defined(__mips__) && _MIPS_SIM != _MIPS_SIM_ABI64)
typedef int kernel_blkcnt_t;
typedef int kernel_blksize_t;
@@ -1824,6 +1877,28 @@ struct kernel_statx {
#ifndef __NR_getcpu
#define __NR_getcpu 302
#endif
+
+/* Linux commit 86250b9d12caa1a3dee12a7cf638b7dd70eaadb6 (2010) adds
+ * direct socket system calls to PPC */
+#ifndef __NR_socket
+#define __NR_socket 326
+#endif
+#ifndef __NR_socketpair
+#define __NR_socketpair 333
+#endif
+#ifndef __NR_sendto
+#define __NR_sendto 335
+#endif
+#ifndef __NR_shutdown
+#define __NR_shutdown 338
+#endif
+#ifndef __NR_sendmsg
+#define __NR_sendmsg 341
+#endif
+#ifndef __NR_recvmsg
+#define __NR_recvmsg 342
+#endif
+
/* End of powerpc defininitions */
#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 {
LSS_INLINE _syscall6(void*, mmap, void*, addr, size_t, length, int, prot,
int, flags, int, fd, int64_t, offset)
#endif
- #if defined(__PPC__)
+ #if defined(__PPC__) && !defined(__powerpc64__)
#undef LSS_SC_LOADARGS_0
#define LSS_SC_LOADARGS_0(dummy...)
#undef LSS_SC_LOADARGS_1
@@ -5173,7 +5254,11 @@ struct kernel_statx {
#endif
#if !defined(__NR_pipe)
+#if defined(__powerpc64__)
+ LSS_INLINE pid_t LSS_NAME(pipe)(int *pipefd) {
+#else
LSS_INLINE int LSS_NAME(pipe)(int *pipefd) {
+#endif
return LSS_NAME(pipe2)(pipefd, 0);
}
#endif

@ -0,0 +1,37 @@
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

@ -0,0 +1,35 @@
--- a/third_party/libvpx/libvpx_srcs.gni
+++ b/third_party/libvpx/libvpx_srcs.gni
@@ -4302,6 +4302,7 @@
"//third_party/libvpx/source/libvpx/vp9/common/vp9_seg_common.c",
"//third_party/libvpx/source/libvpx/vp9/common/vp9_thread_common.c",
"//third_party/libvpx/source/libvpx/vp9/common/vp9_tile_common.c",
+ "//third_party/libvpx/source/libvpx/vp9/common/ppc/vp9_idct_vsx.c",
"//third_party/libvpx/source/libvpx/vp9/decoder/vp9_decodeframe.c",
"//third_party/libvpx/source/libvpx/vp9/decoder/vp9_decodemv.c",
"//third_party/libvpx/source/libvpx/vp9/decoder/vp9_decoder.c",
@@ -4340,6 +4341,7 @@
"//third_party/libvpx/source/libvpx/vp9/encoder/vp9_svc_layercontext.c",
"//third_party/libvpx/source/libvpx/vp9/encoder/vp9_tokenize.c",
"//third_party/libvpx/source/libvpx/vp9/encoder/vp9_treewriter.c",
+ "//third_party/libvpx/source/libvpx/vp9/encoder/ppc/vp9_quantize_vsx.c",
"//third_party/libvpx/source/libvpx/vp9/vp9_cx_iface.c",
"//third_party/libvpx/source/libvpx/vp9/vp9_dx_iface.c",
"//third_party/libvpx/source/libvpx/vp9/vp9_iface_common.c",
@@ -4368,6 +4370,16 @@
"//third_party/libvpx/source/libvpx/vpx_dsp/variance.c",
"//third_party/libvpx/source/libvpx/vpx_dsp/vpx_convolve.c",
"//third_party/libvpx/source/libvpx/vpx_dsp/vpx_dsp_rtcd.c",
+ "//third_party/libvpx/source/libvpx/vpx_dsp/ppc/deblock_vsx.c",
+ "//third_party/libvpx/source/libvpx/vpx_dsp/ppc/fdct32x32_vsx.c",
+ "//third_party/libvpx/source/libvpx/vpx_dsp/ppc/hadamard_vsx.c",
+ "//third_party/libvpx/source/libvpx/vpx_dsp/ppc/intrapred_vsx.c",
+ "//third_party/libvpx/source/libvpx/vpx_dsp/ppc/inv_txfm_vsx.c",
+ "//third_party/libvpx/source/libvpx/vpx_dsp/ppc/quantize_vsx.c",
+ "//third_party/libvpx/source/libvpx/vpx_dsp/ppc/sad_vsx.c",
+ "//third_party/libvpx/source/libvpx/vpx_dsp/ppc/subtract_vsx.c",
+ "//third_party/libvpx/source/libvpx/vpx_dsp/ppc/variance_vsx.c",
+ "//third_party/libvpx/source/libvpx/vpx_dsp/ppc/vpx_convolve_vsx.c",
"//third_party/libvpx/source/libvpx/vpx_mem/vpx_mem.c",
"//third_party/libvpx/source/libvpx/vpx_ports/ppc_cpudetect.c",
"//third_party/libvpx/source/libvpx/vpx_scale/generic/gen_scalers.c",

@ -0,0 +1,43 @@
Index: chromium-120.0.6099.71/third_party/dav1d/config/linux/ppc64/config.h
===================================================================
--- /dev/null
+++ chromium-120.0.6099.71/third_party/dav1d/config/linux/ppc64/config.h
@@ -0,0 +1,38 @@
+/*
+ * Autogenerated by the Meson build system.
+ * Do not edit, your changes will be lost.
+ */
+
+#pragma once
+
+#define ARCH_AARCH64 0
+
+#define ARCH_ARM 0
+
+#define ARCH_PPC64LE 1
+
+#define ARCH_X86 0
+
+#define ARCH_X86_32 0
+
+#define ARCH_X86_64 0
+
+#define CONFIG_16BPC 1
+
+#define CONFIG_8BPC 1
+
+// #define CONFIG_LOG 1 -- Logging is controlled by Chromium
+
+#define ENDIANNESS_BIG 0
+
+#define HAVE_ASM 1
+
+#define HAVE_CLOCK_GETTIME 1
+
+#define HAVE_DLSYM 1
+
+#define HAVE_GETAUXVAL 1
+
+#define HAVE_POSIX_MEMALIGN 1
+
+#define HAVE_UNISTD_H 1

@ -0,0 +1,23 @@
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

@ -0,0 +1,17 @@
Index: chromium-120.0.6099.71/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
@@ -239,6 +239,12 @@ std::string UserAgent() {
#endif
#elif defined (ARCH_CPU_RISCV64)
static constexpr char arch[] = "riscv64";
+#elif defined(__powerpc64__)
+#if defined(ARCH_CPU_LITTLE_ENDIAN)
+ static constexpr char arch[] = "ppc64";
+#elif defined(ARCH_CPU_BIG_ENDIAN)
+ static constexpr char arch[] = "ppc64_be";
+#endif
#else
#error Port
#endif

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

@ -0,0 +1,107 @@
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);
}

@ -0,0 +1,24 @@
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) {

@ -0,0 +1,14 @@
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:

@ -0,0 +1,33 @@
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)

@ -0,0 +1,91 @@
Index: chromium-120.0.6099.71/sandbox/policy/linux/bpf_utility_policy_linux.cc
===================================================================
--- chromium-120.0.6099.71.orig/sandbox/policy/linux/bpf_utility_policy_linux.cc
+++ chromium-120.0.6099.71/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-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
@@ -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-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
@@ -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-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
@@ -89,7 +89,9 @@ bool ChrootToSafeEmptyDir() {
int clone_flags = CLONE_FS | LINUX_SIGCHLD;
void* tls = nullptr;
-#if (defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_ARM_FAMILY)) && \
+// RAJA this might be it...
+#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 +99,11 @@ bool ChrootToSafeEmptyDir() {
// glibc performs syscalls by calling a function pointer in TLS, so we do not
// attempt this optimization.
// TODO(crbug.com/1247458) 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
+ // configuraiton 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-120.0.6099.71/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
===================================================================
--- chromium-120.0.6099.71.orig/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
+++ chromium-120.0.6099.71/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);

@ -0,0 +1,13 @@
Index: chromium-120.0.6099.71/third_party/skia/src/core/SkRasterPipeline.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/skia/src/core/SkRasterPipeline.h
+++ chromium-120.0.6099.71/third_party/skia/src/core/SkRasterPipeline.h
@@ -24,7 +24,7 @@ enum SkColorType : int;
struct SkImageInfo;
struct skcms_TransferFunction;
-#if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32)
+#if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32) && !defined(__powerpc64__)
#define SK_HAS_MUSTTAIL 1
#else
#define SK_HAS_MUSTTAIL 0

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

@ -0,0 +1,23 @@
Index: chromium-120.0.6099.71/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
@@ -46,6 +46,18 @@
#endif
#if defined(__MIPSEL__)
#define WEBRTC_ARCH_LITTLE_ENDIAN
+#elif defined(__PPC__)
+#define WEBRTC_ARCH_PPC_FAMILY
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#define WEBRTC_ARCH_LITTLE_ENDIAN
+#else
+#define WEBRTC_ARCH_BIG_ENDIAN
+#endif
+#if defined(__LP64__)
+#define WEBRTC_ARCH_64_BITS
+#else
+#define WEBRTC_ARCH_32_BITS
+#endif
#else
#define WEBRTC_ARCH_BIG_ENDIAN
#endif

@ -0,0 +1,13 @@
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

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="272px" height="92px" viewBox="0 0 272 92" version="1.1">
<g id="surface1">
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 259.328125 80.109375 C 264.664062 80.109375 268.441406 78.980469 271.257812 76.550781 L 271.257812 65.527344 C 268.367188 67.871094 264.886719 69.347656 259.992188 69.347656 C 251.765625 69.347656 248.359375 61.882812 248.359375 50.078125 C 248.359375 37.667969 252.507812 31.332031 260.066406 31.332031 C 264.515625 31.332031 268.886719 33.15625 271.183594 34.890625 L 271.183594 23.433594 C 268.738281 21.871094 264.515625 20.742188 258.734375 20.742188 C 243.984375 20.742188 236.351562 33.15625 236.351562 50.511719 C 236.425781 69.519531 243.910156 80.109375 259.328125 80.109375 Z M 187.214844 75.074219 L 187.214844 64.054688 C 183.65625 66.917969 177.578125 69.433594 172.019531 69.433594 C 163.570312 69.433594 160.382812 64.746094 159.863281 55.199219 L 187.730469 55.199219 L 187.730469 48.082031 C 187.730469 28.207031 180.246094 20.742188 168.757812 20.742188 C 154.675781 20.742188 148.007812 33.328125 148.007812 50.601562 C 148.007812 70.476562 156.382812 80.109375 171.054688 80.109375 C 178.394531 80.109375 183.804688 77.765625 187.214844 75.074219 Z M 81.453125 21.785156 L 81.453125 44.351562 L 66.035156 44.351562 L 66.035156 21.785156 L 54.472656 21.785156 L 54.472656 78.980469 L 66.035156 78.980469 L 66.035156 55.113281 L 81.453125 55.113281 L 81.453125 78.980469 L 93.011719 78.980469 L 93.011719 21.785156 Z M 145.117188 68.21875 L 140.003906 68.21875 L 140.003906 21.785156 L 106.355469 21.785156 L 106.355469 26.644531 C 106.355469 40.617188 105.613281 58.671875 101.535156 68.21875 L 97.832031 68.21875 L 97.832031 92 L 108.503906 92 L 108.503906 78.980469 L 134.371094 78.980469 L 134.371094 92 L 145.042969 92 L 145.042969 68.21875 Z M 224.046875 78.980469 L 237.167969 78.980469 L 218.636719 48.167969 L 234.941406 21.785156 L 223.308594 21.785156 L 207 48.167969 L 207 21.785156 L 195.441406 21.785156 L 195.441406 78.980469 L 207 78.980469 L 207 50.859375 Z M 168.460938 31.332031 C 174.167969 31.332031 175.949219 36.886719 175.949219 44.089844 L 175.949219 45.21875 L 159.863281 45.21875 C 160.160156 36.105469 162.976562 31.332031 168.460938 31.332031 Z M 128.441406 68.21875 L 112.136719 68.21875 C 115.320312 59.625 116.210938 44.003906 116.210938 34.109375 L 116.210938 32.375 L 128.441406 32.375 Z M 128.441406 68.21875 "/>
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(98.823529%,24.705882%,11.372549%);fill-opacity:1;" d="M 44.839844 78.980469 L 33.054688 78.980469 L 33.054688 10.675781 L 27.792969 10.675781 C 18.15625 10.675781 13.117188 16.316406 13.117188 24.734375 C 13.117188 34.28125 16.601562 38.710938 23.789062 44.351562 L 29.71875 49.039062 L 12.671875 78.980469 L 0 78.980469 L 15.339844 52.25 C 6.523438 44.871094 1.554688 37.667969 1.554688 25.515625 C 1.554688 10.328125 10.597656 0 27.71875 0 L 44.765625 0 L 44.765625 78.980469 Z M 44.839844 78.980469 "/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.1 KiB

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

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

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

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

@ -0,0 +1,71 @@
From 041cb248e818823caaaabc67db92b16499d0416d Mon Sep 17 00:00:00 2001
From: Vasiliy Telezhnikov <vasilyt@chromium.org>
Date: Thu, 02 Feb 2023 15:42:28 +0000
Subject: [PATCH] CHECK that passthrough command decoder is used on launched platforms
This CL adds enforces that validating command decoder is not used on
platforms where passthrough is fully launched. We still allow to use it
by tests on linux
Bug: 1406585
Change-Id: Id6bc1d748fdf9c953dde76c8d4b5f59ddef60857
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4212134
Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
Commit-Queue: Vasiliy Telezhnikov <vasilyt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1100440}
---
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index eb710696..b22dffb 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -3447,7 +3447,13 @@
outputter, group);
}
+// Allow linux to run fuzzers.
+#if BUILDFLAG(ENABLE_VALIDATING_COMMAND_DECODER) || BUILDFLAG(IS_LINUX)
return new GLES2DecoderImpl(client, command_buffer_service, outputter, group);
+#else
+ LOG(FATAL) << "Validating command decoder is not supported.";
+ return nullptr;
+#endif
}
GLES2DecoderImpl::GLES2DecoderImpl(
diff --git a/gpu/ipc/service/gpu_init.cc b/gpu/ipc/service/gpu_init.cc
index 40977d9b..50171e20 100644
--- a/gpu/ipc/service/gpu_init.cc
+++ b/gpu/ipc/service/gpu_init.cc
@@ -510,8 +510,9 @@
auto impl = gl::GetGLImplementationParts();
bool gl_disabled = impl == gl::kGLImplementationDisabled;
- bool is_swangle = impl == gl::ANGLEImplementation::kSwiftShader;
+#if BUILDFLAG(ENABLE_VALIDATING_COMMAND_DECODER)
+ bool is_swangle = impl == gl::ANGLEImplementation::kSwiftShader;
// Compute passthrough decoder status before ComputeGpuFeatureInfo below.
// Do this after GL is initialized so extensions can be queried.
// Using SwANGLE forces the passthrough command decoder.
@@ -533,6 +534,20 @@
}
gpu_preferences_.use_passthrough_cmd_decoder =
gpu_info_.passthrough_cmd_decoder;
+#else
+ // If gl is disabled passthrough/validating command decoder doesn't matter. If
+ // it's not ensure that passthrough command decoder is supported as it's our
+ // only option.
+ if (!gl_disabled) {
+ LOG_IF(FATAL, !gles2::PassthroughCommandDecoderSupported())
+ << "Passthrough is not supported, GL is "
+ << gl::GetGLImplementationGLName(gl::GetGLImplementationParts())
+ << ", ANGLE is "
+ << gl::GetGLImplementationANGLEName(gl::GetGLImplementationParts());
+ gpu_info_.passthrough_cmd_decoder = true;
+ gpu_preferences_.use_passthrough_cmd_decoder = true;
+ }
+#endif
// We need to collect GL strings (VENDOR, RENDERER) for blocklisting purposes.
if (!gl_disabled) {

@ -0,0 +1,21 @@
author Yaowei Zhou <yaowei.zhou@intel.com> Thu Feb 02 06:18:34 2023
committer Yaowei Zhou <yaowei.zhou@intel.com> Thu Feb 02 06:18:34 2023
tree 62a79c7f155fc32140d3aa4c4a6b01b8d7eddfcc
parent 98e427b87ff8447180a60f20ee3792dcbd649481 [diff]
Enable VA-API flag on ozone wayland
Bug: POC
Change-Id: I09f696bfe3be82930161ce005152d1397b93f636
diff --git a/ui/ozone/platform/wayland/ozone_platform_wayland.cc b/ui/ozone/platform/wayland/ozone_platform_wayland.cc
index b3190c6b..4a2c3bb 100644
--- a/ui/ozone/platform/wayland/ozone_platform_wayland.cc
+++ b/ui/ozone/platform/wayland/ozone_platform_wayland.cc
@@ -309,6 +309,8 @@
properties->supports_global_screen_coordinates =
features::IsWaylandScreenCoordinatesEnabled();
+ properties->supports_vaapi_x11 = true;
+
initialised = true;
}

@ -0,0 +1,630 @@
commit 7f0858c08dcef70ca26ce8527bbedfcc5c5218d3
Author: Colin Blundell <blundell@chromium.org>
Date: Thu Feb 23 14:19:33 2023 +0000
[Ozone] Invert layering of GLImageNativePixmap & NativePixmapEGLBinding
NativePixmapEGLBinding is currently a thin layer on top of
GLImageNativePixmap. This CL inverts the layering so that
GLImageNativePixmap instead sits on top of NativePixmapEGLBinding
(via the public Ozone ImportNativePixmap() method, for which all
implementations return NativePixmapEGLBinding). Note that this entails
moving GLImageNativePixmap into //gpu, as //ui/gl cannot depend on
//ozone/public.
This inversion means that
(a) the SharedImage Ozone backing/representations no longer use GLImage
(b) when we no longer need GLImageNativePixmap we can simply directly
eliminate it.
Followup CLs will fold NativePixmapEGLBindingHelper into
NativePixmapEGLBinding and make GLImageNativePixmap creation private
with friending to ensure that no more usage of the deprecated class
creeps in.
Bug: 1412692
Change-Id: I5f01e9b1f616dd99b61cd203662d0d02d3da7b3e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4262390
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Reviewed-by: ccameron chromium <ccameron@chromium.org>
Reviewed-by: Andres Calderon Jaramillo <andrescj@chromium.org>
Commit-Queue: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1108909}
diff --git a/gpu/command_buffer/service/BUILD.gn b/gpu/command_buffer/service/BUILD.gn
index d08be597e3e5d..5ad724dd57bbb 100644
--- a/gpu/command_buffer/service/BUILD.gn
+++ b/gpu/command_buffer/service/BUILD.gn
@@ -397,6 +397,8 @@ target(link_target_type, "gles2_sources") {
if (use_ozone) {
sources += [
+ "shared_image/gl_image_native_pixmap.cc",
+ "shared_image/gl_image_native_pixmap.h",
"shared_image/gl_ozone_image_representation.cc",
"shared_image/gl_ozone_image_representation.h",
"shared_image/ozone_image_backing.cc",
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index e3f5b3c5721cf..a297347c19670 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -120,10 +120,10 @@
#endif
#if BUILDFLAG(IS_OZONE)
+#include "gpu/command_buffer/service/shared_image/gl_image_native_pixmap.h"
#include "ui/gfx/buffer_format_util.h"
#include "ui/gfx/buffer_usage_util.h"
#include "ui/gfx/native_pixmap.h"
-#include "ui/gl/gl_image_native_pixmap.h"
#include "ui/ozone/public/ozone_platform.h"
#include "ui/ozone/public/surface_factory_ozone.h"
#endif
@@ -499,7 +499,7 @@ class BackTexture {
#if BUILDFLAG(IS_OZONE)
// The image that backs the texture, if its backed by a native
// GpuMemoryBuffer.
- scoped_refptr<gl::GLImageNativePixmap> image_;
+ scoped_refptr<GLImageNativePixmap> image_;
#endif
};
@@ -2522,7 +2522,7 @@ class GLES2DecoderImpl : public GLES2Decoder,
// Note: Creation of anonymous images is possible only on Ozone.
#if BUILDFLAG(IS_OZONE)
bool SupportsCreateAnonymousImage();
- scoped_refptr<gl::GLImageNativePixmap> CreateAnonymousImage(
+ scoped_refptr<GLImageNativePixmap> CreateAnonymousImage(
const gfx::Size& size,
gfx::BufferFormat format,
bool* is_cleared,
@@ -3242,7 +3242,7 @@ bool BackTexture::AllocateNativeGpuMemoryBuffer(const gfx::Size& size,
// duplicate BGRX_8888.
buffer_format = gfx::BufferFormat::BGRX_8888;
}
- scoped_refptr<gl::GLImageNativePixmap> image = decoder_->CreateAnonymousImage(
+ scoped_refptr<GLImageNativePixmap> image = decoder_->CreateAnonymousImage(
size, buffer_format, &is_cleared, Target(), id());
if (!image)
return false;
@@ -19592,7 +19592,7 @@ bool GLES2DecoderImpl::SupportsCreateAnonymousImage() {
.supports_native_pixmaps;
}
-scoped_refptr<gl::GLImageNativePixmap> GLES2DecoderImpl::CreateAnonymousImage(
+scoped_refptr<GLImageNativePixmap> GLES2DecoderImpl::CreateAnonymousImage(
const gfx::Size& size,
gfx::BufferFormat format,
bool* is_cleared,
@@ -19612,8 +19612,8 @@ scoped_refptr<gl::GLImageNativePixmap> GLES2DecoderImpl::CreateAnonymousImage(
<< gfx::BufferUsageToString(usage);
return nullptr;
}
- auto image = gl::GLImageNativePixmap::Create(size, format, std::move(pixmap),
- target, texture_id);
+ auto image = GLImageNativePixmap::Create(size, format, std::move(pixmap),
+ target, texture_id);
if (!image) {
LOG(ERROR) << "Failed to create GLImage " << size.ToString() << ", "
<< gfx::BufferFormatToString(format) << ", usage "
diff --git a/ui/gl/gl_image_native_pixmap.cc b/gpu/command_buffer/service/shared_image/gl_image_native_pixmap.cc
similarity index 73%
rename from ui/gl/gl_image_native_pixmap.cc
rename to gpu/command_buffer/service/shared_image/gl_image_native_pixmap.cc
index 6cbe7be2899de..d9101fbda893b 100644
--- a/ui/gl/gl_image_native_pixmap.cc
+++ b/gpu/command_buffer/service/shared_image/gl_image_native_pixmap.cc
@@ -2,9 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ui/gl/gl_image_native_pixmap.h"
+#include "gpu/command_buffer/service/shared_image/gl_image_native_pixmap.h"
-namespace gl {
+#include "ui/ozone/public/native_pixmap_gl_binding.h"
+#include "ui/ozone/public/ozone_platform.h"
+#include "ui/ozone/public/surface_factory_ozone.h"
+
+namespace gpu {
scoped_refptr<GLImageNativePixmap> GLImageNativePixmap::Create(
const gfx::Size& size,
@@ -47,18 +51,18 @@ bool GLImageNativePixmap::InitializeFromNativePixmap(
const gfx::ColorSpace& color_space,
GLenum target,
GLuint texture_id) {
- binding_helper_ = NativePixmapEGLBindingHelper::CreateForPlane(
- size_, format, plane, std::move(pixmap), color_space, target, texture_id);
+ pixmap_gl_binding_ =
+ ui::OzonePlatform::GetInstance()
+ ->GetSurfaceFactoryOzone()
+ ->GetCurrentGLOzone()
+ ->ImportNativePixmap(std::move(pixmap), format, plane, size_,
+ color_space, target, texture_id);
- return !!binding_helper_;
+ return !!pixmap_gl_binding_;
}
gfx::Size GLImageNativePixmap::GetSize() {
return size_;
}
-unsigned GLImageNativePixmap::GetInternalFormat() {
- return binding_helper_->GetInternalFormat();
-}
-
-} // namespace gl
+} // namespace gpu
diff --git a/ui/gl/gl_image_native_pixmap.h b/gpu/command_buffer/service/shared_image/gl_image_native_pixmap.h
similarity index 72%
rename from ui/gl/gl_image_native_pixmap.h
rename to gpu/command_buffer/service/shared_image/gl_image_native_pixmap.h
index 5ff5e91b3ec18..4087360b04b45 100644
--- a/ui/gl/gl_image_native_pixmap.h
+++ b/gpu/command_buffer/service/shared_image/gl_image_native_pixmap.h
@@ -2,21 +2,24 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_GL_GL_IMAGE_NATIVE_PIXMAP_H_
-#define UI_GL_GL_IMAGE_NATIVE_PIXMAP_H_
+#ifndef GPU_COMMAND_BUFFER_SERVICE_SHARED_IMAGE_GL_IMAGE_NATIVE_PIXMAP_H_
+#define GPU_COMMAND_BUFFER_SERVICE_SHARED_IMAGE_GL_IMAGE_NATIVE_PIXMAP_H_
#include <stdint.h>
+#include "gpu/gpu_gles2_export.h"
#include "ui/gfx/color_space.h"
#include "ui/gfx/native_pixmap.h"
#include "ui/gl/gl_bindings.h"
-#include "ui/gl/gl_export.h"
#include "ui/gl/gl_image.h"
-#include "ui/gl/native_pixmap_egl_binding_helper.h"
-namespace gl {
+namespace ui {
+class NativePixmapGLBinding;
+}
-class GL_EXPORT GLImageNativePixmap : public GLImage {
+namespace gpu {
+
+class GPU_GLES2_EXPORT GLImageNativePixmap : public gl::GLImage {
public:
// Create an EGLImage from a given NativePixmap and bind |texture_id| to
// |target| following by binding the image to |target|.
@@ -41,22 +44,15 @@ class GL_EXPORT GLImageNativePixmap : public GLImage {
GLenum target,
GLuint texture_id);
- // Get the GL internal format of the image.
- // It is aligned with glTexImage{2|3}D's parameter |internalformat|.
- unsigned GetInternalFormat();
-
// Overridden from GLImage:
gfx::Size GetSize() override;
- protected:
- ~GLImageNativePixmap() override;
-
private:
explicit GLImageNativePixmap(const gfx::Size& size);
+ ~GLImageNativePixmap() override;
- // Create an EGLImage from a given NativePixmap and bind |texture_id| to
- // |target| followed by binding the image to |target|. This EGLImage can be
- // converted to a GL texture.
+ // Create a NativePixmapGLBinding from a given NativePixmap. Returns true iff
+ // the binding was successfully created.
bool InitializeFromNativePixmap(gfx::BufferFormat format,
gfx::BufferPlane plane,
scoped_refptr<gfx::NativePixmap> pixmap,
@@ -64,10 +60,10 @@ class GL_EXPORT GLImageNativePixmap : public GLImage {
GLenum target,
GLuint texture_id);
- std::unique_ptr<NativePixmapEGLBindingHelper> binding_helper_;
+ std::unique_ptr<ui::NativePixmapGLBinding> pixmap_gl_binding_;
const gfx::Size size_;
};
-} // namespace gl
+} // namespace gpu
-#endif // UI_GL_GL_IMAGE_NATIVE_PIXMAP_H_
+#endif // GPU_COMMAND_BUFFER_SERVICE_SHARED_IMAGE_GL_IMAGE_NATIVE_PIXMAP_H_
diff --git a/gpu/command_buffer/service/shared_image/gl_ozone_image_representation.h b/gpu/command_buffer/service/shared_image/gl_ozone_image_representation.h
index 31723894088e1..ade337bde9966 100644
--- a/gpu/command_buffer/service/shared_image/gl_ozone_image_representation.h
+++ b/gpu/command_buffer/service/shared_image/gl_ozone_image_representation.h
@@ -14,7 +14,6 @@
#include "gpu/command_buffer/service/shared_image/shared_image_representation.h"
#include "gpu/command_buffer/service/texture_manager.h"
#include "ui/gfx/native_pixmap.h"
-#include "ui/gl/gl_image_native_pixmap.h"
#include "ui/ozone/public/native_pixmap_gl_binding.h"
namespace gpu {
diff --git a/gpu/command_buffer/service/shared_image/ozone_image_backing.cc b/gpu/command_buffer/service/shared_image/ozone_image_backing.cc
index 8d4a7d9306eb1..7a652ae425c0e 100644
--- a/gpu/command_buffer/service/shared_image/ozone_image_backing.cc
+++ b/gpu/command_buffer/service/shared_image/ozone_image_backing.cc
@@ -36,7 +36,6 @@
#include "ui/gfx/native_pixmap.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gl/buildflags.h"
-#include "ui/gl/gl_image_native_pixmap.h"
#if BUILDFLAG(ENABLE_VULKAN)
#include "gpu/command_buffer/service/shared_image/skia_vk_ozone_image_representation.h"
diff --git a/media/gpu/v4l2/BUILD.gn b/media/gpu/v4l2/BUILD.gn
index 12e6b66cf7b89..ff7b5a1a50a38 100644
--- a/media/gpu/v4l2/BUILD.gn
+++ b/media/gpu/v4l2/BUILD.gn
@@ -98,6 +98,7 @@ source_set("v4l2") {
":libv4l2_stubs",
":v4l2_status",
"//base",
+ "//gpu/command_buffer/service:gles2",
"//gpu/ipc/common",
"//gpu/ipc/service",
"//media",
diff --git a/media/gpu/v4l2/generic_v4l2_device.cc b/media/gpu/v4l2/generic_v4l2_device.cc
index bdbb256ed578c..337ec0e7b372b 100644
--- a/media/gpu/v4l2/generic_v4l2_device.cc
+++ b/media/gpu/v4l2/generic_v4l2_device.cc
@@ -23,6 +23,7 @@
#include "base/strings/stringprintf.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
+#include "gpu/command_buffer/service/shared_image/gl_image_native_pixmap.h"
#include "media/base/video_types.h"
#include "media/gpu/buildflags.h"
#include "media/gpu/chromeos/fourcc.h"
@@ -32,7 +33,6 @@
#include "ui/gfx/native_pixmap_handle.h"
#include "ui/gl/egl_util.h"
#include "ui/gl/gl_bindings.h"
-#include "ui/gl/gl_image_native_pixmap.h"
#include "ui/ozone/public/ozone_platform.h"
#include "ui/ozone/public/surface_factory_ozone.h"
@@ -281,7 +281,7 @@ EGLImageKHR GenericV4L2Device::CreateEGLImage(
return egl_image;
}
-scoped_refptr<gl::GLImageNativePixmap> GenericV4L2Device::CreateGLImage(
+scoped_refptr<gpu::GLImageNativePixmap> GenericV4L2Device::CreateGLImage(
const gfx::Size& size,
const Fourcc fourcc,
gfx::NativePixmapHandle handle,
@@ -317,7 +317,7 @@ scoped_refptr<gl::GLImageNativePixmap> GenericV4L2Device::CreateGLImage(
DCHECK(pixmap);
// TODO(b/220336463): plumb the right color space.
- auto image = gl::GLImageNativePixmap::Create(
+ auto image = gpu::GLImageNativePixmap::Create(
size, buffer_format, std::move(pixmap), target, texture_id);
DCHECK(image);
return image;
diff --git a/media/gpu/v4l2/generic_v4l2_device.h b/media/gpu/v4l2/generic_v4l2_device.h
index bb9ce391c15bd..fd84aee27097e 100644
--- a/media/gpu/v4l2/generic_v4l2_device.h
+++ b/media/gpu/v4l2/generic_v4l2_device.h
@@ -55,7 +55,7 @@ class GenericV4L2Device : public V4L2Device {
const Fourcc fourcc,
gfx::NativePixmapHandle handle) const override;
- scoped_refptr<gl::GLImageNativePixmap> CreateGLImage(
+ scoped_refptr<gpu::GLImageNativePixmap> CreateGLImage(
const gfx::Size& size,
const Fourcc fourcc,
gfx::NativePixmapHandle handle,
diff --git a/media/gpu/v4l2/v4l2_device.h b/media/gpu/v4l2/v4l2_device.h
index bdc39bf65ae38..ee74cbcd39957 100644
--- a/media/gpu/v4l2/v4l2_device.h
+++ b/media/gpu/v4l2/v4l2_device.h
@@ -28,6 +28,7 @@
#include "base/files/scoped_file.h"
#include "base/memory/ref_counted.h"
#include "base/sequence_checker.h"
+#include "gpu/command_buffer/service/shared_image/gl_image_native_pixmap.h"
#include "media/base/video_codecs.h"
#include "media/base/video_decoder_config.h"
#include "media/base/video_frame.h"
@@ -42,7 +43,6 @@
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/native_pixmap_handle.h"
#include "ui/gl/gl_bindings.h"
-#include "ui/gl/gl_image_native_pixmap.h"
// TODO(mojahsu): remove this once V4L2 headers are updated.
#ifndef V4L2_PIX_FMT_JPEG_RAW
@@ -777,7 +777,7 @@ class MEDIA_GPU_EXPORT V4L2Device
// Create a GLImageNativePixmap from provided |handle|, taking full ownership
// of it.
- virtual scoped_refptr<gl::GLImageNativePixmap> CreateGLImage(
+ virtual scoped_refptr<gpu::GLImageNativePixmap> CreateGLImage(
const gfx::Size& size,
const Fourcc fourcc,
gfx::NativePixmapHandle handle,
diff --git a/media/gpu/v4l2/v4l2_slice_video_decode_accelerator.cc b/media/gpu/v4l2/v4l2_slice_video_decode_accelerator.cc
index a51acedc105b7..78cc605e986e6 100644
--- a/media/gpu/v4l2/v4l2_slice_video_decode_accelerator.cc
+++ b/media/gpu/v4l2/v4l2_slice_video_decode_accelerator.cc
@@ -30,6 +30,7 @@
#include "base/time/time.h"
#include "base/trace_event/memory_dump_manager.h"
#include "base/trace_event/trace_event.h"
+#include "gpu/command_buffer/service/shared_image/gl_image_native_pixmap.h"
#include "media/base/bind_to_current_loop.h"
#include "media/base/media_switches.h"
#include "media/base/scopedfd_helper.h"
@@ -49,7 +50,6 @@
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_display.h"
-#include "ui/gl/gl_image_native_pixmap.h"
#include "ui/gl/gl_surface_egl.h"
#include "ui/gl/scoped_binders.h"
@@ -1444,7 +1444,7 @@ void V4L2SliceVideoDecodeAccelerator::CreateGLImageFor(
return;
}
- scoped_refptr<gl::GLImageNativePixmap> gl_image =
+ scoped_refptr<gpu::GLImageNativePixmap> gl_image =
gl_device->CreateGLImage(visible_size, fourcc, std::move(handle),
gl_device->GetTextureTarget(), texture_id);
if (!gl_image) {
diff --git a/media/gpu/vaapi/BUILD.gn b/media/gpu/vaapi/BUILD.gn
index 1ecf8854d02e7..7687384553806 100644
--- a/media/gpu/vaapi/BUILD.gn
+++ b/media/gpu/vaapi/BUILD.gn
@@ -96,6 +96,7 @@ source_set("vaapi") {
":vaapi_status",
"//base",
"//build:chromeos_buildflags",
+ "//gpu/command_buffer/service:gles2",
"//gpu/config",
"//gpu/ipc/common",
"//gpu/ipc/service",
diff --git a/media/gpu/vaapi/vaapi_picture_native_pixmap_ozone.cc b/media/gpu/vaapi/vaapi_picture_native_pixmap_ozone.cc
index 06617ffec8e5a..626dda6312213 100644
--- a/media/gpu/vaapi/vaapi_picture_native_pixmap_ozone.cc
+++ b/media/gpu/vaapi/vaapi_picture_native_pixmap_ozone.cc
@@ -4,6 +4,7 @@
#include "media/gpu/vaapi/vaapi_picture_native_pixmap_ozone.h"
+#include "gpu/command_buffer/service/shared_image/gl_image_native_pixmap.h"
#include "media/base/format_utils.h"
#include "media/gpu/buffer_validation.h"
#include "media/gpu/chromeos/platform_video_frame_utils.h"
@@ -15,7 +16,6 @@
#include "ui/gfx/linux/native_pixmap_dmabuf.h"
#include "ui/gfx/native_pixmap.h"
#include "ui/gl/gl_bindings.h"
-#include "ui/gl/gl_image_native_pixmap.h"
#include "ui/gl/scoped_binders.h"
#include "ui/ozone/public/ozone_platform.h"
#include "ui/ozone/public/surface_factory_ozone.h"
@@ -87,7 +87,7 @@ VaapiStatus VaapiPictureNativePixmapOzone::Initialize(
const gfx::BufferFormat format = pixmap->GetBufferFormat();
// TODO(b/220336463): plumb the right color space.
- auto image = gl::GLImageNativePixmap::Create(
+ auto image = gpu::GLImageNativePixmap::Create(
visible_size_, format, std::move(pixmap),
base::strict_cast<GLenum>(texture_target_),
base::strict_cast<GLuint>(texture_id_));
diff --git a/media/gpu/vaapi/vaapi_picture_native_pixmap_ozone.h b/media/gpu/vaapi/vaapi_picture_native_pixmap_ozone.h
index 101728f36c1e1..eaced9a8ccadf 100644
--- a/media/gpu/vaapi/vaapi_picture_native_pixmap_ozone.h
+++ b/media/gpu/vaapi/vaapi_picture_native_pixmap_ozone.h
@@ -17,7 +17,7 @@ namespace gfx {
class NativePixmap;
} // namespace gfx
-namespace gl {
+namespace gpu {
class GLImageNativePixmap;
}
@@ -55,7 +55,7 @@ class VaapiPictureNativePixmapOzone : public VaapiPictureNativePixmap {
VaapiStatus Initialize(scoped_refptr<gfx::NativePixmap> pixmap);
// GLImage bound to the GL textures used by the VDA client.
- scoped_refptr<gl::GLImageNativePixmap> gl_image_;
+ scoped_refptr<gpu::GLImageNativePixmap> gl_image_;
};
} // namespace media
diff --git a/ui/gfx/linux/native_pixmap_dmabuf.h b/ui/gfx/linux/native_pixmap_dmabuf.h
index 7f134110417ea..f12d4f5eac89d 100644
--- a/ui/gfx/linux/native_pixmap_dmabuf.h
+++ b/ui/gfx/linux/native_pixmap_dmabuf.h
@@ -17,7 +17,7 @@
namespace gfx {
// This class converts a gfx::NativePixmapHandle to a gfx::NativePixmap.
-// It is useful because gl::GLImageNativePixmap::Initialize only takes
+// It is useful because gpu::GLImageNativePixmap::Initialize only takes
// a gfx::NativePixmap as input.
class GFX_EXPORT NativePixmapDmaBuf : public gfx::NativePixmap {
public:
diff --git a/ui/gl/BUILD.gn b/ui/gl/BUILD.gn
index cc23c0a8b4c64..2a07859c4dad8 100644
--- a/ui/gl/BUILD.gn
+++ b/ui/gl/BUILD.gn
@@ -226,8 +226,6 @@ component("gl") {
if (is_linux || is_chromeos || use_ozone) {
sources += [
- "gl_image_native_pixmap.cc",
- "gl_image_native_pixmap.h",
"native_pixmap_egl_binding_helper.cc",
"native_pixmap_egl_binding_helper.h",
]
diff --git a/ui/ozone/common/native_pixmap_egl_binding.cc b/ui/ozone/common/native_pixmap_egl_binding.cc
index 8dce01a41281e..2e18e73eb6cbb 100644
--- a/ui/ozone/common/native_pixmap_egl_binding.cc
+++ b/ui/ozone/common/native_pixmap_egl_binding.cc
@@ -8,7 +8,7 @@
#include "base/memory/scoped_refptr.h"
#include "base/notreached.h"
#include "ui/gl/gl_bindings.h"
-#include "ui/gl/gl_image_native_pixmap.h"
+#include "ui/gl/native_pixmap_egl_binding_helper.h"
namespace ui {
@@ -50,9 +50,9 @@ unsigned BufferFormatToGLDataType(gfx::BufferFormat format) {
} // namespace
NativePixmapEGLBinding::NativePixmapEGLBinding(
- scoped_refptr<gl::GLImageNativePixmap> gl_image,
+ std::unique_ptr<gl::NativePixmapEGLBindingHelper> binding_helper,
gfx::BufferFormat format)
- : gl_image_(std::move(gl_image)), format_(format) {}
+ : binding_helper_(std::move(binding_helper)), format_(format) {}
NativePixmapEGLBinding::~NativePixmapEGLBinding() = default;
// static
@@ -64,22 +64,22 @@ std::unique_ptr<NativePixmapGLBinding> NativePixmapEGLBinding::Create(
const gfx::ColorSpace& color_space,
GLenum target,
GLuint texture_id) {
- auto gl_image = gl::GLImageNativePixmap::CreateForPlane(
+ auto binding_helper = gl::NativePixmapEGLBindingHelper::CreateForPlane(
plane_size, plane_format, plane, std::move(pixmap), color_space, target,
texture_id);
- if (!gl_image) {
- LOG(ERROR) << "Unable to initialize GL image from pixmap";
+ if (!binding_helper) {
+ LOG(ERROR) << "Unable to initialize binding from pixmap";
return nullptr;
}
- auto binding = std::make_unique<NativePixmapEGLBinding>(std::move(gl_image),
- plane_format);
+ auto binding = std::make_unique<NativePixmapEGLBinding>(
+ std::move(binding_helper), plane_format);
return binding;
}
GLuint NativePixmapEGLBinding::GetInternalFormat() {
- return gl_image_->GetInternalFormat();
+ return binding_helper_->GetInternalFormat();
}
GLenum NativePixmapEGLBinding::GetDataType() {
diff --git a/ui/ozone/common/native_pixmap_egl_binding.h b/ui/ozone/common/native_pixmap_egl_binding.h
index 44d68be3527a4..c0382b1068426 100644
--- a/ui/ozone/common/native_pixmap_egl_binding.h
+++ b/ui/ozone/common/native_pixmap_egl_binding.h
@@ -15,16 +15,17 @@ class ColorSpace;
}
namespace gl {
-class GLImageNativePixmap;
+class NativePixmapEGLBindingHelper;
}
namespace ui {
-// A binding maintained between GLImageNativePixmap and GL Textures in Ozone.
+// A binding maintained between NativePixmap and GL Textures in Ozone.
class NativePixmapEGLBinding : public NativePixmapGLBinding {
public:
- NativePixmapEGLBinding(scoped_refptr<gl::GLImageNativePixmap> gl_image,
- gfx::BufferFormat format);
+ NativePixmapEGLBinding(
+ std::unique_ptr<gl::NativePixmapEGLBindingHelper> binding_helper,
+ gfx::BufferFormat format);
~NativePixmapEGLBinding() override;
static std::unique_ptr<NativePixmapGLBinding> Create(
@@ -41,10 +42,7 @@ class NativePixmapEGLBinding : public NativePixmapGLBinding {
GLenum GetDataType() override;
private:
- // TODO(hitawala): Merge BindTexImage, Initialize from GLImage and its
- // subclass NativePixmap to NativePixmapEGLBinding once we stop using them
- // elsewhere eg. VDA decoders in media.
- scoped_refptr<gl::GLImageNativePixmap> gl_image_;
+ std::unique_ptr<gl::NativePixmapEGLBindingHelper> binding_helper_;
gfx::BufferFormat format_;
};
diff --git a/ui/ozone/gl/BUILD.gn b/ui/ozone/gl/BUILD.gn
index 4fc90f0471362..6064eb6f83a8c 100644
--- a/ui/ozone/gl/BUILD.gn
+++ b/ui/ozone/gl/BUILD.gn
@@ -9,6 +9,14 @@ test("ozone_gl_unittests") {
deps = [
"//base/test:test_support",
+
+ # NOTE: The above tests of gpu::GLImageNativePixmap cannot easily be made
+ # to run as part of //gpu's gl_tests or gpu_unittests: they crash when run
+ # with the former due to differences in GL configuration, and they are
+ # skipped when run with the latter due to differences in Ozone
+ # configuration. Simply leave them here with this dependency for the short
+ # time remaining until GLImageNativePixmap is eliminated altogether.
+ "//gpu/command_buffer/service:gles2",
"//testing/gtest",
"//ui/gfx",
"//ui/gl:run_all_unittests",
diff --git a/ui/ozone/gl/DEPS b/ui/ozone/gl/DEPS
new file mode 100644
index 0000000000000..e6142e85d2154
--- /dev/null
+++ b/ui/ozone/gl/DEPS
@@ -0,0 +1,6 @@
+specific_include_rules = {
+ # NOTE: See comment in ./BUILD.gn with respect to this dependency.
+ "gl_image_ozone_native_pixmap_unittest\.cc": [
+ "+gpu/command_buffer/service/shared_image/gl_image_native_pixmap.h",
+ ],
+}
diff --git a/ui/ozone/gl/gl_image_ozone_native_pixmap_unittest.cc b/ui/ozone/gl/gl_image_ozone_native_pixmap_unittest.cc
index 9a538903c8ff0..1527df91a3238 100644
--- a/ui/ozone/gl/gl_image_ozone_native_pixmap_unittest.cc
+++ b/ui/ozone/gl/gl_image_ozone_native_pixmap_unittest.cc
@@ -5,10 +5,10 @@
#include <stdint.h>
#include <memory>
+#include "gpu/command_buffer/service/shared_image/gl_image_native_pixmap.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/buffer_types.h"
#include "ui/gfx/client_native_pixmap.h"
-#include "ui/gl/gl_image_native_pixmap.h"
#include "ui/gl/test/gl_image_test_template.h"
#include "ui/ozone/public/client_native_pixmap_factory_ozone.h"
#include "ui/ozone/public/ozone_platform.h"
@@ -83,7 +83,7 @@ class GLImageNativePixmapTestDelegate : public GLImageTestDelegateBase {
glGenTextures(1, &texture_id_);
}
- auto image = gl::GLImageNativePixmap::Create(
+ auto image = gpu::GLImageNativePixmap::Create(
size, format, std::move(pixmap), GetTextureTarget(), texture_id_);
EXPECT_TRUE(image);
return image;
@@ -100,8 +100,9 @@ class GLImageNativePixmapTestDelegate : public GLImageTestDelegateBase {
format == gfx::BufferFormat::YUV_420_BIPLANAR) {
return 1;
}
- if (format == gfx::BufferFormat::P010)
+ if (format == gfx::BufferFormat::P010) {
return 3;
+ }
return 0;
}

@ -0,0 +1,625 @@
diff -up chromium-112.0.5615.49/media/gpu/args.gni.wayland-vaapi chromium-112.0.5615.49/media/gpu/args.gni
--- chromium-112.0.5615.49/media/gpu/args.gni.wayland-vaapi 2023-03-30 02:33:53.000000000 +0200
+++ chromium-112.0.5615.49/media/gpu/args.gni 2023-04-14 21:29:41.776328044 +0200
@@ -6,10 +6,14 @@ import("//build/config/chromeos/ui_mode.
import("//build/config/ozone.gni")
declare_args() {
- # Indicates if X11 VA-API-based hardware acceleration is to be used.
- # See also the comment near the |use_vaapi| arg.
- use_vaapi_x11 = is_linux && ozone_platform_x11 &&
- (target_cpu == "x86" || target_cpu == "x64") && !is_castos
+ # Build Chrome support for using VA-API over X11. Note that setting this to true is
+ # not a guarantee that Chrome will use (or even try to use) VA-API over X11. In
+ # particular, it is possible to build Chrome with support for VA-API over X11 but
+ # pick Wayland as the Ozone backend at runtime. In this case, Chrome will try to
+ # use VA-API over DRM.
+ support_vaapi_over_x11 =
+ is_linux && ozone_platform_x11 &&
+ (target_cpu == "x86" || target_cpu == "x64") && !is_castos
}
declare_args() {
@@ -29,8 +33,9 @@ declare_args() {
# is typically the case on x86-based ChromeOS devices.
# VA-API should also be compiled by default on x11-using linux devices
# using x86/x64.
- use_vaapi = use_vaapi_x11 || (is_chromeos_lacros &&
- (target_cpu == "x86" || target_cpu == "x64"))
+ use_vaapi =
+ support_vaapi_over_x11 ||
+ (is_chromeos_lacros && (target_cpu == "x86" || target_cpu == "x64"))
# Indicates if ChromeOS protected media support exists. This is used
# to enable the CDM daemon in Chrome OS as well as support for
diff -up chromium-112.0.5615.49/media/gpu/BUILD.gn.wayland-vaapi chromium-112.0.5615.49/media/gpu/BUILD.gn
--- chromium-112.0.5615.49/media/gpu/BUILD.gn.wayland-vaapi 2023-03-30 02:33:53.000000000 +0200
+++ chromium-112.0.5615.49/media/gpu/BUILD.gn 2023-04-14 21:29:41.776328044 +0200
@@ -20,7 +20,7 @@ buildflag_header("buildflags") {
"USE_VAAPI_IMAGE_CODECS=$use_vaapi_image_codecs",
"USE_V4L2_CODEC=$use_v4l2_codec",
"USE_LIBV4L2=$use_v4lplugin",
- "USE_VAAPI_X11=$use_vaapi_x11",
+ "SUPPORT_VAAPI_OVER_X11=$support_vaapi_over_x11",
]
}
diff -up chromium-112.0.5615.49/media/gpu/vaapi/BUILD.gn.wayland-vaapi chromium-112.0.5615.49/media/gpu/vaapi/BUILD.gn
--- chromium-112.0.5615.49/media/gpu/vaapi/BUILD.gn.wayland-vaapi 2023-03-30 02:33:53.000000000 +0200
+++ chromium-112.0.5615.49/media/gpu/vaapi/BUILD.gn 2023-04-14 21:29:41.776328044 +0200
@@ -17,7 +17,7 @@ assert(use_vaapi)
generate_stubs("libva_stubs") {
extra_header = "va_stub_header.fragment"
sigs = [ "va.sigs" ]
- if (use_vaapi_x11) {
+ if (support_vaapi_over_x11) {
sigs += [ "va_x11.sigs" ]
}
if (is_chromeos_ash) {
@@ -139,7 +139,7 @@ source_set("vaapi") {
]
}
- if (use_vaapi_x11) {
+ if (support_vaapi_over_x11) {
deps += [ "//ui/gfx/x" ]
sources += [
"vaapi_picture_native_pixmap_angle.cc",
@@ -213,7 +213,7 @@ source_set("common") {
deps += [ "//ui/ozone" ]
}
- if (use_vaapi_x11) {
+ if (support_vaapi_over_x11) {
deps += [ "//ui/gfx/x" ]
}
diff -up chromium-112.0.5615.49/media/gpu/vaapi/vaapi_picture_factory.cc.wayland-vaapi chromium-112.0.5615.49/media/gpu/vaapi/vaapi_picture_factory.cc
--- chromium-112.0.5615.49/media/gpu/vaapi/vaapi_picture_factory.cc.wayland-vaapi 2023-03-30 02:33:53.000000000 +0200
+++ chromium-112.0.5615.49/media/gpu/vaapi/vaapi_picture_factory.cc 2023-04-15 07:14:05.573796794 +0200
@@ -13,9 +13,9 @@
#if BUILDFLAG(IS_OZONE)
#include "media/gpu/vaapi/vaapi_picture_native_pixmap_ozone.h"
#endif // BUILDFLAG(IS_OZONE)
-#if BUILDFLAG(USE_VAAPI_X11)
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
#include "media/gpu/vaapi/vaapi_picture_native_pixmap_angle.h"
-#endif // BUILDFLAG(USE_VAAPI_X11)
+#endif // BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
#if defined(USE_EGL)
#include "media/gpu/vaapi/vaapi_picture_native_pixmap_egl.h"
#endif
@@ -41,19 +41,28 @@ std::unique_ptr<VaapiPicture> CreateVaap
} // namespace
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
+VaapiPictureFactory::VaapiPictureFactory(
+ absl::optional<bool> may_use_vaapi_over_x11)
+ : may_use_vaapi_over_x11_(may_use_vaapi_over_x11) {
+#else
VaapiPictureFactory::VaapiPictureFactory() {
+#endif // BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
vaapi_impl_pairs_.insert(
std::make_pair(gl::kGLImplementationEGLGLES2,
VaapiPictureFactory::kVaapiImplementationDrm));
-#if BUILDFLAG(USE_VAAPI_X11)
- vaapi_impl_pairs_.insert(
- std::make_pair(gl::kGLImplementationEGLANGLE,
- VaapiPictureFactory::kVaapiImplementationAngle));
-#elif BUILDFLAG(IS_OZONE)
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
+ CHECK(may_use_vaapi_over_x11_.has_value());
+ if (may_use_vaapi_over_x11_.value()) {
+ vaapi_impl_pairs_.insert(
+ std::make_pair(gl::kGLImplementationEGLANGLE,
+ VaapiPictureFactory::kVaapiImplementationAngle));
+ }
+#else
vaapi_impl_pairs_.insert(
std::make_pair(gl::kGLImplementationEGLANGLE,
VaapiPictureFactory::kVaapiImplementationDrm));
-#endif
+#endif // BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
DeterminePictureCreationAndDownloadingMechanism();
}
@@ -93,19 +102,19 @@ VaapiPictureFactory::GetVaapiImplementat
}
uint32_t VaapiPictureFactory::GetGLTextureTarget() {
-#if BUILDFLAG(USE_VAAPI_X11)
- return GL_TEXTURE_2D;
-#else
+#if BUILDFLAG(IS_CHROMEOS)
return GL_TEXTURE_EXTERNAL_OES;
-#endif
+#else
+ return GL_TEXTURE_2D;
+#endif // BUILDFLAG(IS_CHROMEOS)
}
gfx::BufferFormat VaapiPictureFactory::GetBufferFormat() {
-#if BUILDFLAG(USE_VAAPI_X11)
- return gfx::BufferFormat::RGBX_8888;
-#else
+#if BUILDFLAG(IS_CHROMEOS)
return gfx::BufferFormat::YUV_420_BIPLANAR;
-#endif
+#else
+ return gfx::BufferFormat::RGBX_8888;
+#endif // BUILDFLAG(IS_CHROMEOS)
}
void VaapiPictureFactory::DeterminePictureCreationAndDownloadingMechanism() {
@@ -113,19 +122,23 @@ void VaapiPictureFactory::DeterminePictu
#if BUILDFLAG(IS_OZONE)
// We can be called without GL initialized, which is valid if we use Ozone.
case kVaapiImplementationNone:
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
+ DCHECK(may_use_vaapi_over_x11_.value_or(false));
+#endif
create_picture_cb_ = base::BindRepeating(
&CreateVaapiPictureNativeImpl<VaapiPictureNativePixmapOzone>);
needs_vpp_for_downloading_ = true;
break;
#endif // BUILDFLAG(IS_OZONE)
-#if BUILDFLAG(USE_VAAPI_X11)
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
case kVaapiImplementationAngle:
+ DCHECK(may_use_vaapi_over_x11_.value_or(false));
create_picture_cb_ = base::BindRepeating(
&CreateVaapiPictureNativeImpl<VaapiPictureNativePixmapAngle>);
// Neither VaapiTFPPicture or VaapiPictureNativePixmapAngle needs the VPP.
needs_vpp_for_downloading_ = false;
break;
-#endif // BUILDFLAG(USE_VAAPI_X11)
+#endif // BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
case kVaapiImplementationDrm:
#if BUILDFLAG(IS_OZONE)
create_picture_cb_ = base::BindRepeating(
diff -up chromium-112.0.5615.49/media/gpu/vaapi/vaapi_picture_factory.h.wayland-vaapi chromium-112.0.5615.49/media/gpu/vaapi/vaapi_picture_factory.h
--- chromium-112.0.5615.49/media/gpu/vaapi/vaapi_picture_factory.h.wayland-vaapi 2023-03-30 02:33:53.000000000 +0200
+++ chromium-112.0.5615.49/media/gpu/vaapi/vaapi_picture_factory.h 2023-04-14 21:29:41.777328062 +0200
@@ -35,7 +35,11 @@ class MEDIA_GPU_EXPORT VaapiPictureFacto
kVaapiImplementationAngle,
};
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
+ explicit VaapiPictureFactory(absl::optional<bool> may_use_vaapi_over_x11);
+#else
VaapiPictureFactory();
+#endif // BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
VaapiPictureFactory(const VaapiPictureFactory&) = delete;
VaapiPictureFactory& operator=(const VaapiPictureFactory&) = delete;
@@ -84,6 +88,11 @@ class MEDIA_GPU_EXPORT VaapiPictureFacto
CreatePictureCB create_picture_cb_;
bool needs_vpp_for_downloading_ = false;
+
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
+ // See comment in `VaapiWrapper::MayUseVaapiOverX11()`.
+ absl::optional<bool> may_use_vaapi_over_x11_;
+#endif // BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
};
} // namespace media
diff -up chromium-112.0.5615.49/media/gpu/vaapi/vaapi_picture_native_pixmap_ozone.cc.wayland-vaapi chromium-112.0.5615.49/media/gpu/vaapi/vaapi_picture_native_pixmap_ozone.cc
--- chromium-112.0.5615.49/media/gpu/vaapi/vaapi_picture_native_pixmap_ozone.cc.wayland-vaapi 2023-03-30 02:33:53.000000000 +0200
+++ chromium-112.0.5615.49/media/gpu/vaapi/vaapi_picture_native_pixmap_ozone.cc 2023-04-14 21:29:41.777328062 +0200
@@ -113,7 +113,7 @@ VaapiStatus VaapiPictureNativePixmapOzon
ui::OzonePlatform* platform = ui::OzonePlatform::GetInstance();
ui::SurfaceFactoryOzone* factory = platform->GetSurfaceFactoryOzone();
gfx::BufferUsage buffer_usage = gfx::BufferUsage::SCANOUT_VDA_WRITE;
-#if BUILDFLAG(USE_VAAPI_X11)
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
// The 'VaapiVideoDecodeAccelerator' requires the VPP to download the decoded
// frame from the internal surface to the allocated native pixmap.
// 'SCANOUT_VDA_WRITE' is used for 'YUV_420_BIPLANAR' on ChromeOS; For Linux,
diff -up chromium-112.0.5615.49/media/gpu/vaapi/vaapi_video_decode_accelerator.cc.wayland-vaapi chromium-112.0.5615.49/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
--- chromium-112.0.5615.49/media/gpu/vaapi/vaapi_video_decode_accelerator.cc.wayland-vaapi 2023-04-14 21:29:41.775328024 +0200
+++ chromium-112.0.5615.49/media/gpu/vaapi/vaapi_video_decode_accelerator.cc 2023-04-14 21:29:41.777328062 +0200
@@ -185,7 +185,12 @@ bool VaapiVideoDecodeAccelerator::Initia
Client* client) {
DCHECK(task_runner_->BelongsToCurrentThread());
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
+ vaapi_picture_factory_ =
+ std::make_unique<VaapiPictureFactory>(VaapiWrapper::MayUseVaapiOverX11());
+#else
vaapi_picture_factory_ = std::make_unique<VaapiPictureFactory>();
+#endif // BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
if (config.is_encrypted()) {
NOTREACHED() << "Encrypted streams are not supported for this VDA";
@@ -1211,7 +1216,7 @@ VaapiVideoDecodeAccelerator::GetSupporte
VaapiVideoDecodeAccelerator::BufferAllocationMode
VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() {
-#if BUILDFLAG(USE_VAAPI_X11)
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
// The IMPORT mode is used for Android on Chrome OS, so this doesn't apply
// here.
DCHECK_NE(output_mode_, VideoDecodeAccelerator::Config::OutputMode::IMPORT);
diff -up chromium-112.0.5615.49/media/gpu/vaapi/vaapi_video_decode_accelerator_unittest.cc.wayland-vaapi chromium-112.0.5615.49/media/gpu/vaapi/vaapi_video_decode_accelerator_unittest.cc
--- chromium-112.0.5615.49/media/gpu/vaapi/vaapi_video_decode_accelerator_unittest.cc.wayland-vaapi 2023-03-30 02:33:53.000000000 +0200
+++ chromium-112.0.5615.49/media/gpu/vaapi/vaapi_video_decode_accelerator_unittest.cc 2023-04-15 07:38:19.058957112 +0200
@@ -41,6 +41,11 @@ struct TestParams {
bool decode_using_client_picture_buffers;
};
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
+// TODO: Add it in TestParams to cover Ozone/Wayland.
+bool kMayUseVaapiOverX11 = true;
+#endif // BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
+
constexpr int32_t kBitstreamId = 123;
constexpr size_t kInputSize = 256;
@@ -134,7 +139,13 @@ class MockVaapiPicture : public VaapiPic
class MockVaapiPictureFactory : public VaapiPictureFactory {
public:
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
+ explicit MockVaapiPictureFactory(absl::optional<bool> may_use_vaapi_over_x11)
+ : VaapiPictureFactory(may_use_vaapi_over_x11) {}
+#else
MockVaapiPictureFactory() = default;
+#endif // BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
+
~MockVaapiPictureFactory() override = default;
MOCK_METHOD3(MockCreateVaapiPicture,
@@ -167,7 +178,12 @@ class VaapiVideoDecodeAcceleratorTest :
const scoped_refptr<gl::GLImage>& image) { return true; })),
decoder_thread_("VaapiVideoDecodeAcceleratorTestThread"),
mock_decoder_(new ::testing::StrictMock<MockAcceleratedVideoDecoder>),
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
+ mock_vaapi_picture_factory_(
+ new MockVaapiPictureFactory(kMayUseVaapiOverX11)),
+#else
mock_vaapi_picture_factory_(new MockVaapiPictureFactory()),
+#endif // BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
mock_vaapi_wrapper_(new MockVaapiWrapper(VaapiWrapper::kDecode)),
mock_vpp_vaapi_wrapper_(new MockVaapiWrapper(VaapiWrapper::kDecode)),
weak_ptr_factory_(this) {
@@ -422,11 +438,13 @@ TEST_P(VaapiVideoDecodeAcceleratorTest,
mock_vaapi_picture_factory_->GetVaapiImplementation(
gl::kGLImplementationEGLGLES2));
-#if BUILDFLAG(USE_VAAPI_X11)
- EXPECT_EQ(VaapiPictureFactory::kVaapiImplementationAngle,
- mock_vaapi_picture_factory_->GetVaapiImplementation(
- gl::kGLImplementationEGLANGLE));
-#elif BUILDFLAG(IS_OZONE)
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
+ if (kMayUseVaapiOverX11) {
+ EXPECT_EQ(VaapiPictureFactory::kVaapiImplementationAngle,
+ mock_vaapi_picture_factory_->GetVaapiImplementation(
+ gl::kGLImplementationEGLANGLE));
+ }
+#else
EXPECT_EQ(VaapiPictureFactory::kVaapiImplementationDrm,
mock_vaapi_picture_factory_->GetVaapiImplementation(
gl::kGLImplementationEGLANGLE));
diff -up chromium-112.0.5615.49/media/gpu/vaapi/vaapi_wrapper.cc.wayland-vaapi chromium-112.0.5615.49/media/gpu/vaapi/vaapi_wrapper.cc
--- chromium-112.0.5615.49/media/gpu/vaapi/vaapi_wrapper.cc.wayland-vaapi 2023-03-30 02:33:53.000000000 +0200
+++ chromium-112.0.5615.49/media/gpu/vaapi/vaapi_wrapper.cc 2023-04-14 21:29:41.777328062 +0200
@@ -62,7 +62,7 @@
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_implementation.h"
-#if BUILDFLAG(USE_VAAPI_X11)
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
typedef XID Drawable;
extern "C" {
@@ -70,7 +70,7 @@ extern "C" {
}
#include "ui/gfx/x/connection.h" // nogncheck
-#endif // BUILDFLAG(USE_VAAPI_X11)
+#endif // BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
#if BUILDFLAG(IS_OZONE)
#include "ui/ozone/public/ozone_platform.h"
@@ -84,14 +84,14 @@ using media_gpu_vaapi::kModuleVa_prot;
using media_gpu_vaapi::kModuleVa;
using media_gpu_vaapi::kModuleVa_drm;
-#if BUILDFLAG(USE_VAAPI_X11)
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
using media_gpu_vaapi::kModuleVa_x11;
-#endif // BUILDFLAG(USE_VAAPI_X11)
+#endif // BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
using media_gpu_vaapi::InitializeStubs;
using media_gpu_vaapi::IsVaInitialized;
-#if BUILDFLAG(USE_VAAPI_X11)
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
using media_gpu_vaapi::IsVa_x11Initialized;
-#endif // BUILDFLAG(USE_VAAPI_X11)
+#endif // BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
using media_gpu_vaapi::IsVa_drmInitialized;
using media_gpu_vaapi::StubPathMap;
@@ -680,6 +680,12 @@ class VADisplayState {
void SetDrmFd(base::PlatformFile fd) { drm_fd_.reset(HANDLE_EINTR(dup(fd))); }
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
+ absl::optional<bool> MayUseVaapiOverX11() const {
+ return may_use_vaapi_over_x11_;
+ }
+#endif
+
private:
friend class base::NoDestructor<VADisplayState>;
@@ -702,6 +708,13 @@ class VADisplayState {
// Drm fd used to obtain access to the driver interface by VA.
base::ScopedFD drm_fd_;
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
+ // Whether we'll be possibly using VA-API over Ozone/X11. This should only be
+ // set (if at all) during the pre-sandbox initialization. If absl::nullopt,
+ // all calls to Initialize() will return false immediately.
+ absl::optional<bool> may_use_vaapi_over_x11_;
+#endif
+
// The VADisplay handle. Valid between Initialize() and Deinitialize().
VADisplay va_display_;
@@ -723,6 +736,15 @@ VADisplayState* VADisplayState::Get() {
// static
void VADisplayState::PreSandboxInitialization() {
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
+ if (ui::OzonePlatform::IsInitialized()) {
+ VADisplayState::Get()->may_use_vaapi_over_x11_ =
+ ui::OzonePlatform::GetInstance()
+ ->GetPlatformProperties()
+ .supports_vaapi_x11;
+ }
+#endif
+
constexpr char kRenderNodeFilePattern[] = "/dev/dri/renderD%d";
// This loop ends on either the first card that does not exist or the first
// render node that is not vgem.
@@ -755,20 +777,18 @@ VADisplayState::VADisplayState()
bool VADisplayState::Initialize() {
base::AutoLock auto_lock(va_lock_);
-#if BUILDFLAG(IS_OZONE) && BUILDFLAG(IS_LINUX)
- // TODO(crbug.com/1116701): add vaapi support for other Ozone platforms on
- // Linux. See comment in OzonePlatform::PlatformProperties::supports_vaapi
- // for more details. This will also require revisiting everything that's
- // guarded by USE_VAAPI_X11. For example, if USE_VAAPI_X11 is true, but the
- // user chooses the Wayland backend for Ozone at runtime, then many things (if
- // not all) that we do for X11 won't apply.
- if (!ui::OzonePlatform::GetInstance()->GetPlatformProperties().supports_vaapi)
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
+ if (!may_use_vaapi_over_x11_.has_value())
return false;
#endif
bool libraries_initialized = IsVaInitialized() && IsVa_drmInitialized();
-#if BUILDFLAG(USE_VAAPI_X11)
- libraries_initialized = libraries_initialized && IsVa_x11Initialized();
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
+ // Initialize VA-API X11 display backend for Linux Ozone/X11.
+ // See comment in OzonePlatform::PlatformProperties::supports_vaapi_x11 for
+ // more details.
+ if (may_use_vaapi_over_x11_.value())
+ libraries_initialized = libraries_initialized && IsVa_x11Initialized();
#endif
if (!libraries_initialized)
return false;
@@ -783,7 +803,7 @@ bool VADisplayState::Initialize() {
return success;
}
-#if BUILDFLAG(USE_VAAPI_X11)
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
absl::optional<VADisplay> GetVADisplayStateX11(const base::ScopedFD& drm_fd) {
switch (gl::GetGLImplementation()) {
@@ -809,13 +829,19 @@ absl::optional<VADisplay> GetVADisplaySt
}
}
-#else
+#endif // BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
absl::optional<VADisplay> GetVADisplayState(const base::ScopedFD& drm_fd) {
switch (gl::GetGLImplementation()) {
case gl::kGLImplementationEGLGLES2:
+#if BUILDFLAG(IS_CHROMEOS)
+ // GetVADisplayState() should not get called on Linux with Ozone/X11
+ // (GetVADisplayStateX11() should get called instead), and we haven't tried
+ // VA-API decoding on Linux with Ozone/Wayland and anything other than
+ // native EGL/GLES2.
case gl::kGLImplementationEGLANGLE:
case gl::kGLImplementationNone:
+#endif
return vaGetDisplayDRM(drm_fd.get());
default:
LOG(WARNING) << "VAAPI video acceleration not available for "
@@ -825,18 +851,23 @@ absl::optional<VADisplay> GetVADisplaySt
}
}
-#endif // BUILDFLAG(USE_VAAPI_X11)
-
bool VADisplayState::InitializeVaDisplay_Locked() {
- absl::optional<VADisplay> display =
-#if BUILDFLAG(USE_VAAPI_X11)
- GetVADisplayStateX11(drm_fd_);
-#else
- GetVADisplayState(drm_fd_);
-#endif
+ absl::optional<VADisplay> display;
- if (!display)
- return false;
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
+ DCHECK(may_use_vaapi_over_x11_.has_value());
+ if (may_use_vaapi_over_x11_.value()) {
+ display = GetVADisplayStateX11(drm_fd_);
+ if (!display)
+ return false;
+ }
+#endif // BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
+
+ if (!display) {
+ display = GetVADisplayState(drm_fd_);
+ if (!display)
+ return false;
+ }
va_display_ = *display;
if (!vaDisplayIsValid(va_display_)) {
@@ -1671,6 +1702,13 @@ scoped_refptr<VaapiWrapper> VaapiWrapper
enforce_sequence_affinity);
}
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
+// static
+absl::optional<bool> VaapiWrapper::MayUseVaapiOverX11() {
+ return VADisplayState::Get()->MayUseVaapiOverX11();
+}
+#endif
+
// static
std::vector<SVCScalabilityMode> VaapiWrapper::GetSupportedScalabilityModes(
VideoCodecProfile media_profile,
@@ -2684,12 +2722,13 @@ bool VaapiWrapper::MapAndCopyAndExecute(
return Execute_Locked(va_surface_id, va_buffer_ids);
}
-#if BUILDFLAG(USE_VAAPI_X11)
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
bool VaapiWrapper::PutSurfaceIntoPixmap(VASurfaceID va_surface_id,
x11::Pixmap x_pixmap,
gfx::Size dest_size) {
CHECK(!enforce_sequence_affinity_ ||
sequence_checker_.CalledOnValidSequence());
+ CHECK(MayUseVaapiOverX11().value_or(false));
base::AutoLockMaybe auto_lock(va_lock_.get());
VAStatus va_res = vaSyncSurface(va_display_, va_surface_id);
@@ -2703,7 +2742,7 @@ bool VaapiWrapper::PutSurfaceIntoPixmap(
VA_SUCCESS_OR_RETURN(va_res, VaapiFunctions::kVAPutSurface, false);
return true;
}
-#endif // BUILDFLAG(USE_VAAPI_X11)
+#endif // BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
std::unique_ptr<ScopedVAImage> VaapiWrapper::CreateVaImage(
VASurfaceID va_surface_id,
@@ -3105,7 +3144,7 @@ void VaapiWrapper::PreSandboxInitializat
paths[kModuleVa].push_back(std::string("libva.so.") + va_suffix);
paths[kModuleVa_drm].push_back(std::string("libva-drm.so.") + va_suffix);
-#if BUILDFLAG(USE_VAAPI_X11)
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
paths[kModuleVa_x11].push_back(std::string("libva-x11.so.") + va_suffix);
#endif
#if BUILDFLAG(IS_CHROMEOS_ASH)
diff -up chromium-112.0.5615.49/media/gpu/vaapi/vaapi_wrapper.h.wayland-vaapi chromium-112.0.5615.49/media/gpu/vaapi/vaapi_wrapper.h
--- chromium-112.0.5615.49/media/gpu/vaapi/vaapi_wrapper.h.wayland-vaapi 2023-03-30 02:33:53.000000000 +0200
+++ chromium-112.0.5615.49/media/gpu/vaapi/vaapi_wrapper.h 2023-04-14 21:29:41.777328062 +0200
@@ -36,9 +36,9 @@
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "ui/gfx/geometry/size.h"
-#if BUILDFLAG(USE_VAAPI_X11)
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
#include "ui/gfx/x/xproto.h" // nogncheck
-#endif // BUILDFLAG(USE_VAAPI_X11)
+#endif // BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
namespace gfx {
enum class BufferFormat;
@@ -186,6 +186,16 @@ class MEDIA_GPU_EXPORT VaapiWrapper
VaapiWrapper(const VaapiWrapper&) = delete;
VaapiWrapper& operator=(const VaapiWrapper&) = delete;
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
+ // Returns true if VaapiWrapper instances may use VA-API over X11 and false
+ // otherwise (VA-API over DRM will be used). If this returns absl::nullopt,
+ // it's because it was not possible to determine how VA-API may be used. This
+ // should only be called after PreSandboxInitialization() (which is assumed to
+ // be called only once during the GPU process startup) and is safe to call
+ // from any thread. Additionally, this should always return the same value.
+ static absl::optional<bool> MayUseVaapiOverX11();
+#endif
+
// Returns the supported SVC scalability modes for specified profile.
static std::vector<SVCScalabilityMode> GetSupportedScalabilityModes(
VideoCodecProfile media_profile,
@@ -439,13 +449,13 @@ class MEDIA_GPU_EXPORT VaapiWrapper
VASurfaceID va_surface_id,
const std::vector<std::pair<VABufferID, VABufferDescriptor>>& va_buffers);
-#if BUILDFLAG(USE_VAAPI_X11)
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
// Put data from |va_surface_id| into |x_pixmap| of size
// |dest_size|, converting/scaling to it.
[[nodiscard]] bool PutSurfaceIntoPixmap(VASurfaceID va_surface_id,
x11::Pixmap x_pixmap,
gfx::Size dest_size);
-#endif // BUILDFLAG(USE_VAAPI_X11)
+#endif // BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
// Creates a ScopedVAImage from a VASurface |va_surface_id| and map it into
// memory with the given |format| and |size|. If |format| is not equal to the
diff -up chromium-112.0.5615.49/media/gpu/vaapi/va_stub_header.fragment.wayland-vaapi chromium-112.0.5615.49/media/gpu/vaapi/va_stub_header.fragment
--- chromium-112.0.5615.49/media/gpu/vaapi/va_stub_header.fragment.wayland-vaapi 2023-03-30 02:33:53.000000000 +0200
+++ chromium-112.0.5615.49/media/gpu/vaapi/va_stub_header.fragment 2023-04-14 21:29:41.777328062 +0200
@@ -7,8 +7,8 @@ extern "C" {
#include <va/va_drm.h>
#include <va/va.h>
-#if BUILDFLAG(USE_VAAPI_X11)
+#if BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
#include <va/va_x11.h>
-#endif // BUILDFLAG(USE_VAAPI_X11)
+#endif // BUILDFLAG(SUPPORT_VAAPI_OVER_X11)
}
diff -up chromium-112.0.5615.49/ui/ozone/platform/x11/ozone_platform_x11.cc.wayland-vaapi chromium-112.0.5615.49/ui/ozone/platform/x11/ozone_platform_x11.cc
--- chromium-112.0.5615.49/ui/ozone/platform/x11/ozone_platform_x11.cc.wayland-vaapi 2023-03-30 02:34:19.000000000 +0200
+++ chromium-112.0.5615.49/ui/ozone/platform/x11/ozone_platform_x11.cc 2023-04-14 21:29:41.778328082 +0200
@@ -197,7 +197,7 @@ class OzonePlatformX11 : public OzonePla
properties->app_modal_dialogs_use_event_blocker = true;
properties->fetch_buffer_formats_for_gmb_on_gpu = true;
#if BUILDFLAG(IS_LINUX)
- properties->supports_vaapi = true;
+ properties->supports_vaapi_x11 = true;
#endif
initialised = true;
diff -up chromium-112.0.5615.49/ui/ozone/public/ozone_platform.h.wayland-vaapi chromium-112.0.5615.49/ui/ozone/public/ozone_platform.h
--- chromium-112.0.5615.49/ui/ozone/public/ozone_platform.h.wayland-vaapi 2023-03-30 02:34:19.000000000 +0200
+++ chromium-112.0.5615.49/ui/ozone/public/ozone_platform.h 2023-04-14 21:29:41.778328082 +0200
@@ -145,12 +145,13 @@ class COMPONENT_EXPORT(OZONE) OzonePlatf
bool fetch_buffer_formats_for_gmb_on_gpu = false;
#if BUILDFLAG(IS_LINUX)
- // TODO(crbug.com/1116701): add vaapi support for other Ozone platforms on
- // Linux. At the moment, VA-API Linux implementation supports only X11
- // backend. This implementation must be refactored to support Ozone
- // properly. As a temporary solution, VA-API on Linux checks if vaapi is
- // supported (which implicitly means that it is Ozone/X11).
- bool supports_vaapi = false;
+ // VA-API supports different display backends.
+ // See https://github.com/intel/libva/blob/master/va/va_backend.h
+ //
+ // VA/DRM and VA/X11 are used by Chromium at the moment. All Ozone platforms
+ // support VA/DRM by default. `supports_vaapi_x11` indicates if VA/X11
+ // supported; it is true only on Ozone/X11 platform.
+ bool supports_vaapi_x11 = false;
#endif
// Indicates that the platform allows client applications to manipulate

@ -1,46 +0,0 @@
diff -up chromium-115.0.5790.40/chrome/test/chromedriver/capabilities.cc.me chromium-115.0.5790.40/chrome/test/chromedriver/capabilities.cc
--- chromium-115.0.5790.40/chrome/test/chromedriver/capabilities.cc.me 2023-06-25 10:06:58.445990069 +0200
+++ chromium-115.0.5790.40/chrome/test/chromedriver/capabilities.cc 2023-06-25 10:51:17.640818231 +0200
@@ -355,7 +355,7 @@ Status ParseMobileEmulation(const base::
"'version' field of type string");
}
- brands.emplace_back(*brand, *version);
+ brands.emplace_back() = {*brand, *version};
}
client_hints.brands = std::move(brands);
@@ -392,7 +392,7 @@ Status ParseMobileEmulation(const base::
"a 'version' field of type string");
}
- full_version_list.emplace_back(*brand, *version);
+ full_version_list.emplace_back() = {*brand, *version};
}
client_hints.full_version_list = std::move(full_version_list);
diff -up chromium-116.0.5845.96/chrome/browser/content_settings/one_time_permission_provider.cc.me chromium-116.0.5845.96/chrome/browser/content_settings/one_time_permission_provider.cc
--- chromium-116.0.5845.96/chrome/browser/content_settings/one_time_permission_provider.cc.me 2023-08-15 21:34:58.922855428 +0200
+++ chromium-116.0.5845.96/chrome/browser/content_settings/one_time_permission_provider.cc 2023-08-15 21:39:23.310434237 +0200
@@ -207,8 +207,8 @@ void OneTimePermissionProvider::OnSuspen
while (rule_iterator && rule_iterator->HasNext()) {
auto rule = rule_iterator->Next();
- patterns_to_delete.emplace_back(setting_type, rule->primary_pattern,
- rule->secondary_pattern);
+ patterns_to_delete.emplace_back() = {setting_type, rule->primary_pattern,
+ rule->secondary_pattern};
permissions::PermissionUmaUtil::RecordOneTimePermissionEvent(
setting_type,
permissions::OneTimePermissionEvent::EXPIRED_ON_SUSPEND);
@@ -302,8 +302,8 @@ void OneTimePermissionProvider::DeleteEn
auto rule = rule_iterator->Next();
if (rule->primary_pattern.Matches(origin_gurl) &&
rule->secondary_pattern.Matches(origin_gurl)) {
- patterns_to_delete.emplace_back(
- content_setting_type, rule->primary_pattern, rule->secondary_pattern);
+ patterns_to_delete.emplace_back() = {
+ content_setting_type, rule->primary_pattern, rule->secondary_pattern};
permissions::PermissionUmaUtil::RecordOneTimePermissionEvent(
content_setting_type, trigger_event);
}

@ -1,364 +0,0 @@
diff -up chromium-116.0.5845.50/net/dns/host_resolver_cache.cc.me chromium-116.0.5845.50/net/dns/host_resolver_cache.cc
--- chromium-116.0.5845.50/net/dns/host_resolver_cache.cc.me
+++ chromium-116.0.5845.50/net/dns/host_resolver_cache.cc
@@ -161,7 +161,7 @@ void HostResolverCache::Set(
std::string domain_name = result->domain_name();
entries_.emplace(
- Key(std::move(domain_name), network_anonymization_key),
+ Key{std::move(domain_name), network_anonymization_key},
Entry(std::move(result), source, secure, staleness_generation_));
if (entries_.size() > max_entries_) {
diff -up chromium-116.0.5845.50/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc.me chromium-116.0.5845.50/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc
--- chromium-116.0.5845.50/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc.me 2023-08-02 15:17:52.613858423 +0200
+++ chromium-116.0.5845.50/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc 2023-08-02 15:18:43.269790877 +0200
@@ -1496,7 +1496,7 @@ void SkiaOutputSurfaceImplOnGpu::CopyOut
// Issue readbacks from the surfaces:
for (size_t i = 0; i < CopyOutputResult::kNV12MaxPlanes; ++i) {
- SkISize size(plane_surfaces[i]->width(), plane_surfaces[i]->height());
+ SkISize size{plane_surfaces[i]->width(), plane_surfaces[i]->height()};
SkImageInfo dst_info = SkImageInfo::Make(
size, (i == 0) ? kAlpha_8_SkColorType : kR8G8_unorm_SkColorType,
kUnpremul_SkAlphaType);
diff -up chromium-116.0.5845.50/third_party/blink/renderer/platform/fonts/palette_interpolation.cc.me chromium-116.0.5845.50/third_party/blink/renderer/platform/fonts/palette_interpolation.cc
--- chromium-116.0.5845.50/third_party/blink/renderer/platform/fonts/palette_interpolation.cc.me 2023-08-02 21:32:14.195705494 +0200
+++ chromium-116.0.5845.50/third_party/blink/renderer/platform/fonts/palette_interpolation.cc 2023-08-02 21:59:08.156532934 +0200
@@ -31,7 +31,7 @@ Vector<FontPalette::FontPaletteOverride>
color_interpolation_space, hue_interpolation_method, start_color,
end_color, percentage, alpha_multiplier);
- FontPalette::FontPaletteOverride result_color_record(i, result_color);
+ FontPalette::FontPaletteOverride result_color_record{static_cast<int>(i), result_color};
result_color_records.push_back(result_color_record);
}
return result_color_records;
diff -up chromium-116.0.5845.50/ui/base/wayland/color_manager_util.h.me chromium-116.0.5845.50/ui/base/wayland/color_manager_util.h
--- chromium-116.0.5845.50/ui/base/wayland/color_manager_util.h.me 2023-08-03 08:27:11.371750178 +0200
+++ chromium-116.0.5845.50/ui/base/wayland/color_manager_util.h 2023-08-03 10:39:07.266989323 +0200
@@ -52,53 +52,53 @@ constexpr auto kChromaticityMap = base::
zcr_color_manager_v1_chromaticity_names,
PrimaryVersion>(
{{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT601_525_LINE,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::SMPTE170M,
- kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::SMPTE170M,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT601_625_LINE,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::BT470BG,
- kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::BT470BG,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTE170M,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::SMPTE170M,
- kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::SMPTE170M,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT709,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::BT709, kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::BT709, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT2020,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::BT2020, kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::BT2020, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SRGB,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::BT709, kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::BT709, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_DISPLAYP3,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::P3, kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::P3, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_ADOBERGB,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::ADOBE_RGB,
- kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::ADOBE_RGB,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_WIDE_GAMUT_COLOR_SPIN,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::WIDE_GAMUT_COLOR_SPIN,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_WIDE_GAMUT_COLOR_SPIN_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_WIDE_GAMUT_COLOR_SPIN_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT470M,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::BT470M,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT470M_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT470M_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTE240M,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::SMPTE240M,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTE240M_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTE240M_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_XYZ_D50,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::XYZ_D50,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_XYZ_D50_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_XYZ_D50_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST428_1,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::SMPTEST428_1,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST428_1_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST428_1_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST431_2,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::SMPTEST431_2,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST431_2_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST431_2_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_FILM,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::FILM,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_FILM_SINCE_VERSION)}});
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_FILM_SINCE_VERSION}}});
// A map from the zcr_color_manager_v1 eotf_names enum values
// representing well-known EOTFs, to their equivalent TransferIDs.
@@ -107,65 +107,65 @@ constexpr auto kEotfMap = base::MakeFixe
zcr_color_manager_v1_eotf_names,
TransferVersion>({
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LINEAR,
- TransferVersion(gfx::ColorSpace::TransferID::LINEAR,
- kDefaultSinceVersion)},
+ TransferVersion{gfx::ColorSpace::TransferID::LINEAR,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB,
- TransferVersion(gfx::ColorSpace::TransferID::SRGB, kDefaultSinceVersion)},
+ TransferVersion{gfx::ColorSpace::TransferID::SRGB, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709,
- TransferVersion(gfx::ColorSpace::TransferID::BT709,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::BT709,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2087,
- TransferVersion(gfx::ColorSpace::TransferID::GAMMA24,
- kDefaultSinceVersion)},
+ TransferVersion{gfx::ColorSpace::TransferID::GAMMA24,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_ADOBERGB,
// This is ever so slightly inaccurate. The number ought to be
// 2.19921875f, not 2.2
- TransferVersion(gfx::ColorSpace::TransferID::GAMMA22,
- kDefaultSinceVersion)},
+ TransferVersion{gfx::ColorSpace::TransferID::GAMMA22,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_PQ,
- TransferVersion(gfx::ColorSpace::TransferID::PQ, kDefaultSinceVersion)},
+ TransferVersion{gfx::ColorSpace::TransferID::PQ, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG,
- TransferVersion(gfx::ColorSpace::TransferID::HLG,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::HLG,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE170M,
- TransferVersion(gfx::ColorSpace::TransferID::SMPTE170M,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE170M_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::SMPTE170M,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE170M_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE240M,
- TransferVersion(gfx::ColorSpace::TransferID::SMPTE240M,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE240M_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::SMPTE240M,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE240M_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTEST428_1,
- TransferVersion(
+ TransferVersion{
gfx::ColorSpace::TransferID::SMPTEST428_1,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTEST428_1_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTEST428_1_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG,
- TransferVersion(gfx::ColorSpace::TransferID::LOG,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::LOG,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SQRT,
- TransferVersion(gfx::ColorSpace::TransferID::LOG_SQRT,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SQRT_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::LOG_SQRT,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SQRT_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_IEC61966_2_4,
- TransferVersion(
+ TransferVersion{
gfx::ColorSpace::TransferID::IEC61966_2_4,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_IEC61966_2_4_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_IEC61966_2_4_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT1361_ECG,
- TransferVersion(gfx::ColorSpace::TransferID::BT1361_ECG,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT1361_ECG_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::BT1361_ECG,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT1361_ECG_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_10,
- TransferVersion(gfx::ColorSpace::TransferID::BT2020_10,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_10_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::BT2020_10,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_10_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_12,
- TransferVersion(gfx::ColorSpace::TransferID::BT2020_12,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_12_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::BT2020_12,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_12_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SCRGB_LINEAR_80_NITS,
- TransferVersion(
+ TransferVersion{
gfx::ColorSpace::TransferID::SCRGB_LINEAR_80_NITS,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SCRGB_LINEAR_80_NITS_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SCRGB_LINEAR_80_NITS_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA18,
- TransferVersion(gfx::ColorSpace::TransferID::GAMMA18,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA18_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::GAMMA18,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA18_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA28,
- TransferVersion(gfx::ColorSpace::TransferID::GAMMA28,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA28_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::GAMMA28,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA28_SINCE_VERSION}},
});
// A map from the SDR zcr_color_manager_v1 eotf_names enum values
@@ -174,18 +174,18 @@ constexpr auto kEotfMap = base::MakeFixe
constexpr auto kTransferMap =
base::MakeFixedFlatMap<zcr_color_manager_v1_eotf_names, TransferFnVersion>({
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LINEAR,
- TransferFnVersion(SkNamedTransferFn::kLinear, kDefaultSinceVersion)},
+ TransferFnVersion{SkNamedTransferFn::kLinear, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB,
- TransferFnVersion(SkNamedTransferFnExt::kSRGB, kDefaultSinceVersion)},
+ TransferFnVersion{SkNamedTransferFnExt::kSRGB, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709,
- TransferFnVersion(
+ TransferFnVersion{
SkNamedTransferFnExt::kRec709,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2087,
- TransferFnVersion(gamma24, kDefaultSinceVersion)},
+ TransferFnVersion{gamma24, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_ADOBERGB,
- TransferFnVersion(SkNamedTransferFnExt::kA98RGB,
- kDefaultSinceVersion)},
+ TransferFnVersion{SkNamedTransferFnExt::kA98RGB,
+ kDefaultSinceVersion}},
});
// A map from the HDR zcr_color_manager_v1 eotf_names enum values
@@ -194,68 +194,68 @@ constexpr auto kTransferMap =
constexpr auto kHDRTransferMap =
base::MakeFixedFlatMap<zcr_color_manager_v1_eotf_names, TransferFnVersion>(
{{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LINEAR,
- TransferFnVersion(SkNamedTransferFn::kLinear, kDefaultSinceVersion)},
+ TransferFnVersion{SkNamedTransferFn::kLinear, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB,
- TransferFnVersion(SkNamedTransferFnExt::kSRGB, kDefaultSinceVersion)},
+ TransferFnVersion{SkNamedTransferFnExt::kSRGB, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_PQ,
- TransferFnVersion(SkNamedTransferFn::kPQ, kDefaultSinceVersion)},
+ TransferFnVersion{SkNamedTransferFn::kPQ, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG,
- TransferFnVersion(SkNamedTransferFn::kHLG,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG_SINCE_VERSION)},
+ TransferFnVersion{SkNamedTransferFn::kHLG,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_EXTENDEDSRGB10,
- TransferFnVersion(
+ TransferFnVersion{
SkNamedTransferFnExt::kSRGBExtended1023Over510,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_EXTENDEDSRGB10_SINCE_VERSION)}});
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_EXTENDEDSRGB10_SINCE_VERSION}}});
// A map from zcr_color_manager_v1 matrix_names enum values to
// gfx::ColorSpace::MatrixIDs.
constexpr auto kMatrixMap =
base::MakeFixedFlatMap<zcr_color_manager_v1_matrix_names, MatrixVersion>(
{{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_RGB,
- MatrixVersion(gfx::ColorSpace::MatrixID::RGB, kDefaultSinceVersion)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::RGB, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT709,
- MatrixVersion(gfx::ColorSpace::MatrixID::BT709,
- kDefaultSinceVersion)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::BT709,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT470BG,
- MatrixVersion(
+ MatrixVersion{
gfx::ColorSpace::MatrixID::BT470BG,
- ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT470BG_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT470BG_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT2020_NCL,
- MatrixVersion(gfx::ColorSpace::MatrixID::BT2020_NCL,
- kDefaultSinceVersion)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::BT2020_NCL,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT2020_CL,
- MatrixVersion(gfx::ColorSpace::MatrixID::BT2020_CL,
- kDefaultSinceVersion)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::BT2020_CL,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_FCC,
- MatrixVersion(gfx::ColorSpace::MatrixID::FCC, kDefaultSinceVersion)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::FCC, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YCOCG,
- MatrixVersion(gfx::ColorSpace::MatrixID::YCOCG,
- ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YCOCG_SINCE_VERSION)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::YCOCG,
+ ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YCOCG_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YDZDX,
- MatrixVersion(gfx::ColorSpace::MatrixID::YDZDX,
- ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YDZDX_SINCE_VERSION)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::YDZDX,
+ ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YDZDX_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_GBR,
- MatrixVersion(gfx::ColorSpace::MatrixID::GBR,
- ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_GBR_SINCE_VERSION)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::GBR,
+ ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_GBR_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_SMPTE170M,
- MatrixVersion(gfx::ColorSpace::MatrixID::SMPTE170M,
- kDefaultSinceVersion)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::SMPTE170M,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_SMPTE240M,
- MatrixVersion(gfx::ColorSpace::MatrixID::SMPTE240M,
- kDefaultSinceVersion)}});
+ MatrixVersion{gfx::ColorSpace::MatrixID::SMPTE240M,
+ kDefaultSinceVersion}}});
// A map from zcr_color_manager_v1 range_names enum values to
// gfx::ColorSpace::RangeIDs.
constexpr auto kRangeMap =
base::MakeFixedFlatMap<zcr_color_manager_v1_range_names, RangeVersion>(
{{ZCR_COLOR_MANAGER_V1_RANGE_NAMES_LIMITED,
- RangeVersion(gfx::ColorSpace::RangeID::LIMITED,
- kDefaultSinceVersion)},
+ RangeVersion{gfx::ColorSpace::RangeID::LIMITED,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_RANGE_NAMES_FULL,
- RangeVersion(gfx::ColorSpace::RangeID::FULL, kDefaultSinceVersion)},
+ RangeVersion{gfx::ColorSpace::RangeID::FULL, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_RANGE_NAMES_DERIVED,
- RangeVersion(gfx::ColorSpace::RangeID::DERIVED,
- kDefaultSinceVersion)}});
+ RangeVersion{gfx::ColorSpace::RangeID::DERIVED,
+ kDefaultSinceVersion}}});
zcr_color_manager_v1_chromaticity_names ToColorManagerChromaticity(
gfx::ColorSpace::PrimaryID primaryID,
diff -up chromium-116.0.5845.50/chrome/browser/ui/omnibox/chrome_omnibox_client.cc.me chromium-116.0.5845.50/chrome/browser/ui/omnibox/chrome_omnibox_client.cc
--- chromium-116.0.5845.50/chrome/browser/ui/omnibox/chrome_omnibox_client.cc.me 2023-08-03 13:23:33.748394615 +0200
+++ chromium-116.0.5845.50/chrome/browser/ui/omnibox/chrome_omnibox_client.cc 2023-08-03 13:25:01.140489840 +0200
@@ -470,10 +470,10 @@ void ChromeOmniboxClient::OnAutocomplete
alternative_nav_match);
// Store the details necessary to open the omnibox match via browser commands.
- location_bar_->set_navigation_params(LocationBar::NavigationParams(
+ location_bar_->set_navigation_params(LocationBar::NavigationParams{
destination_url, disposition, transition, match_selection_timestamp,
destination_url_entered_without_scheme,
- destination_url_entered_with_http_scheme));
+ destination_url_entered_with_http_scheme});
if (browser_) {
auto navigation = chrome::OpenCurrentURL(browser_);

@ -1,79 +0,0 @@
diff -up chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc.me chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc
--- chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc.me 2023-06-17 14:50:56.342591702 +0200
+++ chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc 2023-06-17 14:57:48.024377375 +0200
@@ -91,7 +91,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);
@@ -967,9 +967,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-115.0.5790.32/components/optimization_guide/core/tflite_model_executor.h.me chromium-115.0.5790.32/components/optimization_guide/core/tflite_model_executor.h
--- chromium-115.0.5790.32/components/optimization_guide/core/tflite_model_executor.h.me 2023-06-18 21:52:53.515625237 +0200
+++ chromium-115.0.5790.32/components/optimization_guide/core/tflite_model_executor.h 2023-06-18 21:53:06.881881293 +0200
@@ -189,7 +189,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_);
diff -up chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.me chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc
--- chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.me 2023-06-19 10:03:32.319218678 +0200
+++ chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc 2023-06-19 10:04:12.023942232 +0200
@@ -169,7 +169,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;
typedef UCharLiteralBuffer<32> UCharLiteralBufferType;
diff -up chromium-116.0.5845.50/content/public/browser/web_ui_browser_interface_broker_registry.h.me chromium-116.0.5845.50/content/public/browser/web_ui_browser_interface_broker_registry.h
--- chromium-116.0.5845.50/content/public/browser/web_ui_browser_interface_broker_registry.h.me 2023-08-02 16:18:30.380108125 +0200
+++ chromium-116.0.5845.50/content/public/browser/web_ui_browser_interface_broker_registry.h 2023-08-02 16:20:59.660024578 +0200
@@ -127,10 +127,10 @@ class CONTENT_EXPORT WebUIBrowserInterfa
//
// TODO(crbug.com/1407936): Point to WebUIJsBridge documentation.
template <typename ControllerType>
- JsBridgeTraits<ControllerType>::BinderInitializer& ForWebUIWithJsBridge() {
+ typename JsBridgeTraits<ControllerType>::BinderInitializer& ForWebUIWithJsBridge() {
using Traits = JsBridgeTraits<ControllerType>;
- using Interface = Traits::Interface;
- using JsBridgeBinderInitializer = Traits::BinderInitializer;
+ using Interface = typename Traits::Interface;
+ using JsBridgeBinderInitializer = typename Traits::BinderInitializer;
// WebUIController::GetType() requires an instantiated WebUIController
// (because it's a virtual method and can't be static). Here we only have
diff -up chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h.me chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h
--- chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h.me 2023-08-02 20:41:23.984729462 +0200
+++ chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h 2023-08-02 20:41:53.737583093 +0200
@@ -270,8 +270,8 @@ class CORE_EXPORT ObjectPaintPropertiesS
NodeList& nodes,
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)) {

@ -1,109 +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.24/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc.workaround_clang_bug-structured_binding chromium-115.0.5790.24/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc
--- chromium-115.0.5790.24/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc.workaround_clang_bug-structured_binding 2023-06-07 21:48:41.000000000 +0200
+++ chromium-115.0.5790.24/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc 2023-06-17 18:47:06.001403966 +0200
@@ -655,8 +658,10 @@ NGGridSizingTree NGGridLayoutAlgorithm::
NGGridSizingTree sizing_tree;
if (const auto* layout_subtree = ConstraintSpace().GridLayoutSubtree()) {
- auto& [grid_items, layout_data, subtree_size] =
- sizing_tree.CreateSizingData();
+ auto& [g_i, l_d, s_s] = sizing_tree.CreateSizingData();
+ auto& grid_items = g_i;
+ auto& layout_data = l_d;
+ auto& subtree_size = s_s;
const auto& node = Node();
grid_items =
@@ -1798,8 +1803,10 @@ void NGGridLayoutAlgorithm::CompleteTrac
bool* opt_needs_additional_pass) const {
DCHECK(sizing_subtree);
- auto& [grid_items, layout_data, subtree_size] =
- sizing_subtree.SubtreeRootData();
+ auto& [g_i, l_d, s_s] = sizing_subtree.SubtreeRootData();
+ auto& grid_items = g_i;
+ auto& layout_data = l_d;
+ auto& subtree_size = s_s;
const bool is_for_columns = track_direction == kForColumns;
const bool has_non_definite_track =
@@ -1924,8 +1931,10 @@ template <typename CallbackFunc>
void NGGridLayoutAlgorithm::ForEachSubgrid(
const NGGridSizingSubtree& sizing_subtree,
const CallbackFunc& callback_func) const {
- auto& [grid_items, layout_data, subtree_size] =
- sizing_subtree.SubtreeRootData();
+ auto& [g_i, l_d, s_s] = sizing_subtree.SubtreeRootData();
+ auto& grid_items = g_i;
+ auto& layout_data = l_d;
+ auto& subtree_size = s_s;
// If we know this subtree doesn't have nested subgrids we can exit early
// instead of iterating over every grid item looking for them.
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-117.0.5938.62/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc.me chromium-117.0.5938.62/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc
--- chromium-117.0.5938.62/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc.me 2023-09-15 13:03:00.787257048 +0200
+++ chromium-117.0.5938.62/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc 2023-09-15 13:15:05.502706522 +0200
@@ -3437,7 +3437,10 @@ void NGGridLayoutAlgorithm::PlaceGridIte
DCHECK(out_row_break_between);
const auto& container_space = ConstraintSpace();
- const auto& [grid_items, layout_data, tree_size] = sizing_tree.TreeRootData();
+ const auto& [g_i, l_d, t_s] = sizing_tree.TreeRootData();
+ const auto& grid_items = g_i;
+ const auto& layout_data = l_d;
+ const auto& tree_size = t_s;
const auto* cached_layout_subtree = container_space.GridLayoutSubtree();
const auto container_writing_direction =
@@ -3601,7 +3604,10 @@ void NGGridLayoutAlgorithm::PlaceGridIte
// TODO(ikilpatrick): Update |SetHasSeenAllChildren| and early exit if true.
const auto& constraint_space = ConstraintSpace();
- const auto& [grid_items, layout_data, tree_size] = sizing_tree.TreeRootData();
+ const auto& [g_i, l_d, t_s] = sizing_tree.TreeRootData();
+ const auto& grid_items = g_i;
+ const auto& layout_data = l_d;
+ const auto& tree_size =t_s;
const auto* cached_layout_subtree = constraint_space.GridLayoutSubtree();
const auto container_writing_direction =
diff -up chromium-117.0.5938.62/chrome/browser/ui/autofill/chrome_autofill_client.cc.me chromium-117.0.5938.62/chrome/browser/ui/autofill/chrome_autofill_client.cc
--- chromium-117.0.5938.62/chrome/browser/ui/autofill/chrome_autofill_client.cc.me 2023-09-15 18:24:18.984133783 +0200
+++ chromium-117.0.5938.62/chrome/browser/ui/autofill/chrome_autofill_client.cc 2023-09-15 18:28:50.420833595 +0200
@@ -1100,7 +1100,8 @@ void ChromeAutofillClient::PropagateAuto
&renderer_form);
}
- for (const auto& [frame_token, frame_forms] : renderer_forms_by_frame) {
+ for (const auto& [f_t, frame_forms] : renderer_forms_by_frame) {
+ auto& frame_token = f_t;
// Attempt to find the RFH with this `frame_token`.
content::RenderFrameHost* rfh = nullptr;
GetWebContents().ForEachRenderFrameHost(

@ -1,703 +0,0 @@
diff -up chromium-119.0.6045.59/base/trace_event/trace_log.cc.no_matching_constructor chromium-119.0.6045.59/base/trace_event/trace_log.cc
--- chromium-119.0.6045.59/base/trace_event/trace_log.cc.no_matching_constructor 2023-10-26 18:16:51.000000000 +0200
+++ chromium-119.0.6045.59/base/trace_event/trace_log.cc 2023-10-30 16:51:02.270151487 +0100
@@ -2191,8 +2191,8 @@ void TraceLog::SetTraceBufferForTesting(
#if BUILDFLAG(USE_PERFETTO_CLIENT_LIBRARY)
void TraceLog::OnSetup(const perfetto::DataSourceBase::SetupArgs& args) {
AutoLock lock(track_event_lock_);
- track_event_sessions_.emplace_back(args.internal_instance_index, *args.config,
- args.backend_type);
+ track_event_sessions_.emplace_back() = {args.internal_instance_index, *args.config,
+ args.backend_type};
}
void TraceLog::OnStart(const perfetto::DataSourceBase::StartArgs&) {
diff -up chromium-119.0.6045.59/chrome/browser/content_settings/one_time_permission_provider.cc.no_matching_constructor chromium-119.0.6045.59/chrome/browser/content_settings/one_time_permission_provider.cc
--- chromium-119.0.6045.59/chrome/browser/content_settings/one_time_permission_provider.cc.no_matching_constructor 2023-10-26 18:16:57.000000000 +0200
+++ chromium-119.0.6045.59/chrome/browser/content_settings/one_time_permission_provider.cc 2023-10-30 16:51:02.269151462 +0100
@@ -226,8 +226,8 @@ void OneTimePermissionProvider::OnSuspen
while (rule_iterator && rule_iterator->HasNext()) {
auto rule = rule_iterator->Next();
- patterns_to_delete.emplace_back(setting_type, rule->primary_pattern,
- rule->secondary_pattern);
+ patterns_to_delete.emplace_back() = {setting_type, rule->primary_pattern,
+ rule->secondary_pattern};
permissions::PermissionUmaUtil::RecordOneTimePermissionEvent(
setting_type,
permissions::OneTimePermissionEvent::EXPIRED_ON_SUSPEND);
@@ -329,8 +329,8 @@ void OneTimePermissionProvider::DeleteEn
auto rule = rule_iterator->Next();
if (rule->primary_pattern.Matches(origin_gurl) &&
rule->secondary_pattern.Matches(origin_gurl)) {
- patterns_to_delete.emplace_back(
- content_setting_type, rule->primary_pattern, rule->secondary_pattern);
+ patterns_to_delete.emplace_back() = {
+ content_setting_type, rule->primary_pattern, rule->secondary_pattern};
permissions::PermissionUmaUtil::RecordOneTimePermissionEvent(
content_setting_type, trigger_event);
}
diff -up chromium-119.0.6045.59/chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.cc.no_matching_constructor chromium-119.0.6045.59/chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.cc
--- chromium-119.0.6045.59/chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.cc.no_matching_constructor 2023-10-26 18:16:57.000000000 +0200
+++ chromium-119.0.6045.59/chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.cc 2023-10-30 16:51:02.267151412 +0100
@@ -67,8 +67,8 @@ base::flat_map<std::string, SAMLProfileA
// TODO(crbug.com/1445072): Add actual domains with attribute names.
profile_attributes->insert(std::make_pair(
"supported.test",
- SAMLProfileAttributes("placeholderName", "placeholderDomain",
- "placeholderToken")));
+ SAMLProfileAttributes{"placeholderName", "placeholderDomain",
+ "placeholderToken"}));
// Extract domains and attributes from the command line switch.
const base::CommandLine& command_line =
diff -up chromium-119.0.6045.59/chrome/browser/ui/omnibox/chrome_omnibox_client.cc.no_matching_constructor chromium-119.0.6045.59/chrome/browser/ui/omnibox/chrome_omnibox_client.cc
--- chromium-119.0.6045.59/chrome/browser/ui/omnibox/chrome_omnibox_client.cc.no_matching_constructor 2023-10-26 18:17:00.000000000 +0200
+++ chromium-119.0.6045.59/chrome/browser/ui/omnibox/chrome_omnibox_client.cc 2023-10-30 16:51:02.262151288 +0100
@@ -474,10 +474,10 @@ void ChromeOmniboxClient::OnAutocomplete
alternative_nav_match);
// Store the details necessary to open the omnibox match via browser commands.
- location_bar_->set_navigation_params(LocationBar::NavigationParams(
+ location_bar_->set_navigation_params(LocationBar::NavigationParams{
destination_url, disposition, transition, match_selection_timestamp,
destination_url_entered_without_scheme,
- destination_url_entered_with_http_scheme));
+ destination_url_entered_with_http_scheme});
if (browser_) {
auto navigation = chrome::OpenCurrentURL(browser_);
diff -up chromium-119.0.6045.59/chrome/test/chromedriver/capabilities.cc.no_matching_constructor chromium-119.0.6045.59/chrome/test/chromedriver/capabilities.cc
--- chromium-119.0.6045.59/chrome/test/chromedriver/capabilities.cc.no_matching_constructor 2023-10-26 18:17:01.000000000 +0200
+++ chromium-119.0.6045.59/chrome/test/chromedriver/capabilities.cc 2023-10-30 16:51:02.268151437 +0100
@@ -346,7 +346,7 @@ Status ParseMobileEmulation(const base::
"'version' field of type string");
}
- brands.emplace_back(*brand, *version);
+ brands.emplace_back() = {*brand, *version};
}
client_hints.brands = std::move(brands);
@@ -384,7 +384,7 @@ Status ParseMobileEmulation(const base::
"a 'version' field of type string");
}
- full_version_list.emplace_back(*brand, *version);
+ full_version_list.emplace_back() = {*brand, *version};
}
client_hints.full_version_list = std::move(full_version_list);
diff -up chromium-119.0.6045.59/components/autofill/core/browser/contact_info_sync_util.cc.no_matching_constructor chromium-119.0.6045.59/components/autofill/core/browser/contact_info_sync_util.cc
--- chromium-119.0.6045.59/components/autofill/core/browser/contact_info_sync_util.cc.no_matching_constructor 2023-10-30 16:51:02.273151562 +0100
+++ chromium-119.0.6045.59/components/autofill/core/browser/contact_info_sync_util.cc 2023-10-30 17:41:12.685887538 +0100
@@ -195,9 +195,9 @@ class ContactInfoProfileSetter {
CHECK(observations.empty());
for (const sync_pb::ContactInfoSpecifics::Observation& proto_observation :
metadata.observations()) {
- observations.emplace_back(proto_observation.type(),
+ observations.emplace_back() = {static_cast<unsigned char>(proto_observation.type()),
ProfileTokenQuality::FormSignatureHash(
- proto_observation.form_hash()));
+ proto_observation.form_hash())};
}
}
}
diff -up chromium-119.0.6045.59/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc.no_matching_constructor chromium-119.0.6045.59/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc
--- chromium-119.0.6045.59/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc.no_matching_constructor 2023-10-26 18:17:12.000000000 +0200
+++ chromium-119.0.6045.59/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc 2023-10-30 16:51:02.260151238 +0100
@@ -1530,7 +1530,7 @@ void SkiaOutputSurfaceImplOnGpu::CopyOut
// Issue readbacks from the surfaces:
for (size_t i = 0; i < CopyOutputResult::kNV12MaxPlanes; ++i) {
- SkISize size(plane_surfaces[i]->width(), plane_surfaces[i]->height());
+ SkISize size{plane_surfaces[i]->width(), plane_surfaces[i]->height()};
SkImageInfo dst_info = SkImageInfo::Make(
size, (i == 0) ? kAlpha_8_SkColorType : kR8G8_unorm_SkColorType,
kUnpremul_SkAlphaType);
diff -up chromium-119.0.6045.59/content/browser/download/save_package.cc.no_matching_constructor chromium-119.0.6045.59/content/browser/download/save_package.cc
--- chromium-119.0.6045.59/content/browser/download/save_package.cc.no_matching_constructor 2023-10-26 18:17:12.000000000 +0200
+++ chromium-119.0.6045.59/content/browser/download/save_package.cc 2023-10-30 16:51:02.271151512 +0100
@@ -769,8 +769,8 @@ void SavePackage::Finish() {
if (download_) {
std::vector<download::DownloadSaveItemData::ItemInfo> files;
for (auto& item : saved_success_items_) {
- files.emplace_back(item.second->full_path(), item.second->url(),
- item.second->referrer().url);
+ files.emplace_back() = {item.second->full_path(), item.second->url(),
+ item.second->referrer().url};
}
download::DownloadSaveItemData::AttachItemData(download_, std::move(files));
}
diff -up chromium-119.0.6045.59/content/browser/renderer_host/render_frame_host_impl.cc.no_matching_constructor chromium-119.0.6045.59/content/browser/renderer_host/render_frame_host_impl.cc
--- chromium-119.0.6045.59/content/browser/renderer_host/render_frame_host_impl.cc.no_matching_constructor 2023-10-26 18:17:12.000000000 +0200
+++ chromium-119.0.6045.59/content/browser/renderer_host/render_frame_host_impl.cc 2023-10-30 17:38:09.351389984 +0100
@@ -8567,7 +8567,7 @@ void RenderFrameHostImpl::SendFencedFram
for (const blink::FencedFrame::ReportingDestination& destination :
destinations) {
SendFencedFrameReportingBeaconInternal(
- DestinationEnumEvent(event_type, event_data), destination,
+ DestinationEnumEvent{event_type, event_data}, destination,
/*from_renderer=*/true, attribution_reporting_runtime_features,
GetFrameTreeNodeId());
}
@@ -8603,7 +8603,7 @@ void RenderFrameHostImpl::SendFencedFram
}
SendFencedFrameReportingBeaconInternal(
- DestinationURLEvent(destination_url),
+ DestinationURLEvent{destination_url},
blink::FencedFrame::ReportingDestination::kBuyer,
/*from_renderer=*/true, attribution_reporting_runtime_features,
GetFrameTreeNodeId());
@@ -8703,8 +8703,8 @@ void RenderFrameHostImpl::MaybeSendFence
data = info->data;
}
initiator_rfh->SendFencedFrameReportingBeaconInternal(
- DestinationEnumEvent(blink::kFencedFrameTopNavigationBeaconType,
- data),
+ DestinationEnumEvent{blink::kFencedFrameTopNavigationBeaconType,
+ data},
destination,
/*from_renderer=*/false, attribution_reporting_features,
GetFrameTreeNodeId(), navigation_request.GetNavigationId());
@@ -8717,8 +8717,8 @@ void RenderFrameHostImpl::MaybeSendFence
for (blink::FencedFrame::ReportingDestination destination :
info->destinations) {
initiator_rfh->SendFencedFrameReportingBeaconInternal(
- DestinationEnumEvent(blink::kFencedFrameTopNavigationBeaconType,
- info->data),
+ DestinationEnumEvent{blink::kFencedFrameTopNavigationBeaconType,
+ info->data},
destination,
/*from_renderer=*/false, info->attribution_reporting_runtime_features,
GetFrameTreeNodeId(), navigation_request.GetNavigationId());
diff -up chromium-119.0.6045.59/third_party/blink/renderer/platform/fonts/font_palette.h.no_matching_constructor chromium-119.0.6045.59/third_party/blink/renderer/platform/fonts/font_palette.h
--- chromium-119.0.6045.59/third_party/blink/renderer/platform/fonts/font_palette.h.no_matching_constructor 2023-10-26 18:17:24.000000000 +0200
+++ chromium-119.0.6045.59/third_party/blink/renderer/platform/fonts/font_palette.h 2023-10-30 16:51:02.262151288 +0100
@@ -96,7 +96,7 @@ class PLATFORM_EXPORT FontPalette : publ
Color::ColorSpace color_interpolation_space,
absl::optional<Color::HueInterpolationMethod> hue_interpolation_method) {
return base::AdoptRef(new FontPalette(
- start, end, NonNormalizedPercentages(start_percentage, end_percentage),
+ start, end, NonNormalizedPercentages{start_percentage, end_percentage},
normalized_percentage, alpha_multiplier, color_interpolation_space,
hue_interpolation_method));
}
@@ -170,7 +170,7 @@ class PLATFORM_EXPORT FontPalette : publ
double normalized_percentage) {
double end_percentage = normalized_percentage * 100.0;
double start_percentage = 100.0 - end_percentage;
- return NonNormalizedPercentages(start_percentage, end_percentage);
+ return NonNormalizedPercentages{start_percentage, end_percentage};
}
double GetAlphaMultiplier() const {
diff -up chromium-119.0.6045.59/third_party/blink/renderer/platform/fonts/palette_interpolation.cc.no_matching_constructor chromium-119.0.6045.59/third_party/blink/renderer/platform/fonts/palette_interpolation.cc
--- chromium-119.0.6045.59/third_party/blink/renderer/platform/fonts/palette_interpolation.cc.no_matching_constructor 2023-10-26 18:17:24.000000000 +0200
+++ chromium-119.0.6045.59/third_party/blink/renderer/platform/fonts/palette_interpolation.cc 2023-10-30 16:51:02.261151263 +0100
@@ -31,7 +31,7 @@ Vector<FontPalette::FontPaletteOverride>
color_interpolation_space, hue_interpolation_method, start_color,
end_color, percentage, alpha_multiplier);
- FontPalette::FontPaletteOverride result_color_record(i, result_color);
+ FontPalette::FontPaletteOverride result_color_record{static_cast<int>(i), result_color};
result_color_records.push_back(result_color_record);
}
return result_color_records;
diff -up chromium-119.0.6045.59/ui/gtk/gtk_ui.cc.no_matching_constructor chromium-119.0.6045.59/ui/gtk/gtk_ui.cc
--- chromium-119.0.6045.59/ui/gtk/gtk_ui.cc.no_matching_constructor 2023-10-26 18:18:14.000000000 +0200
+++ chromium-119.0.6045.59/ui/gtk/gtk_ui.cc 2023-10-30 16:51:02.272151537 +0100
@@ -993,11 +993,11 @@ ui::DisplayConfig GtkUi::GetDisplayConfi
GdkRectangle geometry;
gdk_monitor_get_geometry(monitor, &geometry);
int monitor_scale = std::max(1, gdk_monitor_get_scale_factor(monitor));
- config.display_geometries.emplace_back(
+ config.display_geometries.emplace_back() = {
gfx::Rect(monitor_scale * geometry.x, monitor_scale * geometry.y,
monitor_scale * geometry.width,
monitor_scale * geometry.height),
- monitor_scale * font_scale);
+ static_cast<float>(monitor_scale * font_scale)};
}
return config;
}
diff -up chromium-119.0.6045.59/base/metrics/persistent_histogram_allocator.cc.me chromium-119.0.6045.59/base/metrics/persistent_histogram_allocator.cc
--- chromium-119.0.6045.59/base/metrics/persistent_histogram_allocator.cc.me 2023-10-31 18:14:49.275728099 +0100
+++ chromium-119.0.6045.59/base/metrics/persistent_histogram_allocator.cc 2023-10-31 18:19:54.599223239 +0100
@@ -221,13 +221,13 @@ PersistentSparseHistogramDataManager::Lo
// The sample-record could be for any sparse histogram. Add the reference
// to the appropriate collection for later use.
if (found_id == match_id) {
- found_records.emplace_back(ref, value);
+ found_records.emplace_back() = {ref, value};
found = true;
} else {
std::vector<ReferenceAndSample>* samples =
GetSampleMapRecordsWhileLocked(found_id);
CHECK(samples);
- samples->emplace_back(ref, value);
+ samples->emplace_back() = {ref, value};
}
}
diff -up chromium-119.0.6045.59/net/dns/host_resolver_cache.cc.me chromium-119.0.6045.59/net/dns/host_resolver_cache.cc
--- chromium-119.0.6045.59/net/dns/host_resolver_cache.cc.me 2023-10-31 20:48:19.153868338 +0100
+++ chromium-119.0.6045.59/net/dns/host_resolver_cache.cc 2023-10-31 20:51:37.634526549 +0100
@@ -368,7 +368,7 @@ void HostResolverCache::Set(
std::string domain_name = result->domain_name();
entries_.emplace(
- Key(std::move(domain_name), network_anonymization_key),
+ Key{std::move(domain_name), network_anonymization_key},
Entry(std::move(result), source, secure, staleness_generation));
if (entries_.size() > max_entries_) {
diff -up chromium-119.0.6045.59/components/autofill/core/browser/webdata/autofill_table.cc.me chromium-119.0.6045.59/components/autofill/core/browser/webdata/autofill_table.cc
--- chromium-119.0.6045.59/components/autofill/core/browser/webdata/autofill_table.cc.me 2023-10-31 22:32:58.995997897 +0100
+++ chromium-119.0.6045.59/components/autofill/core/browser/webdata/autofill_table.cc 2023-10-31 22:33:28.290520601 +0100
@@ -1733,10 +1733,10 @@ std::unique_ptr<AutofillProfile> Autofil
}
base::span<const uint8_t> observations_data = s.ColumnBlob(3);
- field_type_values.emplace_back(
+ field_type_values.emplace_back() = {
type, s.ColumnString16(1), s.ColumnInt(2),
std::vector<uint8_t>(observations_data.begin(),
- observations_data.end()));
+ observations_data.end())};
if (type == ADDRESS_HOME_COUNTRY) {
country_code = base::UTF16ToUTF8(s.ColumnString16(1));
diff -up chromium-119.0.6045.59/components/password_manager/core/browser/password_manager.cc.than chromium-119.0.6045.59/components/password_manager/core/browser/password_manager.cc
--- chromium-119.0.6045.59/components/password_manager/core/browser/password_manager.cc.than 2023-10-31 22:41:22.850233005 +0100
+++ chromium-119.0.6045.59/components/password_manager/core/browser/password_manager.cc 2023-10-31 22:42:37.276931933 +0100
@@ -625,7 +625,7 @@ void PasswordManager::OnUserModifiedNonP
// |driver| might be empty on iOS or in tests.
int driver_id = driver ? driver->GetId() : 0;
possible_usernames_.Put(
- PossibleUsernameFieldIdentifier(driver_id, renderer_id),
+ PossibleUsernameFieldIdentifier{driver_id, renderer_id},
PossibleUsernameData(GetSignonRealm(driver->GetLastCommittedURL()),
renderer_id, value, base::Time::Now(), driver_id,
autocomplete_attribute_has_username, is_likely_otp));
diff -up chromium-119.0.6045.59/content/browser/interest_group/interest_group_storage.cc.than chromium-119.0.6045.59/content/browser/interest_group/interest_group_storage.cc
--- chromium-119.0.6045.59/content/browser/interest_group/interest_group_storage.cc.than 2023-10-31 23:31:08.438267908 +0100
+++ chromium-119.0.6045.59/content/browser/interest_group/interest_group_storage.cc 2023-10-31 23:32:08.979358711 +0100
@@ -2854,10 +2854,10 @@ DoGetKAnonymityData(sql::Database& db,
std::vector<StorageInterestGroup::KAnonymityData> k_anon_data;
while (interest_group_kanon_query.Step()) {
- k_anon_data.emplace_back(
+ k_anon_data.emplace_back() = {
/*key=*/interest_group_kanon_query.ColumnString(0),
/*is_k_anonymous=*/interest_group_kanon_query.ColumnBool(1),
- /*last_updated=*/interest_group_kanon_query.ColumnTime(2));
+ /*last_updated=*/interest_group_kanon_query.ColumnTime(2)};
}
if (!interest_group_kanon_query.Succeeded()) {
return absl::nullopt;
diff -up chromium-119.0.6045.59/content/browser/webid/federated_auth_request_impl.cc.than chromium-119.0.6045.59/content/browser/webid/federated_auth_request_impl.cc
--- chromium-119.0.6045.59/content/browser/webid/federated_auth_request_impl.cc.than 2023-11-01 11:19:42.745395797 +0100
+++ chromium-119.0.6045.59/content/browser/webid/federated_auth_request_impl.cc 2023-11-01 11:22:16.670920679 +0100
@@ -1881,7 +1881,7 @@ void FederatedAuthRequestImpl::ShowError
base::BindOnce(&FederatedAuthRequestImpl::CompleteRequestWithError,
weak_ptr_factory_.GetWeakPtr()));
absl::optional<TokenError> token_error =
- error ? absl::make_optional<TokenError>(error->code, error->url)
+ error ? absl::make_optional<TokenError>({error->code, error->url})
: absl::nullopt;
// TODO(crbug.com/1485710): Refactor IdentityCredentialTokenError
--- chromium-119.0.6045.59/ui/base/wayland/color_manager_util.h.no_matching_constructor 2023-10-26 18:18:14.000000000 +0200
+++ chromium-119.0.6045.59/ui/base/wayland/color_manager_util.h 2023-11-01 17:29:54.269820415 +0100
@@ -52,53 +52,53 @@
zcr_color_manager_v1_chromaticity_names,
PrimaryVersion>(
{{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT601_525_LINE,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::SMPTE170M,
- kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::SMPTE170M,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT601_625_LINE,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::BT470BG,
- kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::BT470BG,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTE170M,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::SMPTE170M,
- kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::SMPTE170M,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT709,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::BT709, kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::BT709, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT2020,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::BT2020, kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::BT2020, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SRGB,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::BT709, kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::BT709, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_DISPLAYP3,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::P3, kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::P3, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_ADOBERGB,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::ADOBE_RGB,
- kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::ADOBE_RGB,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_WIDE_GAMUT_COLOR_SPIN,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::WIDE_GAMUT_COLOR_SPIN,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_WIDE_GAMUT_COLOR_SPIN_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_WIDE_GAMUT_COLOR_SPIN_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT470M,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::BT470M,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT470M_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT470M_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTE240M,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::SMPTE240M,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTE240M_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTE240M_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_XYZ_D50,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::XYZ_D50,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_XYZ_D50_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_XYZ_D50_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST428_1,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::SMPTEST428_1,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST428_1_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST428_1_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST431_2,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::SMPTEST431_2,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST431_2_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST431_2_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_FILM,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::FILM,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_FILM_SINCE_VERSION)}});
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_FILM_SINCE_VERSION}}});
// A map from the zcr_color_manager_v1 eotf_names enum values
// representing well-known EOTFs, to their equivalent TransferIDs.
@@ -107,68 +107,68 @@
zcr_color_manager_v1_eotf_names,
TransferVersion>({
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LINEAR,
- TransferVersion(gfx::ColorSpace::TransferID::LINEAR,
- kDefaultSinceVersion)},
+ TransferVersion{gfx::ColorSpace::TransferID::LINEAR,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB,
- TransferVersion(gfx::ColorSpace::TransferID::SRGB, kDefaultSinceVersion)},
+ TransferVersion{gfx::ColorSpace::TransferID::SRGB, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB_HDR,
- TransferVersion(gfx::ColorSpace::TransferID::SRGB_HDR,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB_HDR_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::SRGB_HDR,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB_HDR_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709,
- TransferVersion(gfx::ColorSpace::TransferID::BT709,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::BT709,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2087,
- TransferVersion(gfx::ColorSpace::TransferID::GAMMA24,
- kDefaultSinceVersion)},
+ TransferVersion{gfx::ColorSpace::TransferID::GAMMA24,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_ADOBERGB,
// This is ever so slightly inaccurate. The number ought to be
// 2.19921875f, not 2.2
- TransferVersion(gfx::ColorSpace::TransferID::GAMMA22,
- kDefaultSinceVersion)},
+ TransferVersion{gfx::ColorSpace::TransferID::GAMMA22,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_PQ,
- TransferVersion(gfx::ColorSpace::TransferID::PQ, kDefaultSinceVersion)},
+ TransferVersion{gfx::ColorSpace::TransferID::PQ, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG,
- TransferVersion(gfx::ColorSpace::TransferID::HLG,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::HLG,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE170M,
- TransferVersion(gfx::ColorSpace::TransferID::SMPTE170M,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE170M_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::SMPTE170M,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE170M_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE240M,
- TransferVersion(gfx::ColorSpace::TransferID::SMPTE240M,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE240M_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::SMPTE240M,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE240M_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTEST428_1,
- TransferVersion(
+ TransferVersion{
gfx::ColorSpace::TransferID::SMPTEST428_1,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTEST428_1_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTEST428_1_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG,
- TransferVersion(gfx::ColorSpace::TransferID::LOG,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::LOG,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SQRT,
- TransferVersion(gfx::ColorSpace::TransferID::LOG_SQRT,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SQRT_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::LOG_SQRT,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SQRT_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_IEC61966_2_4,
- TransferVersion(
+ TransferVersion{
gfx::ColorSpace::TransferID::IEC61966_2_4,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_IEC61966_2_4_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_IEC61966_2_4_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT1361_ECG,
- TransferVersion(gfx::ColorSpace::TransferID::BT1361_ECG,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT1361_ECG_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::BT1361_ECG,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT1361_ECG_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_10,
- TransferVersion(gfx::ColorSpace::TransferID::BT2020_10,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_10_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::BT2020_10,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_10_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_12,
- TransferVersion(gfx::ColorSpace::TransferID::BT2020_12,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_12_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::BT2020_12,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_12_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SCRGB_LINEAR_80_NITS,
- TransferVersion(
+ TransferVersion{
gfx::ColorSpace::TransferID::SCRGB_LINEAR_80_NITS,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SCRGB_LINEAR_80_NITS_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SCRGB_LINEAR_80_NITS_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA18,
- TransferVersion(gfx::ColorSpace::TransferID::GAMMA18,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA18_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::GAMMA18,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA18_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA28,
- TransferVersion(gfx::ColorSpace::TransferID::GAMMA28,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA28_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::GAMMA28,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA28_SINCE_VERSION}},
});
// A map from the SDR zcr_color_manager_v1 eotf_names enum values
@@ -177,18 +177,18 @@
constexpr auto kTransferMap =
base::MakeFixedFlatMap<zcr_color_manager_v1_eotf_names, TransferFnVersion>({
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LINEAR,
- TransferFnVersion(SkNamedTransferFn::kLinear, kDefaultSinceVersion)},
+ TransferFnVersion{SkNamedTransferFn::kLinear, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB,
- TransferFnVersion(SkNamedTransferFnExt::kSRGB, kDefaultSinceVersion)},
+ TransferFnVersion{SkNamedTransferFnExt::kSRGB, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709,
- TransferFnVersion(
+ TransferFnVersion{
SkNamedTransferFnExt::kRec709,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2087,
- TransferFnVersion(gamma24, kDefaultSinceVersion)},
+ TransferFnVersion{gamma24, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_ADOBERGB,
- TransferFnVersion(SkNamedTransferFnExt::kA98RGB,
- kDefaultSinceVersion)},
+ TransferFnVersion{SkNamedTransferFnExt::kA98RGB,
+ kDefaultSinceVersion}},
});
// A map from the HDR zcr_color_manager_v1 eotf_names enum values
@@ -197,70 +197,70 @@
constexpr auto kHDRTransferMap =
base::MakeFixedFlatMap<zcr_color_manager_v1_eotf_names, TransferFnVersion>(
{{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LINEAR,
- TransferFnVersion(SkNamedTransferFn::kLinear, kDefaultSinceVersion)},
+ TransferFnVersion{SkNamedTransferFn::kLinear, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB_HDR,
- TransferFnVersion(
+ TransferFnVersion{
SkNamedTransferFnExt::kSRGB,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB_HDR_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB_HDR_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_PQ,
- TransferFnVersion(SkNamedTransferFn::kPQ, kDefaultSinceVersion)},
+ TransferFnVersion{SkNamedTransferFn::kPQ, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG,
- TransferFnVersion(SkNamedTransferFn::kHLG,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG_SINCE_VERSION)},
+ TransferFnVersion{SkNamedTransferFn::kHLG,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_EXTENDEDSRGB10,
- TransferFnVersion(
+ TransferFnVersion{
SkNamedTransferFnExt::kSRGBExtended1023Over510,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_EXTENDEDSRGB10_SINCE_VERSION)}});
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_EXTENDEDSRGB10_SINCE_VERSION}}});
// A map from zcr_color_manager_v1 matrix_names enum values to
// gfx::ColorSpace::MatrixIDs.
constexpr auto kMatrixMap =
base::MakeFixedFlatMap<zcr_color_manager_v1_matrix_names, MatrixVersion>(
{{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_RGB,
- MatrixVersion(gfx::ColorSpace::MatrixID::RGB, kDefaultSinceVersion)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::RGB, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT709,
- MatrixVersion(gfx::ColorSpace::MatrixID::BT709,
- kDefaultSinceVersion)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::BT709,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT470BG,
- MatrixVersion(
+ MatrixVersion{
gfx::ColorSpace::MatrixID::BT470BG,
- ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT470BG_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT470BG_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT2020_NCL,
- MatrixVersion(gfx::ColorSpace::MatrixID::BT2020_NCL,
- kDefaultSinceVersion)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::BT2020_NCL,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT2020_CL,
- MatrixVersion(gfx::ColorSpace::MatrixID::BT2020_CL,
- kDefaultSinceVersion)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::BT2020_CL,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_FCC,
- MatrixVersion(gfx::ColorSpace::MatrixID::FCC, kDefaultSinceVersion)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::FCC, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YCOCG,
- MatrixVersion(gfx::ColorSpace::MatrixID::YCOCG,
- ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YCOCG_SINCE_VERSION)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::YCOCG,
+ ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YCOCG_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YDZDX,
- MatrixVersion(gfx::ColorSpace::MatrixID::YDZDX,
- ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YDZDX_SINCE_VERSION)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::YDZDX,
+ ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YDZDX_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_GBR,
- MatrixVersion(gfx::ColorSpace::MatrixID::GBR,
- ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_GBR_SINCE_VERSION)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::GBR,
+ ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_GBR_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_SMPTE170M,
- MatrixVersion(gfx::ColorSpace::MatrixID::SMPTE170M,
- kDefaultSinceVersion)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::SMPTE170M,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_SMPTE240M,
- MatrixVersion(gfx::ColorSpace::MatrixID::SMPTE240M,
- kDefaultSinceVersion)}});
+ MatrixVersion{gfx::ColorSpace::MatrixID::SMPTE240M,
+ kDefaultSinceVersion}}});
// A map from zcr_color_manager_v1 range_names enum values to
// gfx::ColorSpace::RangeIDs.
constexpr auto kRangeMap =
base::MakeFixedFlatMap<zcr_color_manager_v1_range_names, RangeVersion>(
{{ZCR_COLOR_MANAGER_V1_RANGE_NAMES_LIMITED,
- RangeVersion(gfx::ColorSpace::RangeID::LIMITED,
- kDefaultSinceVersion)},
+ RangeVersion{gfx::ColorSpace::RangeID::LIMITED,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_RANGE_NAMES_FULL,
- RangeVersion(gfx::ColorSpace::RangeID::FULL, kDefaultSinceVersion)},
+ RangeVersion{gfx::ColorSpace::RangeID::FULL, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_RANGE_NAMES_DERIVED,
- RangeVersion(gfx::ColorSpace::RangeID::DERIVED,
- kDefaultSinceVersion)}});
+ RangeVersion{gfx::ColorSpace::RangeID::DERIVED,
+ kDefaultSinceVersion}}});
zcr_color_manager_v1_chromaticity_names ToColorManagerChromaticity(
gfx::ColorSpace::PrimaryID primaryID,
@@ -283,4 +283,4 @@
} // namespace ui::wayland
-#endif // UI_BASE_WAYLAND_COLOR_MANAGER_UTIL_H_
\ Kein Zeilenumbruch am Dateiende.
+#endif // UI_BASE_WAYLAND_COLOR_MANAGER_UTIL_H_
diff -up chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_previously_granted_view.cc.me chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_previously_granted_view.cc
--- chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_previously_granted_view.cc.me 2023-11-01 20:46:15.997861278 +0100
+++ chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_previously_granted_view.cc 2023-11-01 20:49:33.603371680 +0100
@@ -58,13 +58,13 @@ EmbeddedPermissionPromptPreviouslyGrante
std::vector<EmbeddedPermissionPromptPreviouslyGrantedView::ButtonConfiguration>
EmbeddedPermissionPromptPreviouslyGrantedView::GetButtonsConfiguration() {
std::vector<ButtonConfiguration> buttons;
- buttons.emplace_back(
+ buttons.emplace_back() = {
l10n_util::GetStringUTF16(IDS_EMBEDDED_PROMPT_CONTINUE_ALLOWING),
- ButtonType::kContinueAllowing, ui::ButtonStyle::kTonal);
+ ButtonType::kContinueAllowing, ui::ButtonStyle::kTonal};
- buttons.emplace_back(
+ buttons.emplace_back() = {
l10n_util::GetStringUTF16(IDS_EMBEDDED_PROMPT_STOP_ALLOWING),
- ButtonType::kStopAllowing, ui::ButtonStyle::kTonal);
+ ButtonType::kStopAllowing, ui::ButtonStyle::kTonal};
return buttons;
}
diff -up chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_ask_view.cc.than chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_ask_view.cc
--- chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_ask_view.cc.than 2023-11-01 20:52:29.005464494 +0100
+++ chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_ask_view.cc 2023-11-01 21:14:12.741859604 +0100
@@ -56,12 +56,12 @@ std::vector<EmbeddedPermissionPromptAskV
EmbeddedPermissionPromptAskView::GetButtonsConfiguration() {
std::vector<ButtonConfiguration> buttons;
if (base::FeatureList::IsEnabled(permissions::features::kOneTimePermission)) {
- buttons.emplace_back(
+ buttons.emplace_back() = {
l10n_util::GetStringUTF16(IDS_PERMISSION_ALLOW_THIS_TIME),
- ButtonType::kAllowThisTime, ui::ButtonStyle::kTonal);
+ ButtonType::kAllowThisTime, ui::ButtonStyle::kTonal};
}
- buttons.emplace_back(l10n_util::GetStringUTF16(IDS_PERMISSION_ALLOW),
- ButtonType::kAllow, ui::ButtonStyle::kTonal);
+ buttons.emplace_back() = {l10n_util::GetStringUTF16(IDS_PERMISSION_ALLOW),
+ ButtonType::kAllow, ui::ButtonStyle::kTonal};
return buttons;
}
diff -up chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_base_view.h.me chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_base_view.h
--- chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_base_view.h.me 2023-11-01 21:22:02.222646903 +0100
+++ chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_base_view.h 2023-11-01 21:19:58.769619393 +0100
@@ -72,6 +72,7 @@ class EmbeddedPermissionPromptBaseView :
struct RequestLineConfiguration {
const raw_ptr<const gfx::VectorIcon> icon;
std::u16string message;
+ RequestLineConfiguration(auto i, auto m) : icon(i), message(m) { }
};
struct ButtonConfiguration {
diff -up chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_policy_view.cc.than chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_policy_view.cc
--- chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_policy_view.cc.than 2023-11-01 21:25:31.118626473 +0100
+++ chromium-119.0.6045.59/chrome/browser/ui/views/permissions/embedded_permission_prompt_policy_view.cc 2023-11-01 21:30:06.383340274 +0100
@@ -48,8 +48,8 @@ EmbeddedPermissionPromptPolicyView::GetR
std::vector<EmbeddedPermissionPromptPolicyView::ButtonConfiguration>
EmbeddedPermissionPromptPolicyView::GetButtonsConfiguration() {
std::vector<ButtonConfiguration> buttons;
- buttons.emplace_back(l10n_util::GetStringUTF16(IDS_EMBEDDED_PROMPT_OK_LABEL),
- ButtonType::kPolicyOK, ui::ButtonStyle::kTonal);
+ buttons.emplace_back() = {l10n_util::GetStringUTF16(IDS_EMBEDDED_PROMPT_OK_LABEL),
+ ButtonType::kPolicyOK, ui::ButtonStyle::kTonal};
return buttons;
}

@ -1,12 +0,0 @@
diff -up chromium-120.0.6099.62/build/config/compiler/BUILD.gn.than chromium-120.0.6099.62/build/config/compiler/BUILD.gn
--- chromium-120.0.6099.62/build/config/compiler/BUILD.gn.than 2023-12-06 19:28:25.998327318 +0100
+++ chromium-120.0.6099.62/build/config/compiler/BUILD.gn 2023-12-06 19:28:34.190528906 +0100
@@ -787,7 +787,7 @@ config("compiler") {
# toolchain has this flag.
# 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 += [ "" ]
}
}

@ -1,12 +0,0 @@
diff -up chromium-120.0.6099.56/media/base/media_switches.cc.me chromium-120.0.6099.56/media/base/media_switches.cc
--- chromium-120.0.6099.56/media/base/media_switches.cc.me 2023-12-02 11:43:21.990775897 +0100
+++ chromium-120.0.6099.56/media/base/media_switches.cc 2023-12-02 11:45:23.248006377 +0100
@@ -1636,7 +1636,7 @@ BASE_FEATURE(kUseSharedImagesForPepperVi
// Enables FFmpeg allow lists for supported codecs / containers.
BASE_FEATURE(kFFmpegAllowLists,
"FFmpegAllowLists",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ base::FEATURE_DISABLED_BY_DEFAULT);
#if BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS)
// Allows decoding of theora / vp3 content.

@ -1,14 +0,0 @@
--- chromium-120.0.6099.35/chrome/browser/media/router/media_router_feature.cc.orig 2023-11-26 13:25:34.724228755 +0100
+++ chromium-120.0.6099.35/chrome/browser/media/router/media_router_feature.cc 2023-11-26 13:28:26.452359146 +0100
@@ -71,11 +71,7 @@
// TODO(b/202294946): Remove when enabled by default on ChromeOS.
BASE_FEATURE(kGlobalMediaControlsCastStartStop,
"GlobalMediaControlsCastStartStop",
-#if BUILDFLAG(IS_CHROMEOS)
base::FEATURE_DISABLED_BY_DEFAULT);
-#else
- base::FEATURE_ENABLED_BY_DEFAULT);
-#endif // BUILDFLAG(IS_CHROMEOS)
#endif // !BUILDFLAG(IS_ANDROID)
namespace {

@ -1,26 +0,0 @@
diff -up chromium-120.0.6099.35/base/allocator/partition_allocator/src/partition_alloc/starscan/metadata_allocator.h.me chromium-120.0.6099.35/base/allocator/partition_allocator/src/partition_alloc/starscan/metadata_allocator.h
--- chromium-120.0.6099.35/base/allocator/partition_allocator/src/partition_alloc/starscan/metadata_allocator.h.me 2023-11-26 13:33:11.547409713 +0100
+++ chromium-120.0.6099.35/base/allocator/partition_allocator/src/partition_alloc/starscan/metadata_allocator.h 2023-11-26 13:35:02.679363167 +0100
@@ -40,6 +40,11 @@ class MetadataAllocator {
}
template <typename U>
+ bool operator==(const MetadataAllocator<U>&) const {
+ return true;
+ }
+
+ template <typename U>
bool operator!=(const MetadataAllocator<U>& o) {
return !operator==(o);
}
diff -up chromium-120.0.6099.35/third_party/pdfium/core/fxcrt/fx_memory_wrappers.h.me chromium-120.0.6099.35/third_party/pdfium/core/fxcrt/fx_memory_wrappers.h
--- chromium-120.0.6099.35/third_party/pdfium/core/fxcrt/fx_memory_wrappers.h.me 2023-11-22 20:34:11.000000000 +0100
+++ chromium-120.0.6099.35/third_party/pdfium/core/fxcrt/fx_memory_wrappers.h 2023-11-26 13:30:38.961724653 +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; }
};

@ -1,13 +0,0 @@
diff -up chromium-121.0.6167.57/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h.me chromium-121.0.6167.57/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h
--- chromium-121.0.6167.57/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h.me 2024-01-16 14:20:52.401890657 +0100
+++ chromium-121.0.6167.57/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h 2024-01-16 15:08:04.070156474 +0100
@@ -162,7 +162,8 @@ static_assert(sizeof(void*) != 8, "");
#if defined(ARCH_CPU_ARM64) && defined(__clang__) && \
!defined(ADDRESS_SANITIZER) && \
- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID))
+ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID)) && \
+ __GLIBC_PREREQ(2, 29)
#define PA_CONFIG_HAS_MEMORY_TAGGING() 1
#else
#define PA_CONFIG_HAS_MEMORY_TAGGING() 0

@ -1,12 +0,0 @@
diff -up chromium-121.0.6167.57/components/performance_manager/resource_attribution/query_params.h.me chromium-121.0.6167.57/components/performance_manager/resource_attribution/query_params.h
--- chromium-121.0.6167.57/components/performance_manager/resource_attribution/query_params.h.me 2024-01-18 17:00:24.791582422 +0100
+++ chromium-121.0.6167.57/components/performance_manager/resource_attribution/query_params.h 2024-01-18 17:22:21.521682845 +0100
@@ -27,7 +27,7 @@ struct QueryParams {
QueryParams(const QueryParams& other);
QueryParams& operator=(const QueryParams& other);
- friend constexpr bool operator==(const QueryParams&,
+ friend bool operator==(const QueryParams&,
const QueryParams&) = default;
// Individual resource contexts to measure.

@ -1,24 +0,0 @@
diff -up chromium-121.0.6167.57/content/browser/interest_group/header_direct_from_seller_signals.cc.me chromium-121.0.6167.57/content/browser/interest_group/header_direct_from_seller_signals.cc
--- chromium-121.0.6167.57/content/browser/interest_group/header_direct_from_seller_signals.cc.me 2024-01-23 15:13:11.469104694 +0100
+++ chromium-121.0.6167.57/content/browser/interest_group/header_direct_from_seller_signals.cc 2024-01-23 15:11:40.117842015 +0100
@@ -46,7 +46,7 @@ size_t GetResultSizeBytes(const HeaderDi
} // namespace
-HeaderDirectFromSellerSignals::Result::Result() = default;
+HeaderDirectFromSellerSignals::Result::Result() {}
HeaderDirectFromSellerSignals::Result::Result(
absl::optional<std::string> seller_signals,
diff -up chromium-121.0.6167.57/components/variations/service/ui_string_overrider.cc.me chromium-121.0.6167.57/components/variations/service/ui_string_overrider.cc
--- chromium-121.0.6167.57/components/variations/service/ui_string_overrider.cc.me 2024-01-24 08:07:50.191188397 +0100
+++ chromium-121.0.6167.57/components/variations/service/ui_string_overrider.cc 2024-01-24 08:08:55.905676634 +0100
@@ -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)

@ -1,515 +0,0 @@
diff -up chromium-119.0.6045.105/base/check_op.h.missing-header-files chromium-119.0.6045.105/base/check_op.h
--- chromium-119.0.6045.105/base/check_op.h.missing-header-files 2023-11-01 19:10:05.000000000 +0100
+++ chromium-119.0.6045.105/base/check_op.h 2023-11-06 14:34:01.808868982 +0100
@@ -5,6 +5,7 @@
#ifndef BASE_CHECK_OP_H_
#define BASE_CHECK_OP_H_
+#include <cstdint>
#include <cstddef>
#include <string>
#include <string_view>
diff -up chromium-119.0.6045.105/base/containers/flat_map.h.missing-header-files chromium-119.0.6045.105/base/containers/flat_map.h
--- chromium-119.0.6045.105/base/containers/flat_map.h.missing-header-files 2023-11-01 19:10:05.000000000 +0100
+++ chromium-119.0.6045.105/base/containers/flat_map.h 2023-11-06 14:34:01.813869089 +0100
@@ -5,6 +5,7 @@
#ifndef BASE_CONTAINERS_FLAT_MAP_H_
#define BASE_CONTAINERS_FLAT_MAP_H_
+#include <cstdint>
#include <functional>
#include <tuple>
#include <type_traits>
diff -up chromium-119.0.6045.105/base/debug/profiler.h.missing-header-files chromium-119.0.6045.105/base/debug/profiler.h
--- chromium-119.0.6045.105/base/debug/profiler.h.missing-header-files 2023-11-01 19:10:05.000000000 +0100
+++ chromium-119.0.6045.105/base/debug/profiler.h 2023-11-06 14:34:01.809869004 +0100
@@ -8,6 +8,7 @@
#include <stddef.h>
#include <stdint.h>
+#include <cstdint>
#include <string>
#include "base/base_export.h"
diff -up chromium-119.0.6045.105/base/memory/ref_counted.h.missing-header-files chromium-119.0.6045.105/base/memory/ref_counted.h
--- chromium-119.0.6045.105/base/memory/ref_counted.h.missing-header-files 2023-11-01 19:10:05.000000000 +0100
+++ chromium-119.0.6045.105/base/memory/ref_counted.h 2023-11-06 14:34:01.808868982 +0100
@@ -6,6 +6,7 @@
#define BASE_MEMORY_REF_COUNTED_H_
#include <stddef.h>
+#include <limits>
#include <limits>
#include <utility>
diff -up chromium-119.0.6045.105/chrome/browser/privacy_budget/encountered_surface_tracker.h.missing-header-files chromium-119.0.6045.105/chrome/browser/privacy_budget/encountered_surface_tracker.h
--- chromium-119.0.6045.105/chrome/browser/privacy_budget/encountered_surface_tracker.h.missing-header-files 2023-11-01 19:10:13.000000000 +0100
+++ chromium-119.0.6045.105/chrome/browser/privacy_budget/encountered_surface_tracker.h 2023-11-06 14:34:01.814869110 +0100
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <cstdint>
#include <map>
#include "base/containers/flat_set.h"
diff -up chromium-119.0.6045.105/chrome/browser/webauthn/authenticator_request_dialog_model.h.missing-header-files chromium-119.0.6045.105/chrome/browser/webauthn/authenticator_request_dialog_model.h
--- chromium-119.0.6045.105/chrome/browser/webauthn/authenticator_request_dialog_model.h.missing-header-files 2023-11-01 19:10:16.000000000 +0100
+++ chromium-119.0.6045.105/chrome/browser/webauthn/authenticator_request_dialog_model.h 2023-11-06 14:34:01.817869174 +0100
@@ -8,6 +8,7 @@
#include <memory>
#include <string>
#include <vector>
+#include <variant>
#include "base/containers/span.h"
#include "base/functional/callback_forward.h"
diff -up chromium-119.0.6045.105/chrome/test/chromedriver/chrome/web_view_impl.cc.missing-header-files chromium-119.0.6045.105/chrome/test/chromedriver/chrome/web_view_impl.cc
--- chromium-119.0.6045.105/chrome/test/chromedriver/chrome/web_view_impl.cc.missing-header-files 2023-11-01 19:10:16.000000000 +0100
+++ chromium-119.0.6045.105/chrome/test/chromedriver/chrome/web_view_impl.cc 2023-11-06 14:34:01.818869196 +0100
@@ -11,6 +11,7 @@
#include <queue>
#include <utility>
#include <vector>
+#include <cstring>
#include "base/check.h"
#include "base/files/file_path.h"
diff -up chromium-119.0.6045.105/components/autofill/core/browser/autofill_ablation_study.h.missing-header-files chromium-119.0.6045.105/components/autofill/core/browser/autofill_ablation_study.h
--- chromium-119.0.6045.105/components/autofill/core/browser/autofill_ablation_study.h.missing-header-files 2023-11-01 19:10:19.000000000 +0100
+++ chromium-119.0.6045.105/components/autofill/core/browser/autofill_ablation_study.h 2023-11-06 14:34:01.815869132 +0100
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <cstdint>
#include <string>
class GURL;
diff -up chromium-119.0.6045.105/components/crash/core/app/crash_reporter_client.h.missing-header-files chromium-119.0.6045.105/components/crash/core/app/crash_reporter_client.h
--- chromium-119.0.6045.105/components/crash/core/app/crash_reporter_client.h.missing-header-files 2023-11-01 19:10:20.000000000 +0100
+++ chromium-119.0.6045.105/components/crash/core/app/crash_reporter_client.h 2023-11-06 14:34:01.813869089 +0100
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <cstdint>
#include <string>
#include "build/build_config.h"
diff -up chromium-119.0.6045.105/components/feature_engagement/internal/event_storage_validator.h.missing-header-files chromium-119.0.6045.105/components/feature_engagement/internal/event_storage_validator.h
--- chromium-119.0.6045.105/components/feature_engagement/internal/event_storage_validator.h.missing-header-files 2023-11-01 19:10:21.000000000 +0100
+++ chromium-119.0.6045.105/components/feature_engagement/internal/event_storage_validator.h 2023-11-06 14:34:01.814869110 +0100
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <cstdint>
#include <string>
namespace feature_engagement {
diff -up chromium-119.0.6045.105/components/feature_engagement/internal/never_event_storage_validator.h.missing-header-files chromium-119.0.6045.105/components/feature_engagement/internal/never_event_storage_validator.h
--- chromium-119.0.6045.105/components/feature_engagement/internal/never_event_storage_validator.h.missing-header-files 2023-11-01 19:10:21.000000000 +0100
+++ chromium-119.0.6045.105/components/feature_engagement/internal/never_event_storage_validator.h 2023-11-06 14:34:01.814869110 +0100
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_NEVER_EVENT_STORAGE_VALIDATOR_H_
#define COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_NEVER_EVENT_STORAGE_VALIDATOR_H_
+#include <cstdint>
#include <string>
#include "components/feature_engagement/internal/event_storage_validator.h"
diff -up chromium-119.0.6045.105/components/omnibox/browser/on_device_head_model.h.missing-header-files chromium-119.0.6045.105/components/omnibox/browser/on_device_head_model.h
--- chromium-119.0.6045.105/components/omnibox/browser/on_device_head_model.h.missing-header-files 2023-11-01 19:10:21.000000000 +0100
+++ chromium-119.0.6045.105/components/omnibox/browser/on_device_head_model.h 2023-11-06 14:34:01.815869132 +0100
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <cstdint>
#include <string>
#include <utility>
#include <vector>
diff -up chromium-119.0.6045.105/components/password_manager/core/browser/generation/password_generator.h.missing-header-files chromium-119.0.6045.105/components/password_manager/core/browser/generation/password_generator.h
--- chromium-119.0.6045.105/components/password_manager/core/browser/generation/password_generator.h.missing-header-files 2023-11-01 19:10:21.000000000 +0100
+++ chromium-119.0.6045.105/components/password_manager/core/browser/generation/password_generator.h 2023-11-06 14:34:01.814869110 +0100
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <cstdint>
#include <string>
diff -up chromium-119.0.6045.105/components/payments/content/utility/fingerprint_parser.h.missing-header-files chromium-119.0.6045.105/components/payments/content/utility/fingerprint_parser.h
--- chromium-119.0.6045.105/components/payments/content/utility/fingerprint_parser.h.missing-header-files 2023-11-01 19:10:21.000000000 +0100
+++ chromium-119.0.6045.105/components/payments/content/utility/fingerprint_parser.h 2023-11-06 14:34:01.815869132 +0100
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_PAYMENTS_CONTENT_UTILITY_FINGERPRINT_PARSER_H_
#define COMPONENTS_PAYMENTS_CONTENT_UTILITY_FINGERPRINT_PARSER_H_
+#include <cstdint>
#include <stddef.h>
#include <stdint.h>
diff -up chromium-119.0.6045.105/gin/time_clamper.h.missing-header-files chromium-119.0.6045.105/gin/time_clamper.h
--- chromium-119.0.6045.105/gin/time_clamper.h.missing-header-files 2023-11-01 19:10:28.000000000 +0100
+++ chromium-119.0.6045.105/gin/time_clamper.h 2023-11-06 14:34:01.818869196 +0100
@@ -48,7 +48,7 @@ class GIN_EXPORT TimeClamper {
const int64_t micros = now_micros % 1000;
// abs() is necessary for devices with times before unix-epoch (most likely
// configured incorrectly).
- if (abs(micros) + kResolutionMicros < 1000) {
+ if (std::abs(micros) + kResolutionMicros < 1000) {
return now_micros / 1000;
}
return ClampTimeResolution(now_micros) / 1000;
diff -up chromium-119.0.6045.105/gpu/config/gpu_feature_info.h.missing-header-files chromium-119.0.6045.105/gpu/config/gpu_feature_info.h
--- chromium-119.0.6045.105/gpu/config/gpu_feature_info.h.missing-header-files 2023-11-01 19:10:28.000000000 +0100
+++ chromium-119.0.6045.105/gpu/config/gpu_feature_info.h 2023-11-06 14:34:01.809869004 +0100
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <cstdint>
#include <string>
#include <vector>
diff -up chromium-119.0.6045.105/net/base/net_export.h.missing-header-files chromium-119.0.6045.105/net/base/net_export.h
--- chromium-119.0.6045.105/net/base/net_export.h.missing-header-files 2023-11-01 19:10:32.000000000 +0100
+++ chromium-119.0.6045.105/net/base/net_export.h 2023-11-06 14:34:01.809869004 +0100
@@ -5,6 +5,8 @@
#ifndef NET_BASE_NET_EXPORT_H_
#define NET_BASE_NET_EXPORT_H_
+#include <cstdint>
+
// Defines NET_EXPORT so that functionality implemented by the net module can
// be exported to consumers, and NET_EXPORT_PRIVATE that allows unit tests to
// access features not intended to be used directly by real consumers.
diff -up chromium-119.0.6045.105/pdf/document_attachment_info.h.missing-header-files chromium-119.0.6045.105/pdf/document_attachment_info.h
--- chromium-119.0.6045.105/pdf/document_attachment_info.h.missing-header-files 2023-11-01 19:10:34.000000000 +0100
+++ chromium-119.0.6045.105/pdf/document_attachment_info.h 2023-11-06 14:34:01.815869132 +0100
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <cstdint>
#include <string>
diff -up chromium-119.0.6045.105/sandbox/linux/syscall_broker/broker_file_permission.h.missing-header-files chromium-119.0.6045.105/sandbox/linux/syscall_broker/broker_file_permission.h
--- chromium-119.0.6045.105/sandbox/linux/syscall_broker/broker_file_permission.h.missing-header-files 2023-11-01 19:10:34.000000000 +0100
+++ chromium-119.0.6045.105/sandbox/linux/syscall_broker/broker_file_permission.h 2023-11-06 14:34:01.809869004 +0100
@@ -5,6 +5,7 @@
#ifndef SANDBOX_LINUX_SYSCALL_BROKER_BROKER_FILE_PERMISSION_H_
#define SANDBOX_LINUX_SYSCALL_BROKER_BROKER_FILE_PERMISSION_H_
+#include <cstdint>
#include <bitset>
#include <cstdint>
#include <string>
diff -up chromium-119.0.6045.105/services/device/public/cpp/generic_sensor/sensor_reading.h.missing-header-files chromium-119.0.6045.105/services/device/public/cpp/generic_sensor/sensor_reading.h
--- chromium-119.0.6045.105/services/device/public/cpp/generic_sensor/sensor_reading.h.missing-header-files 2023-11-01 19:10:35.000000000 +0100
+++ chromium-119.0.6045.105/services/device/public/cpp/generic_sensor/sensor_reading.h 2023-11-06 14:34:01.820869238 +0100
@@ -8,6 +8,9 @@
#include <stddef.h>
#include <stdint.h>
+#include <cstddef>
+#include <cstdint>
+
#include <type_traits>
namespace device {
diff -up chromium-119.0.6045.105/skia/ext/skcolorspace_trfn.cc.missing-header-files chromium-119.0.6045.105/skia/ext/skcolorspace_trfn.cc
--- chromium-119.0.6045.105/skia/ext/skcolorspace_trfn.cc.missing-header-files 2023-11-01 19:10:35.000000000 +0100
+++ chromium-119.0.6045.105/skia/ext/skcolorspace_trfn.cc 2023-11-06 14:34:01.818869196 +0100
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "skia/ext/skcolorspace_trfn.h"
+#include <cmath>
#include <cmath>
diff -up chromium-119.0.6045.105/third_party/abseil-cpp/absl/strings/string_view.h.missing-header-files chromium-119.0.6045.105/third_party/abseil-cpp/absl/strings/string_view.h
--- chromium-119.0.6045.105/third_party/abseil-cpp/absl/strings/string_view.h.missing-header-files 2023-11-01 19:10:36.000000000 +0100
+++ chromium-119.0.6045.105/third_party/abseil-cpp/absl/strings/string_view.h 2023-11-06 14:34:01.809869004 +0100
@@ -27,6 +27,7 @@
#ifndef ABSL_STRINGS_STRING_VIEW_H_
#define ABSL_STRINGS_STRING_VIEW_H_
+#include <cstdint>
#include <algorithm>
#include <cassert>
#include <cstddef>
diff -up chromium-119.0.6045.105/third_party/angle/include/GLSLANG/ShaderVars.h.missing-header-files chromium-119.0.6045.105/third_party/angle/include/GLSLANG/ShaderVars.h
--- chromium-119.0.6045.105/third_party/angle/include/GLSLANG/ShaderVars.h.missing-header-files 2023-11-01 19:11:59.000000000 +0100
+++ chromium-119.0.6045.105/third_party/angle/include/GLSLANG/ShaderVars.h 2023-11-06 14:34:01.810869025 +0100
@@ -10,6 +10,7 @@
#ifndef GLSLANG_SHADERVARS_H_
#define GLSLANG_SHADERVARS_H_
+#include <cstdint>
#include <algorithm>
#include <array>
#include <cstdint>
diff -up chromium-119.0.6045.105/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h.missing-header-files chromium-119.0.6045.105/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h
--- chromium-119.0.6045.105/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h.missing-header-files 2023-11-01 19:10:37.000000000 +0100
+++ chromium-119.0.6045.105/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h 2023-11-06 14:34:01.810869025 +0100
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <cstdint>
#include <array>
#include <cstdint>
#include <functional>
diff -up chromium-119.0.6045.105/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h.missing-header-files chromium-119.0.6045.105/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h
--- chromium-119.0.6045.105/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h.missing-header-files 2023-11-01 19:13:50.000000000 +0100
+++ chromium-119.0.6045.105/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h 2023-11-06 14:34:01.810869025 +0100
@@ -15,6 +15,7 @@
#ifndef SRC_TINT_LANG_SPIRV_READER_AST_PARSER_NAMER_H_
#define SRC_TINT_LANG_SPIRV_READER_AST_PARSER_NAMER_H_
+#include <cstdint>
#include <string>
#include <unordered_map>
#include <vector>
diff -up chromium-119.0.6045.105/third_party/ipcz/src/ipcz/router_link.h.missing-header-files chromium-119.0.6045.105/third_party/ipcz/src/ipcz/router_link.h
--- chromium-119.0.6045.105/third_party/ipcz/src/ipcz/router_link.h.missing-header-files 2023-11-01 19:11:20.000000000 +0100
+++ chromium-119.0.6045.105/third_party/ipcz/src/ipcz/router_link.h 2023-11-06 14:34:01.819869217 +0100
@@ -5,6 +5,7 @@
#ifndef IPCZ_SRC_IPCZ_ROUTER_LINK_H_
#define IPCZ_SRC_IPCZ_ROUTER_LINK_H_
+#include <memory>
#include <cstddef>
#include <functional>
#include <memory>
diff -up chromium-119.0.6045.105/third_party/material_color_utilities/src/cpp/palettes/tones.cc.missing-header-files chromium-119.0.6045.105/third_party/material_color_utilities/src/cpp/palettes/tones.cc
--- chromium-119.0.6045.105/third_party/material_color_utilities/src/cpp/palettes/tones.cc.missing-header-files 2023-11-01 19:11:53.000000000 +0100
+++ chromium-119.0.6045.105/third_party/material_color_utilities/src/cpp/palettes/tones.cc 2023-11-06 14:34:01.819869217 +0100
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include <cmath>
#include "cpp/palettes/tones.h"
#include "cpp/cam/cam.h"
diff -up chromium-119.0.6045.105/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h.missing-header-files chromium-119.0.6045.105/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h
--- chromium-119.0.6045.105/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h.missing-header-files 2023-11-01 19:11:59.000000000 +0100
+++ chromium-119.0.6045.105/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h 2023-11-06 14:34:01.810869025 +0100
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <cstdint>
#include <functional>
#include <map>
#include <set>
diff -up chromium-119.0.6045.105/third_party/pdfium/constants/annotation_flags.h.missing-header-files chromium-119.0.6045.105/third_party/pdfium/constants/annotation_flags.h
--- chromium-119.0.6045.105/third_party/pdfium/constants/annotation_flags.h.missing-header-files 2023-11-01 19:14:48.000000000 +0100
+++ chromium-119.0.6045.105/third_party/pdfium/constants/annotation_flags.h 2023-11-06 14:34:01.815869132 +0100
@@ -7,6 +7,8 @@
#include <stdint.h>
+#include <cstdint>
+
namespace pdfium {
namespace annotation_flags {
diff -up chromium-119.0.6045.105/third_party/ruy/src/ruy/profiler/instrumentation.h.missing-header-files chromium-119.0.6045.105/third_party/ruy/src/ruy/profiler/instrumentation.h
--- chromium-119.0.6045.105/third_party/ruy/src/ruy/profiler/instrumentation.h.missing-header-files 2023-11-01 19:12:02.000000000 +0100
+++ chromium-119.0.6045.105/third_party/ruy/src/ruy/profiler/instrumentation.h 2023-11-06 14:34:01.813869089 +0100
@@ -17,6 +17,7 @@ limitations under the License.
#define RUY_RUY_PROFILER_INSTRUMENTATION_H_
#ifdef RUY_PROFILER
+#include <string>
#include <cstdio>
#include <mutex>
#include <vector>
diff -up chromium-119.0.6045.105/third_party/swiftshader/src/System/LRUCache.hpp.missing-header-files chromium-119.0.6045.105/third_party/swiftshader/src/System/LRUCache.hpp
--- chromium-119.0.6045.105/third_party/swiftshader/src/System/LRUCache.hpp.missing-header-files 2023-11-01 19:12:15.000000000 +0100
+++ chromium-119.0.6045.105/third_party/swiftshader/src/System/LRUCache.hpp 2023-11-06 14:34:01.810869025 +0100
@@ -17,6 +17,7 @@
#include "System/Debug.hpp"
+#include <cstdint>
#include <cstddef>
#include <cstdint>
#include <functional>
diff -up chromium-119.0.6045.105/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc.missing-header-files chromium-119.0.6045.105/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc
--- chromium-119.0.6045.105/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc.missing-header-files 2023-11-01 19:12:42.000000000 +0100
+++ chromium-119.0.6045.105/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc 2023-11-06 14:34:01.814869110 +0100
@@ -45,6 +45,7 @@
#include "llvm/Support/SaveAndRestore.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
+#include <cstdint>
#include <string>
#include <sysexits.h>
#ifdef HAVE_BACKTRACE
diff -up chromium-119.0.6045.105/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h.missing-header-files chromium-119.0.6045.105/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h
--- chromium-119.0.6045.105/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h.missing-header-files 2023-11-01 19:13:20.000000000 +0100
+++ chromium-119.0.6045.105/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h 2023-11-06 14:34:01.813869089 +0100
@@ -31,6 +31,7 @@ limitations under the License.
#ifndef TENSORFLOW_LITE_KERNELS_INTERNAL_SPECTROGRAM_H_
#define TENSORFLOW_LITE_KERNELS_INTERNAL_SPECTROGRAM_H_
+#include <cstdint>
#include <complex>
#include <deque>
#include <vector>
diff -up chromium-119.0.6045.105/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h.missing-header-files chromium-119.0.6045.105/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h
--- chromium-119.0.6045.105/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h.missing-header-files 2023-11-01 19:12:45.000000000 +0100
+++ chromium-119.0.6045.105/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h 2023-11-06 14:34:01.817869174 +0100
@@ -2884,6 +2884,7 @@ static void vma_aligned_free(void* VMA_N
// Define this macro to 1 to enable functions: vmaBuildStatsString, vmaFreeStatsString.
#if VMA_STATS_STRING_ENABLED
+#include <stdio.h>
static inline void VmaUint32ToStr(char* VMA_NOT_NULL outStr, size_t strLen, uint32_t num)
{
snprintf(outStr, strLen, "%u", static_cast<unsigned int>(num));
diff -up chromium-119.0.6045.105/third_party/webrtc/audio/utility/channel_mixer.cc.missing-header-files chromium-119.0.6045.105/third_party/webrtc/audio/utility/channel_mixer.cc
--- chromium-119.0.6045.105/third_party/webrtc/audio/utility/channel_mixer.cc.missing-header-files 2023-11-01 19:14:05.000000000 +0100
+++ chromium-119.0.6045.105/third_party/webrtc/audio/utility/channel_mixer.cc 2023-11-06 14:34:01.819869217 +0100
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include <cstring>
+
#include "audio/utility/channel_mixer.h"
#include "audio/utility/channel_mixing_matrix.h"
diff -up chromium-119.0.6045.105/third_party/webrtc/common_video/h264/sps_parser.h.missing-header-files chromium-119.0.6045.105/third_party/webrtc/common_video/h264/sps_parser.h
--- chromium-119.0.6045.105/third_party/webrtc/common_video/h264/sps_parser.h.missing-header-files 2023-11-01 19:14:06.000000000 +0100
+++ chromium-119.0.6045.105/third_party/webrtc/common_video/h264/sps_parser.h 2023-11-06 14:34:01.819869217 +0100
@@ -11,6 +11,7 @@
#ifndef COMMON_VIDEO_H264_SPS_PARSER_H_
#define COMMON_VIDEO_H264_SPS_PARSER_H_
+#include <cstdint>
#include "absl/types/optional.h"
#include "rtc_base/bitstream_reader.h"
diff -up chromium-119.0.6045.105/third_party/webrtc/modules/include/module_common_types_public.h.missing-header-files chromium-119.0.6045.105/third_party/webrtc/modules/include/module_common_types_public.h
--- chromium-119.0.6045.105/third_party/webrtc/modules/include/module_common_types_public.h.missing-header-files 2023-11-01 19:14:11.000000000 +0100
+++ chromium-119.0.6045.105/third_party/webrtc/modules/include/module_common_types_public.h 2023-11-06 14:34:01.819869217 +0100
@@ -11,6 +11,7 @@
#ifndef MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
#define MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
+#include <cstdint>
#include <limits>
#include "absl/types/optional.h"
diff -up chromium-119.0.6045.105/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc.missing-header-files chromium-119.0.6045.105/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc
--- chromium-119.0.6045.105/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc.missing-header-files 2023-11-01 19:14:12.000000000 +0100
+++ chromium-119.0.6045.105/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc 2023-11-06 14:34:01.819869217 +0100
@@ -10,6 +10,7 @@
#include "modules/video_coding/utility/ivf_file_reader.h"
+#include <cstring>
#include <string>
#include <vector>
diff -up chromium-119.0.6045.105/ui/base/prediction/kalman_filter.h.missing-header-files chromium-119.0.6045.105/ui/base/prediction/kalman_filter.h
--- chromium-119.0.6045.105/ui/base/prediction/kalman_filter.h.missing-header-files 2023-11-01 19:11:28.000000000 +0100
+++ chromium-119.0.6045.105/ui/base/prediction/kalman_filter.h 2023-11-06 14:34:01.814869110 +0100
@@ -7,6 +7,8 @@
#include <stdint.h>
+#include <cstdint>
+
#include "base/component_export.h"
#include "ui/gfx/geometry/matrix3_f.h"
diff -up chromium-119.0.6045.105/ui/gfx/geometry/linear_gradient.h.missing-header-files chromium-119.0.6045.105/ui/gfx/geometry/linear_gradient.h
--- chromium-119.0.6045.105/ui/gfx/geometry/linear_gradient.h.missing-header-files 2023-11-01 19:11:28.000000000 +0100
+++ chromium-119.0.6045.105/ui/gfx/geometry/linear_gradient.h 2023-11-06 14:34:01.812869068 +0100
@@ -7,6 +7,7 @@
#include <stdint.h>
+#include <cstdint>
#include <array>
#include <cstddef>
#include <cstdint>
diff -up chromium-119.0.6045.105/ui/gfx/linux/drm_util_linux.h.missing-header-files chromium-119.0.6045.105/ui/gfx/linux/drm_util_linux.h
--- chromium-119.0.6045.105/ui/gfx/linux/drm_util_linux.h.missing-header-files 2023-11-01 19:11:28.000000000 +0100
+++ chromium-119.0.6045.105/ui/gfx/linux/drm_util_linux.h 2023-11-06 14:34:01.819869217 +0100
@@ -9,6 +9,8 @@
#include "ui/gfx/buffer_types.h"
+#include <cstdint>
+
namespace ui {
int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format);
diff -up chromium-121.0.6167.139/crypto/hkdf.h.me chromium-121.0.6167.139/crypto/hkdf.h
--- chromium-121.0.6167.139/crypto/hkdf.h.me 2024-02-03 17:24:49.957949670 +0100
+++ chromium-121.0.6167.139/crypto/hkdf.h 2024-02-03 17:26:05.753312178 +0100
@@ -7,6 +7,7 @@
#include <stddef.h>
+#include <vector>
#include <string>
#include <string_view>
diff -up chromium-121.0.6167.139/ui/display/types/display_color_management.h.me chromium-121.0.6167.139/ui/display/types/display_color_management.h
--- chromium-121.0.6167.139/ui/display/types/display_color_management.h.me 2024-02-03 18:55:34.889499101 +0100
+++ chromium-121.0.6167.139/ui/display/types/display_color_management.h 2024-02-03 18:55:59.608945624 +0100
@@ -6,6 +6,7 @@
#define UI_DISPLAY_TYPES_DISPLAY_COLOR_MANAGEMENT_H_
#include <vector>
+#include <memory>
#include "third_party/skia/modules/skcms/skcms.h"
#include "ui/display/types/display_types_export.h"
diff -up chromium-121.0.6167.139/ui/gfx/x/visual_manager.cc.me chromium-121.0.6167.139/ui/gfx/x/visual_manager.cc
--- chromium-121.0.6167.139/ui/gfx/x/visual_manager.cc.me 2024-02-03 21:20:32.126285578 +0100
+++ chromium-121.0.6167.139/ui/gfx/x/visual_manager.cc 2024-02-03 21:20:50.272607248 +0100
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <bitset>
+
#include "ui/gfx/x/visual_manager.h"
#include "base/strings/string_number_conversions.h"
diff -up chromium-121.0.6167.139/third_party/blink/renderer/platform/fonts/simple_font_data.h.me chromium-121.0.6167.139/third_party/blink/renderer/platform/fonts/simple_font_data.h
--- chromium-121.0.6167.139/third_party/blink/renderer/platform/fonts/simple_font_data.h.me 2024-02-03 22:47:05.632713381 +0100
+++ chromium-121.0.6167.139/third_party/blink/renderer/platform/fonts/simple_font_data.h 2024-02-03 22:47:30.788293027 +0100
@@ -26,6 +26,7 @@
#include <memory>
#include <utility>
+#include <mutex>
#include "build/build_config.h"
#include "third_party/blink/renderer/platform/fonts/canvas_rotation_in_vertical.h"
diff -up chromium-121.0.6167.139/chrome/browser/performance_manager/policies/probability_distribution.h.me chromium-121.0.6167.139/chrome/browser/performance_manager/policies/probability_distribution.h
--- chromium-121.0.6167.139/chrome/browser/performance_manager/policies/probability_distribution.h.me 2024-02-04 09:26:02.239427860 +0100
+++ chromium-121.0.6167.139/chrome/browser/performance_manager/policies/probability_distribution.h 2024-02-04 09:26:10.051565081 +0100
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_PERFORMANCE_MANAGER_POLICIES_PROBABILITY_DISTRIBUTION_H_
#define CHROME_BROWSER_PERFORMANCE_MANAGER_POLICIES_PROBABILITY_DISTRIBUTION_H_
+#include <cstdint>
#include <utility>
#include <vector>

@ -1,77 +0,0 @@
diff -up chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py.me chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py
--- chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py.me 2024-01-15 20:48:28.177397102 +0100
+++ chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py 2024-01-15 20:48:46.427768328 +0100
@@ -18,7 +18,7 @@ class HTMLGenerationController(object):
def GetHTMLForInlineStylesheet(self, contents):
if self.current_module is None:
- if re.search('url\(.+\)', contents):
+ if re.search(r'url\(.+\)', contents):
raise Exception(
'Default HTMLGenerationController cannot handle inline style urls')
return contents
diff -up chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py.me chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py
--- chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py.me 2024-01-15 20:49:39.363845083 +0100
+++ chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py 2024-01-15 20:49:57.407212098 +0100
@@ -4,4 +4,4 @@
def EscapeJSIfNeeded(js):
- return js.replace('</script>', '<\/script>')
+ return js.replace(r'</script>', r'<\/script>')
diff -up chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py.me chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py
--- chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py.me 2024-01-15 20:50:11.819505254 +0100
+++ chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py 2024-01-15 20:50:38.611050213 +0100
@@ -293,6 +293,6 @@ class HTMLModuleParser():
html = ''
else:
if html.find('< /script>') != -1:
- raise Exception('Escape script tags with <\/script>')
+ raise Exception(r'Escape script tags with <\/script>')
return HTMLModuleParserResults(html)
diff -up chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py.me chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py
--- chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py.me 2024-01-15 20:48:59.917042709 +0100
+++ chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py 2024-01-15 20:49:24.402540761 +0100
@@ -60,7 +60,7 @@ class ParsedStyleSheet(object):
return 'url(data:image/%s;base64,%s)' % (ext[1:], data.decode('utf-8'))
# I'm assuming we only have url()'s associated with images
- return re.sub('url\((?P<quote>"|\'|)(?P<url>[^"\'()]*)(?P=quote)\)',
+ return re.sub(r'url\((?P<quote>"|\'|)(?P<url>[^"\'()]*)(?P=quote)\)',
InlineUrl, self.contents)
def AppendDirectlyDependentFilenamesTo(self, dependent_filenames):
@@ -72,7 +72,7 @@ class ParsedStyleSheet(object):
raise Exception('@imports are not supported')
matches = re.findall(
- 'url\((?:["|\']?)([^"\'()]*)(?:["|\']?)\)',
+ r'url\((?:["|\']?)([^"\'()]*)(?:["|\']?)\)',
self.contents)
def resolve_url(url):
diff -up chromium-121.0.6167.57/third_party/vulkan-deps/vulkan-tools/src/scripts/gn/generate_vulkan_icd_json.py.me chromium-121.0.6167.57/third_party/vulkan-deps/vulkan-tools/src/scripts/gn/generate_vulkan_icd_json.py
--- chromium-121.0.6167.57/third_party/vulkan-deps/vulkan-tools/src/scripts/gn/generate_vulkan_icd_json.py.me 2024-01-15 20:50:56.810420400 +0100
+++ chromium-121.0.6167.57/third_party/vulkan-deps/vulkan-tools/src/scripts/gn/generate_vulkan_icd_json.py 2024-01-15 20:52:33.506387261 +0100
@@ -28,7 +28,7 @@ import platform
import sys
def glob_slash(dirname):
- """Like regular glob but replaces \ with / in returned paths."""
+ """Like regular glob but replaces \\ with / in returned paths."""
return [s.replace('\\', '/') for s in glob.glob(dirname)]
def main():
diff -up chromium-121.0.6167.57/third_party/vulkan-deps/vulkan-validation-layers/src/scripts/gn/generate_vulkan_layers_json.py.me chromium-121.0.6167.57/third_party/vulkan-deps/vulkan-validation-layers/src/scripts/gn/generate_vulkan_layers_json.py
--- chromium-121.0.6167.57/third_party/vulkan-deps/vulkan-validation-layers/src/scripts/gn/generate_vulkan_layers_json.py.me 2024-01-15 20:52:38.016479000 +0100
+++ chromium-121.0.6167.57/third_party/vulkan-deps/vulkan-validation-layers/src/scripts/gn/generate_vulkan_layers_json.py 2024-01-15 20:52:48.863699640 +0100
@@ -28,7 +28,7 @@ import platform
import sys
def glob_slash(dirname):
- """Like regular glob but replaces \ with / in returned paths."""
+ """Like regular glob but replaces \\ with / in returned paths."""
return [s.replace('\\', '/') for s in glob.glob(dirname)]
def main():

@ -1,259 +0,0 @@
--- chromium-120.0.6099.56/base/containers/map_util.h.me 2023-12-02 19:00:19.696801563 +0100
+++ chromium-120.0.6099.56/base/containers/map_util.h 2023-12-02 19:00:47.049337547 +0100
@@ -42,7 +42,7 @@
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);
@@ -58,7 +58,7 @@
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() ? std::to_address(it->second) : nullptr;
diff -up chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc.me chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc
--- chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc.me 2023-06-17 14:50:56.342591702 +0200
+++ chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc 2023-06-17 14:57:48.024377375 +0200
@@ -91,7 +91,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);
@@ -967,9 +967,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-115.0.5790.32/components/optimization_guide/core/tflite_model_executor.h.me chromium-115.0.5790.32/components/optimization_guide/core/tflite_model_executor.h
--- chromium-115.0.5790.32/components/optimization_guide/core/tflite_model_executor.h.me 2023-06-18 21:52:53.515625237 +0200
+++ chromium-115.0.5790.32/components/optimization_guide/core/tflite_model_executor.h 2023-06-18 21:53:06.881881293 +0200
@@ -189,7 +189,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_);
diff -up chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.me chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc
--- chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.me 2023-06-19 10:03:32.319218678 +0200
+++ chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc 2023-06-19 10:04:12.023942232 +0200
@@ -169,7 +169,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;
typedef UCharLiteralBuffer<32> UCharLiteralBufferType;
diff -up chromium-116.0.5845.50/content/public/browser/web_ui_browser_interface_broker_registry.h.me chromium-116.0.5845.50/content/public/browser/web_ui_browser_interface_broker_registry.h
--- chromium-116.0.5845.50/content/public/browser/web_ui_browser_interface_broker_registry.h.me 2023-08-02 16:18:30.380108125 +0200
+++ chromium-116.0.5845.50/content/public/browser/web_ui_browser_interface_broker_registry.h 2023-08-02 16:20:59.660024578 +0200
@@ -127,10 +127,10 @@ class CONTENT_EXPORT WebUIBrowserInterfa
//
// TODO(crbug.com/1407936): Point to WebUIJsBridge documentation.
template <typename ControllerType>
- JsBridgeTraits<ControllerType>::BinderInitializer& ForWebUIWithJsBridge() {
+ typename JsBridgeTraits<ControllerType>::BinderInitializer& ForWebUIWithJsBridge() {
using Traits = JsBridgeTraits<ControllerType>;
- using Interface = Traits::Interface;
- using JsBridgeBinderInitializer = Traits::BinderInitializer;
+ using Interface = typename Traits::Interface;
+ using JsBridgeBinderInitializer = typename Traits::BinderInitializer;
// WebUIController::GetType() requires an instantiated WebUIController
// (because it's a virtual method and can't be static). Here we only have
diff -up chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h.me chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h
--- chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h.me 2023-08-02 20:41:23.984729462 +0200
+++ chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h 2023-08-02 20:41:53.737583093 +0200
@@ -270,8 +270,8 @@ class CORE_EXPORT ObjectPaintPropertiesS
NodeList& nodes,
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-117.0.5938.62/components/optimization_guide/core/tflite_model_executor.h.me chromium-117.0.5938.62/components/optimization_guide/core/tflite_model_executor.h
--- chromium-117.0.5938.62/components/optimization_guide/core/tflite_model_executor.h.me 2023-09-15 10:22:51.889698402 +0200
+++ chromium-117.0.5938.62/components/optimization_guide/core/tflite_model_executor.h 2023-09-15 10:28:26.702716224 +0200
@@ -234,7 +234,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<absl::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_);
@@ -389,7 +389,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_);
@@ -406,7 +406,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<absl::optional<OutputType>>* outputs) {
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
@@ -466,7 +466,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-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.cc.me chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.cc
--- chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.cc.me 2023-09-15 17:20:22.550657586 +0200
+++ chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.cc 2023-09-15 17:24:11.396716734 +0200
@@ -399,7 +399,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();
}
@@ -435,7 +435,7 @@ class RetryingFetcherImpl final : public
}
// Client callback.
- ProtoFetcher<Response>::Callback callback_;
+ typename ProtoFetcher<Response>::Callback callback_;
// Retry controls.
base::OneShotTimer timer_;
@@ -578,7 +578,7 @@ ParallelFetchManager<Request, Response>:
template <typename Request, typename Response>
void ParallelFetchManager<Request, Response>::Fetch(
const Request& request,
- Fetcher::Callback callback) {
+ 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-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.h.me chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.h
--- chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.h.me 2023-09-15 17:20:56.540460391 +0200
+++ chromium-117.0.5938.62/components/supervised_user/core/browser/proto_fetcher.h 2023-09-15 17:22:18.246237817 +0200
@@ -165,10 +165,10 @@ 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);
private:
- using KeyType = base::IDMap<std::unique_ptr<Fetcher>>::KeyType;
+ using KeyType = typename base::IDMap<std::unique_ptr<Fetcher>>::KeyType;
// Remove fetcher under key from requests_in_flight_.
void Remove(KeyType key);
diff -up chromium-120.0.6099.56/third_party/blink/renderer/bindings/core/v8/async_iterable.h.me chromium-120.0.6099.56/third_party/blink/renderer/bindings/core/v8/async_iterable.h
--- chromium-120.0.6099.56/third_party/blink/renderer/bindings/core/v8/async_iterable.h.me 2023-12-04 00:29:35.197209538 +0100
+++ chromium-120.0.6099.56/third_party/blink/renderer/bindings/core/v8/async_iterable.h 2023-12-04 00:30:24.436233249 +0100
@@ -220,7 +220,7 @@ class PairAsyncIterable {
private:
virtual IterationSource* CreateIterationSource(
ScriptState* script_state,
- IterationSource::Kind kind,
+ typename IterationSource::Kind kind,
ExceptionState& exception_state) = 0;
};
@@ -262,7 +262,7 @@ class ValueAsyncIterable {
private:
virtual IterationSource* CreateIterationSource(
ScriptState* script_state,
- IterationSource::Kind kind,
+ typename IterationSource::Kind kind,
ExceptionState& exception_state) = 0;
};
diff -up chromium-121.0.6167.57/base/functional/bind_internal.h.me chromium-121.0.6167.57/base/functional/bind_internal.h
--- chromium-121.0.6167.57/base/functional/bind_internal.h.me 2024-01-21 16:10:09.809037581 +0100
+++ chromium-121.0.6167.57/base/functional/bind_internal.h 2024-01-21 16:46:33.759397303 +0100
@@ -1533,11 +1533,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>;
// We forbid callbacks from using raw_ptr as a parameter. However, we allow
diff -up chromium-121.0.6167.57/mojo/public/cpp/bindings/array_traits.h.me chromium-121.0.6167.57/mojo/public/cpp/bindings/array_traits.h
--- chromium-121.0.6167.57/mojo/public/cpp/bindings/array_traits.h.me 2024-01-21 17:23:37.786606428 +0100
+++ chromium-121.0.6167.57/mojo/public/cpp/bindings/array_traits.h 2024-01-21 17:23:58.582127103 +0100
@@ -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-121.0.6167.57/components/optimization_guide/core/model_execution/model_execution_util.h.me chromium-121.0.6167.57/components/optimization_guide/core/model_execution/model_execution_util.h
--- chromium-121.0.6167.57/components/optimization_guide/core/model_execution/model_execution_util.h.me 2024-01-21 17:33:40.030897838 +0100
+++ chromium-121.0.6167.57/components/optimization_guide/core/model_execution/model_execution_util.h 2024-01-21 17:34:11.518705266 +0100
@@ -25,7 +25,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-121.0.6167.57/components/optimization_guide/core/model_quality/model_quality_log_entry.h.me chromium-121.0.6167.57/components/optimization_guide/core/model_quality/model_quality_log_entry.h
--- chromium-121.0.6167.57/components/optimization_guide/core/model_quality/model_quality_log_entry.h.me 2024-01-21 17:32:42.367417619 +0100
+++ chromium-121.0.6167.57/components/optimization_guide/core/model_quality/model_quality_log_entry.h 2024-01-21 17:33:25.732531198 +0100
@@ -29,7 +29,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();
}

@ -0,0 +1,171 @@
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}
diff --git a/third_party/blink/renderer/bindings/core/v8/native_value_traits.h b/third_party/blink/renderer/bindings/core/v8/native_value_traits.h
index 1e5a0790df6da..a5c28b37e9454 100644
--- a/third_party/blink/renderer/bindings/core/v8/native_value_traits.h
+++ b/third_party/blink/renderer/bindings/core/v8/native_value_traits.h
@@ -84,6 +84,12 @@ struct NativeValueTraitsBase {
std::is_pointer_v<ImplType> ||
requires(ImplType value) { value.IsNull(); };
+ // 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,
diff --git 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
index 5011503dcf1c0..f085b6e905161 100644
--- 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
@@ -1037,10 +1037,86 @@ CreateIDLSequenceFromV8ArraySlow(v8::Isolate* isolate,
return {};
}
- typename NativeValueTraits<IDLSequence<T>>::ImplType result;
+ using ResultType = typename NativeValueTraits<IDLSequence<T>>::ImplType;
+ ResultType 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);
+ // 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(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(
+ callback_data->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;
@@ -1056,6 +1132,7 @@ CreateIDLSequenceFromV8ArraySlow(v8::Isolate* isolate,
return {};
result.push_back(std::move(element));
}
+
// 3.2. If next is false, then return an IDL sequence value of type
// sequence<T> of length i, where the value of the element at index j is Sj.
return result;
@@ -1398,6 +1475,7 @@ struct NativeValueTraits<T> : public NativeValueTraitsBase<T*> {
}
};
+// Interface types
template <typename T>
requires std::derived_from<T, CallbackInterfaceBase>
struct NativeValueTraits<IDLNullable<T>>
@@ -1470,12 +1548,21 @@ struct NativeValueTraits<T> : public NativeValueTraitsBase<T> {
template <typename T>
requires std::derived_from<T, ScriptWrappable>
struct NativeValueTraits<T> : 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,
ExceptionState& exception_state) {
const WrapperTypeInfo* wrapper_type_info = T::GetStaticWrapperTypeInfo();
- if (V8PerIsolateData::From(isolate)->HasInstance(wrapper_type_info, value))
+ if (V8PerIsolateData::From(isolate)->HasInstance(wrapper_type_info,
+ value)) {
return ToScriptWrappable(value.As<v8::Object>())->template ToImpl<T>();
+ }
bindings::NativeValueTraitsInterfaceNotOfType(wrapper_type_info,
exception_state);

@ -0,0 +1,13 @@
diff -up chromium-122.0.6261.57/base/allocator/partition_allocator/partition_alloc.gni.me chromium-122.0.6261.57/base/allocator/partition_allocator/partition_alloc.gni
--- chromium-122.0.6261.57/base/allocator/partition_allocator/partition_alloc.gni.me 2024-02-22 20:22:44.115269845 +0100
+++ chromium-122.0.6261.57/base/allocator/partition_allocator/partition_alloc.gni 2024-02-22 20:23:07.067681890 +0100
@@ -29,8 +29,7 @@ if (is_nacl) {
assert(false, "Unknown CPU: $current_cpu")
}
-has_memory_tagging =
- current_cpu == "arm64" && is_clang && !is_asan && (is_linux || is_android)
+has_memory_tagging = false
declare_args() {
# Causes all the allocations to be routed via allocator_shim.cc. Usually,

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

@ -0,0 +1,20 @@
diff -up chromium-122.0.6261.39/build/config/compiler/BUILD.gn.me chromium-122.0.6261.39/build/config/compiler/BUILD.gn
--- chromium-122.0.6261.39/build/config/compiler/BUILD.gn.me 2024-02-19 21:58:15.835818177 +0100
+++ chromium-122.0.6261.39/build/config/compiler/BUILD.gn 2024-02-19 21:59:11.661880633 +0100
@@ -1856,15 +1856,12 @@ config("default_warnings") {
# TODO(crbug.com/1494809): Evaluate and possibly enable.
"-Wno-vla-extension",
-
- # TODO(https://crbug.com/1490607): Fix and re-enable.
- "-Wno-thread-safety-reference-return",
]
if (!is_nacl) {
cflags_cc += [
# TODO(https://crbug.com/1513724): Fix and re-enable.
- "-Wno-c++11-narrowing-const-reference",
+ "-Wno-c++11-narrowing",
]
}
}

@ -0,0 +1,12 @@
diff -up chromium-122.0.6261.29/build/config/compiler/BUILD.gn.me chromium-122.0.6261.29/build/config/compiler/BUILD.gn
--- chromium-122.0.6261.29/build/config/compiler/BUILD.gn.me 2024-02-12 14:46:52.691992282 +0100
+++ chromium-122.0.6261.29/build/config/compiler/BUILD.gn 2024-02-12 14:48:54.256274068 +0100
@@ -787,7 +787,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(https://crbug.com/1211155): investigate why this isn't effective on

@ -0,0 +1,45 @@
diff -up chromium-122.0.6261.29/components/autofill/core/common/unique_ids.h.me chromium-122.0.6261.29/components/autofill/core/common/unique_ids.h
--- chromium-122.0.6261.29/components/autofill/core/common/unique_ids.h.me 2024-02-13 13:07:24.982184485 +0100
+++ chromium-122.0.6261.29/components/autofill/core/common/unique_ids.h 2024-02-13 13:07:45.510551589 +0100
@@ -137,7 +137,7 @@ struct GlobalId {
friend constexpr auto operator<=>(const GlobalId<RendererId>& lhs,
const GlobalId<RendererId>& rhs) = default;
- friend constexpr bool operator==(const GlobalId<RendererId>& lhs,
+ friend bool operator==(const GlobalId<RendererId>& lhs,
const GlobalId<RendererId>& rhs) = default;
};
diff -up chromium-122.0.6261.29/base/types/strong_alias.h.me chromium-122.0.6261.29/base/types/strong_alias.h
--- chromium-122.0.6261.29/base/types/strong_alias.h.me 2024-02-13 14:13:20.311374288 +0100
+++ chromium-122.0.6261.29/base/types/strong_alias.h 2024-02-13 12:30:38.596913951 +0100
@@ -110,7 +110,7 @@ class StrongAlias {
// a `StrongAlias<W>`.
friend constexpr auto operator<=>(const StrongAlias& lhs,
const StrongAlias& rhs) = default;
- friend constexpr bool operator==(const StrongAlias& lhs,
+ friend bool operator==(const StrongAlias& lhs,
const StrongAlias& rhs) = default;
// Hasher to use in std::unordered_map, std::unordered_set, etc.
diff -up chromium-122.0.6261.29/components/performance_manager/resource_attribution/query_params.h.constexpr chromium-122.0.6261.29/components/performance_manager/resource_attribution/query_params.h
--- chromium-122.0.6261.29/components/performance_manager/resource_attribution/query_params.h.constexpr 2024-02-07 19:49:31.000000000 +0100
+++ chromium-122.0.6261.29/components/performance_manager/resource_attribution/query_params.h 2024-02-13 11:12:52.913338699 +0100
@@ -29,7 +29,7 @@ class ContextCollection {
ContextCollection(const ContextCollection& other);
ContextCollection& operator=(const ContextCollection& other);
- friend constexpr bool operator==(const ContextCollection&,
+ friend bool operator==(const ContextCollection&,
const ContextCollection&) = default;
// Adds `context` to the collection.
@@ -67,7 +67,7 @@ struct QueryParams {
QueryParams(const QueryParams& other);
QueryParams& operator=(const QueryParams& other);
- friend constexpr bool operator==(const QueryParams&,
+ friend bool operator==(const QueryParams&,
const QueryParams&) = default;
// Resource types to measure.

@ -0,0 +1,12 @@
diff -up chromium-122.0.6261.29/media/base/media_switches.cc.disable-FFmpegAllowLists chromium-122.0.6261.29/media/base/media_switches.cc
--- chromium-122.0.6261.29/media/base/media_switches.cc.disable-FFmpegAllowLists 2024-02-12 15:56:50.703196471 +0100
+++ chromium-122.0.6261.29/media/base/media_switches.cc 2024-02-12 17:08:42.266076401 +0100
@@ -1687,7 +1687,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);
// Enables sending MediaLog to the log stream, which is useful for easier
// development by ensuring logs can be seen without a remote desktop session.

@ -0,0 +1,24 @@
diff -up chromium-122.0.6261.69/components/variations/service/ui_string_overrider.cc.default-constructor-involving-anonymous-union chromium-122.0.6261.69/components/variations/service/ui_string_overrider.cc
--- chromium-122.0.6261.69/components/variations/service/ui_string_overrider.cc.default-constructor-involving-anonymous-union 2024-02-22 22:43:05.000000000 +0100
+++ chromium-122.0.6261.69/components/variations/service/ui_string_overrider.cc 2024-02-25 10:52:16.071602503 +0100
@@ -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-122.0.6261.69/content/browser/interest_group/header_direct_from_seller_signals.cc.default-constructor-involving-anonymous-union chromium-122.0.6261.69/content/browser/interest_group/header_direct_from_seller_signals.cc
--- chromium-122.0.6261.69/content/browser/interest_group/header_direct_from_seller_signals.cc.default-constructor-involving-anonymous-union 2024-02-25 10:52:16.070602478 +0100
+++ chromium-122.0.6261.69/content/browser/interest_group/header_direct_from_seller_signals.cc 2024-02-25 11:20:36.583148226 +0100
@@ -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,

@ -0,0 +1,11 @@
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; }
};

@ -1,7 +1,10 @@
diff -up chromium-116.0.5845.96/cc/paint/paint_op_writer.h.me chromium-116.0.5845.96/cc/paint/paint_op_writer.h
--- chromium-116.0.5845.96/cc/paint/paint_op_writer.h.me 2023-08-16 19:09:48.998173285 +0200
+++ chromium-116.0.5845.96/cc/paint/paint_op_writer.h 2023-08-16 21:13:44.442431527 +0200
@@ -104,7 +104,16 @@ class CC_PAINT_EXPORT PaintOpWriter {
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>
@ -10,16 +13,17 @@ diff -up chromium-116.0.5845.96/cc/paint/paint_op_writer.h.me chromium-116.0.584
+ static_assert(!std::is_pointer_v<T>);
+ return base::bits::AlignUp(sizeof(T), kDefaultAlignment);
+ }
+ // size_t is always serialized as uint64_t to make the serialized result
+
+ // 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(sizeof(uint64_t), kDefaultAlignment);
+ return base::bits::AlignUp(2 * sizeof(uint32_t), kDefaultAlignment);
+ }
public:
// SerializedSize() returns the maximum serialized size of the given type or
@@ -115,7 +124,10 @@ class CC_PAINT_EXPORT PaintOpWriter {
@@ -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>
@ -31,11 +35,10 @@ diff -up chromium-116.0.5845.96/cc/paint/paint_op_writer.h.me chromium-116.0.584
template <typename T>
static constexpr size_t SerializedSize(const T& data);
static size_t SerializedSize(const PaintImage& image);
@@ -360,19 +372,6 @@ class CC_PAINT_EXPORT PaintOpWriter {
const bool enable_security_constraints_;
@@ -439,24 +452,6 @@ class CC_PAINT_EXPORT PaintOpWriter {
};
-template <typename T>
template <typename T>
-constexpr size_t PaintOpWriter::SerializedSizeSimple() {
- static_assert(!std::is_pointer_v<T>);
- return base::bits::AlignUp(sizeof(T), kDefaultAlignment);
@ -48,13 +51,7 @@ diff -up chromium-116.0.5845.96/cc/paint/paint_op_writer.h.me chromium-116.0.584
- return base::bits::AlignUp(2 * sizeof(uint32_t), kDefaultAlignment);
-}
-
template <>
constexpr size_t PaintOpWriter::SerializedSize<SkGainmapInfo>() {
return SerializedSizeSimple<SkColor4f>() + // fGainmapRatioMin
@@ -386,11 +385,6 @@ constexpr size_t PaintOpWriter::Serializ
}
template <typename T>
-template <typename T>
-constexpr size_t PaintOpWriter::SerializedSize() {
- static_assert(std::is_arithmetic_v<T> || std::is_enum_v<T>);
- return SerializedSizeSimple<T>();

@ -22,7 +22,7 @@ diff -up chromium-121.0.6167.139/base/allocator/partition_allocator/src/partitio
@@ -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 BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)
#elif (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)) && defined(ARCH_CPU_ARM64)
-// 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).

@ -0,0 +1,191 @@
diff -up chromium-122.0.6261.29/base/check_op.h.missing-header-files chromium-122.0.6261.29/base/check_op.h
--- chromium-122.0.6261.29/base/check_op.h.missing-header-files 2024-02-07 19:49:20.000000000 +0100
+++ chromium-122.0.6261.29/base/check_op.h 2024-02-12 14:59:48.136415060 +0100
@@ -5,6 +5,7 @@
#ifndef BASE_CHECK_OP_H_
#define BASE_CHECK_OP_H_
+#include <cstdint>
#include <cstddef>
#include <string>
#include <string_view>
diff -up chromium-122.0.6261.29/base/containers/flat_map.h.missing-header-files chromium-122.0.6261.29/base/containers/flat_map.h
--- chromium-122.0.6261.29/base/containers/flat_map.h.missing-header-files 2024-02-07 19:49:20.000000000 +0100
+++ chromium-122.0.6261.29/base/containers/flat_map.h 2024-02-12 14:59:48.136415060 +0100
@@ -5,6 +5,7 @@
#ifndef BASE_CONTAINERS_FLAT_MAP_H_
#define BASE_CONTAINERS_FLAT_MAP_H_
+#include <cstdint>
#include <functional>
#include <tuple>
#include <type_traits>
diff -up chromium-122.0.6261.29/chrome/browser/webauthn/authenticator_request_dialog_model.h.missing-header-files chromium-122.0.6261.29/chrome/browser/webauthn/authenticator_request_dialog_model.h
--- chromium-122.0.6261.29/chrome/browser/webauthn/authenticator_request_dialog_model.h.missing-header-files 2024-02-12 14:59:48.137415079 +0100
+++ chromium-122.0.6261.29/chrome/browser/webauthn/authenticator_request_dialog_model.h 2024-02-12 15:28:17.168395787 +0100
@@ -9,6 +9,7 @@
#include <optional>
#include <string>
#include <vector>
+#include <variant>
#include "base/containers/span.h"
#include "base/functional/callback_forward.h"
diff -up chromium-122.0.6261.29/chrome/test/chromedriver/chrome/web_view_impl.cc.missing-header-files chromium-122.0.6261.29/chrome/test/chromedriver/chrome/web_view_impl.cc
--- chromium-122.0.6261.29/chrome/test/chromedriver/chrome/web_view_impl.cc.missing-header-files 2024-02-07 19:49:27.000000000 +0100
+++ chromium-122.0.6261.29/chrome/test/chromedriver/chrome/web_view_impl.cc 2024-02-12 14:59:48.137415079 +0100
@@ -11,6 +11,7 @@
#include <queue>
#include <utility>
#include <vector>
+#include <cstring>
#include "base/check.h"
#include "base/files/file_path.h"
diff -up chromium-122.0.6261.29/components/feature_engagement/internal/never_event_storage_validator.h.missing-header-files chromium-122.0.6261.29/components/feature_engagement/internal/never_event_storage_validator.h
--- chromium-122.0.6261.29/components/feature_engagement/internal/never_event_storage_validator.h.missing-header-files 2024-02-07 19:49:30.000000000 +0100
+++ chromium-122.0.6261.29/components/feature_engagement/internal/never_event_storage_validator.h 2024-02-12 14:59:48.138415097 +0100
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_NEVER_EVENT_STORAGE_VALIDATOR_H_
#define COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_NEVER_EVENT_STORAGE_VALIDATOR_H_
+#include <cstdint>
#include <string>
#include "components/feature_engagement/internal/event_storage_validator.h"
diff -up chromium-122.0.6261.29/gin/time_clamper.h.missing-header-files chromium-122.0.6261.29/gin/time_clamper.h
--- chromium-122.0.6261.29/gin/time_clamper.h.missing-header-files 2024-02-07 19:49:35.000000000 +0100
+++ chromium-122.0.6261.29/gin/time_clamper.h 2024-02-12 14:59:48.138415097 +0100
@@ -48,7 +48,7 @@ class GIN_EXPORT TimeClamper {
const int64_t micros = now_micros % 1000;
// abs() is necessary for devices with times before unix-epoch (most likely
// configured incorrectly).
- if (abs(micros) + kResolutionMicros < 1000) {
+ if (std::abs(micros) + kResolutionMicros < 1000) {
return now_micros / 1000;
}
return ClampTimeResolution(now_micros) / 1000;
diff -up chromium-122.0.6261.29/net/base/net_export.h.missing-header-files chromium-122.0.6261.29/net/base/net_export.h
--- chromium-122.0.6261.29/net/base/net_export.h.missing-header-files 2024-02-07 19:49:38.000000000 +0100
+++ chromium-122.0.6261.29/net/base/net_export.h 2024-02-12 14:59:48.139415116 +0100
@@ -5,6 +5,8 @@
#ifndef NET_BASE_NET_EXPORT_H_
#define NET_BASE_NET_EXPORT_H_
+#include <cstdint>
+
// Defines NET_EXPORT so that functionality implemented by the net module can
// be exported to consumers, and NET_EXPORT_PRIVATE that allows unit tests to
// access features not intended to be used directly by real consumers.
diff -up chromium-122.0.6261.29/third_party/abseil-cpp/absl/strings/string_view.h.missing-header-files chromium-122.0.6261.29/third_party/abseil-cpp/absl/strings/string_view.h
--- chromium-122.0.6261.29/third_party/abseil-cpp/absl/strings/string_view.h.missing-header-files 2024-02-07 19:49:40.000000000 +0100
+++ chromium-122.0.6261.29/third_party/abseil-cpp/absl/strings/string_view.h 2024-02-12 14:59:48.142415172 +0100
@@ -27,6 +27,7 @@
#ifndef ABSL_STRINGS_STRING_VIEW_H_
#define ABSL_STRINGS_STRING_VIEW_H_
+#include <cstdint>
#include <algorithm>
#include <cassert>
#include <cstddef>
diff -up chromium-122.0.6261.29/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h.missing-header-files chromium-122.0.6261.29/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h
--- chromium-122.0.6261.29/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h.missing-header-files 2024-02-07 19:50:44.000000000 +0100
+++ chromium-122.0.6261.29/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h 2024-02-12 14:59:48.142415172 +0100
@@ -28,6 +28,7 @@
#ifndef SRC_TINT_LANG_SPIRV_READER_AST_PARSER_NAMER_H_
#define SRC_TINT_LANG_SPIRV_READER_AST_PARSER_NAMER_H_
+#include <cstdint>
#include <string>
#include <unordered_map>
#include <vector>
diff -up chromium-122.0.6261.29/third_party/material_color_utilities/src/cpp/palettes/tones.cc.missing-header-files chromium-122.0.6261.29/third_party/material_color_utilities/src/cpp/palettes/tones.cc
--- chromium-122.0.6261.29/third_party/material_color_utilities/src/cpp/palettes/tones.cc.missing-header-files 2024-02-07 19:52:34.000000000 +0100
+++ chromium-122.0.6261.29/third_party/material_color_utilities/src/cpp/palettes/tones.cc 2024-02-12 14:59:48.143415190 +0100
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include <cmath>
#include "cpp/palettes/tones.h"
#include "cpp/cam/cam.h"
diff -up chromium-122.0.6261.29/third_party/ruy/src/ruy/profiler/instrumentation.h.missing-header-files chromium-122.0.6261.29/third_party/ruy/src/ruy/profiler/instrumentation.h
--- chromium-122.0.6261.29/third_party/ruy/src/ruy/profiler/instrumentation.h.missing-header-files 2024-02-07 19:52:59.000000000 +0100
+++ chromium-122.0.6261.29/third_party/ruy/src/ruy/profiler/instrumentation.h 2024-02-12 14:59:48.143415190 +0100
@@ -17,6 +17,7 @@ limitations under the License.
#define RUY_RUY_PROFILER_INSTRUMENTATION_H_
#ifdef RUY_PROFILER
+#include <string>
#include <cstdio>
#include <mutex>
#include <vector>
diff -up chromium-122.0.6261.29/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc.missing-header-files chromium-122.0.6261.29/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc
--- chromium-122.0.6261.29/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc.missing-header-files 2024-02-07 19:54:45.000000000 +0100
+++ chromium-122.0.6261.29/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc 2024-02-12 14:59:48.143415190 +0100
@@ -45,6 +45,7 @@
#include "llvm/Support/SaveAndRestore.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
+#include <cstdint>
#include <string>
#include <sysexits.h>
#ifdef HAVE_BACKTRACE
diff -up chromium-122.0.6261.29/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h.missing-header-files chromium-122.0.6261.29/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h
--- chromium-122.0.6261.29/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h.missing-header-files 2024-02-07 19:53:17.000000000 +0100
+++ chromium-122.0.6261.29/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h 2024-02-12 14:59:48.143415190 +0100
@@ -31,6 +31,7 @@ limitations under the License.
#ifndef TENSORFLOW_LITE_KERNELS_INTERNAL_SPECTROGRAM_H_
#define TENSORFLOW_LITE_KERNELS_INTERNAL_SPECTROGRAM_H_
+#include <cstdint>
#include <complex>
#include <deque>
#include <vector>
diff -up chromium-122.0.6261.29/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h.missing-header-files chromium-122.0.6261.29/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h
--- chromium-122.0.6261.29/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h.missing-header-files 2024-02-07 19:54:20.000000000 +0100
+++ chromium-122.0.6261.29/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h 2024-02-12 14:59:48.145415228 +0100
@@ -2884,6 +2884,7 @@ static void vma_aligned_free(void* VMA_N
// Define this macro to 1 to enable functions: vmaBuildStatsString, vmaFreeStatsString.
#if VMA_STATS_STRING_ENABLED
+#include <stdio.h>
static inline void VmaUint32ToStr(char* VMA_NOT_NULL outStr, size_t strLen, uint32_t num)
{
snprintf(outStr, strLen, "%u", static_cast<unsigned int>(num));
diff -up chromium-122.0.6261.29/third_party/webrtc/audio/utility/channel_mixer.cc.missing-header-files chromium-122.0.6261.29/third_party/webrtc/audio/utility/channel_mixer.cc
--- chromium-122.0.6261.29/third_party/webrtc/audio/utility/channel_mixer.cc.missing-header-files 2024-02-07 19:53:17.000000000 +0100
+++ chromium-122.0.6261.29/third_party/webrtc/audio/utility/channel_mixer.cc 2024-02-12 14:59:48.145415228 +0100
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include <cstring>
+
#include "audio/utility/channel_mixer.h"
#include "audio/utility/channel_mixing_matrix.h"
diff -up chromium-122.0.6261.29/third_party/webrtc/modules/include/module_common_types_public.h.missing-header-files chromium-122.0.6261.29/third_party/webrtc/modules/include/module_common_types_public.h
--- chromium-122.0.6261.29/third_party/webrtc/modules/include/module_common_types_public.h.missing-header-files 2024-02-07 19:53:17.000000000 +0100
+++ chromium-122.0.6261.29/third_party/webrtc/modules/include/module_common_types_public.h 2024-02-12 14:59:48.145415228 +0100
@@ -11,6 +11,7 @@
#ifndef MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
#define MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
+#include <cstdint>
#include <limits>
#include "absl/types/optional.h"
diff -up chromium-122.0.6261.29/ui/gfx/linux/drm_util_linux.h.missing-header-files chromium-122.0.6261.29/ui/gfx/linux/drm_util_linux.h
--- chromium-122.0.6261.29/ui/gfx/linux/drm_util_linux.h.missing-header-files 2024-02-07 19:50:05.000000000 +0100
+++ chromium-122.0.6261.29/ui/gfx/linux/drm_util_linux.h 2024-02-12 14:59:48.147415265 +0100
@@ -9,6 +9,8 @@
#include "ui/gfx/buffer_types.h"
+#include <cstdint>
+
namespace ui {
int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format);

@ -1,7 +1,7 @@
diff -up chromium-119.0.6045.105/chrome/browser/safe_browsing/download_protection/file_analyzer.cc.nounrar chromium-119.0.6045.105/chrome/browser/safe_browsing/download_protection/file_analyzer.cc
--- chromium-119.0.6045.105/chrome/browser/safe_browsing/download_protection/file_analyzer.cc.nounrar 2023-11-01 19:10:13.000000000 +0100
+++ chromium-119.0.6045.105/chrome/browser/safe_browsing/download_protection/file_analyzer.cc 2023-11-06 17:16:55.630255973 +0100
@@ -77,8 +77,6 @@ void FileAnalyzer::Start(const base::Fil
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();
@ -10,9 +10,9 @@ diff -up chromium-119.0.6045.105/chrome/browser/safe_browsing/download_protectio
#if BUILDFLAG(IS_MAC)
} else if (inspection_type == DownloadFileType::DMG) {
StartExtractDmgFeatures();
diff -up chromium-119.0.6045.105/chrome/common/safe_browsing/BUILD.gn.nounrar chromium-119.0.6045.105/chrome/common/safe_browsing/BUILD.gn
--- chromium-119.0.6045.105/chrome/common/safe_browsing/BUILD.gn.nounrar 2023-11-01 19:10:16.000000000 +0100
+++ chromium-119.0.6045.105/chrome/common/safe_browsing/BUILD.gn 2023-11-06 17:16:55.630255973 +0100
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",
@ -21,11 +21,11 @@ diff -up chromium-119.0.6045.105/chrome/common/safe_browsing/BUILD.gn.nounrar ch
]
public_deps = [
diff -up chromium-119.0.6045.105/chrome/services/file_util/safe_archive_analyzer.cc.nounrar chromium-119.0.6045.105/chrome/services/file_util/safe_archive_analyzer.cc
--- chromium-119.0.6045.105/chrome/services/file_util/safe_archive_analyzer.cc.nounrar 2023-11-06 18:07:30.549291823 +0100
+++ chromium-119.0.6045.105/chrome/services/file_util/safe_archive_analyzer.cc 2023-11-06 18:08:00.510076945 +0100
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 absl::optional<std::string>& password,
const std::optional<std::string>& password,
mojo::PendingRemote<chrome::mojom::TemporaryFileGetter> temp_file_getter,
AnalyzeRarFileCallback callback) {
+#if 0
@ -42,10 +42,10 @@ diff -up chromium-119.0.6045.105/chrome/services/file_util/safe_archive_analyzer
}
void SafeArchiveAnalyzer::AnalyzeSevenZipFile(
diff -up chromium-119.0.6045.105/chrome/services/file_util/safe_archive_analyzer.h.nounrar chromium-119.0.6045.105/chrome/services/file_util/safe_archive_analyzer.h
--- chromium-119.0.6045.105/chrome/services/file_util/safe_archive_analyzer.h.nounrar 2023-11-01 19:10:16.000000000 +0100
+++ chromium-119.0.6045.105/chrome/services/file_util/safe_archive_analyzer.h 2023-11-06 17:16:55.630255973 +0100
@@ -7,7 +7,6 @@
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"
@ -53,7 +53,7 @@ diff -up chromium-119.0.6045.105/chrome/services/file_util/safe_archive_analyzer
#include "chrome/utility/safe_browsing/seven_zip_analyzer.h"
#include "chrome/utility/safe_browsing/zip_analyzer.h"
#include "mojo/public/cpp/bindings/remote.h"
@@ -66,7 +65,6 @@ class SafeArchiveAnalyzer : public chrom
@@ -67,7 +66,6 @@ class SafeArchiveAnalyzer : public chrom
void Timeout();
safe_browsing::ZipAnalyzer zip_analyzer_;

@ -0,0 +1,13 @@
diff -up chromium-122.0.6261.57/tools/json_to_struct/json_to_struct.py.me chromium-122.0.6261.57/tools/json_to_struct/json_to_struct.py
--- chromium-122.0.6261.57/tools/json_to_struct/json_to_struct.py.me 2024-02-23 12:04:45.451423995 +0100
+++ chromium-122.0.6261.57/tools/json_to_struct/json_to_struct.py 2024-02-23 12:18:04.099824392 +0100
@@ -124,7 +124,8 @@ def _GenerateH(basepath, fileroot, head,
f.write(u'#include <cstddef>\n')
f.write(u'\n')
- if system_headers := schema.get(u'system-headers', []):
+ system_headers = schema.get(u'system-headers', [])
+ if system_headers:
for header in system_headers:
f.write(u'#include <%s>\n' % header)
f.write(u'\n')

@ -62,14 +62,6 @@ diff -up chromium-114.0.5735.35/media/gpu/vaapi/BUILD.gn.revert-av1enc chromium-
"h264_vaapi_video_decoder_delegate.cc",
"h264_vaapi_video_decoder_delegate.h",
"h264_vaapi_video_encoder_delegate.cc",
@@ -107,7 +105,6 @@ source_set("vaapi") {
"//media/gpu/chromeos:common",
"//media/parsers",
"//mojo/public/cpp/bindings",
- "//third_party/libaom:libaomrc",
"//third_party/libvpx:libvpxrc",
"//third_party/libyuv",
"//ui/gfx",
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
@ -104,18 +96,3 @@ diff -up chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.h.me chromium-119
// Blits a VASurface |va_surface_src| into another VASurface
// |va_surface_dest| applying pixel format conversion, cropping
diff -up chromium-121.0.6167.57/media/gpu/BUILD.gn.than chromium-121.0.6167.57/media/gpu/BUILD.gn
--- chromium-121.0.6167.57/media/gpu/BUILD.gn.than 2024-01-15 22:09:21.010029147 +0100
+++ chromium-121.0.6167.57/media/gpu/BUILD.gn 2024-01-15 22:10:05.192259340 +0100
@@ -391,10 +391,7 @@ source_set("common") {
"vp9_svc_layers_stateful.h",
]
configs += [ "//third_party/libvpx:libvpx_config" ]
- deps += [
- "//third_party/libaom:libaomrc",
- "//third_party/libvpx:libvpxrc",
- ]
+ deps += [ "//third_party/libvpx:libvpxrc" ]
}
if (use_libgav1_parser) {
sources += [

@ -28,13 +28,13 @@ diff -up chromium-121.0.6167.57/build/config/clang/BUILD.gn.rust-clang_lib chrom
+ _dir = "armhf-redhat-linux-gnu"
+ _suffix = "-armhf"
+ } else if (current_cpu == "ppc64") {
+ _dir = "powerpc64le-redhat-linux-gnu"
+ _suffix = "-powerpc64le"
+ _dir = "ppc64le-redhat-linux-gnu"
+ _suffix = "-ppc64le"
+ } else {
+ assert(false) # Unhandled cpu type
+ }
+ # different clang lib dir in fedora/epel
+ if (clang_version == "17") {
+ if (clang_version == "17" || clang_version == "18") {
+ _suffix = ""
+ } else if (clang_version == "16" || clang_version == "14") {
+ _libprefix = "64"

@ -0,0 +1,32 @@
commit 04866680f4f9a8475ae3795ad6ed59649ba478d7
Author: Jose Dapena Paz <jdapena@igalia.com>
Date: Tue Jan 23 12:04:05 2024 +0000
libstdc++: fix static assertion in NodeUuidEquality
libstdc++ equality checks in static assertion that it is possible to
compare for equality base::Uuid to BookmarkNode*. This was a missing
operator in NodeUuidEquality that this changeset adds.
Bug: 957519
Change-Id: Icc9809cb43d321f0b3e3394ef27ab55672aec5e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5227686
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1250753}
diff --git a/components/bookmarks/browser/uuid_index.h b/components/bookmarks/browser/uuid_index.h
index 77cb1a1a54dd9..639d6fefcd831 100644
--- a/components/bookmarks/browser/uuid_index.h
+++ b/components/bookmarks/browser/uuid_index.h
@@ -23,6 +23,10 @@ class NodeUuidEquality {
bool operator()(const BookmarkNode* n1, const base::Uuid& uuid2) const {
return n1->uuid() == uuid2;
}
+
+ bool operator()(const base::Uuid& uuid1, const BookmarkNode* n2) const {
+ return uuid1 == n2->uuid();
+ }
};
// Used to hash BookmarkNode instances by UUID.

@ -0,0 +1,385 @@
fixed error: missing 'typename' prior to dependent type name
diff -up chromium-122.0.6261.69/base/containers/map_util.h.typename chromium-122.0.6261.69/base/containers/map_util.h
--- chromium-122.0.6261.69/base/containers/map_util.h.typename 2024-02-22 22:42:43.000000000 +0100
+++ chromium-122.0.6261.69/base/containers/map_util.h 2024-02-24 15:05:00.882592705 +0100
@@ -42,7 +42,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);
@@ -58,7 +58,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() ? std::to_address(it->second) : nullptr;
diff -up chromium-122.0.6261.69/base/functional/bind_internal.h.typename chromium-122.0.6261.69/base/functional/bind_internal.h
--- chromium-122.0.6261.69/base/functional/bind_internal.h.typename 2024-02-24 15:05:00.883592724 +0100
+++ chromium-122.0.6261.69/base/functional/bind_internal.h 2024-02-24 15:13:49.755223533 +0100
@@ -1400,11 +1400,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-122.0.6261.69/chrome/browser/download/bubble/download_bubble_update_service.cc.typename chromium-122.0.6261.69/chrome/browser/download/bubble/download_bubble_update_service.cc
--- chromium-122.0.6261.69/chrome/browser/download/bubble/download_bubble_update_service.cc.typename 2024-02-22 22:42:50.000000000 +0100
+++ chromium-122.0.6261.69/chrome/browser/download/bubble/download_bubble_update_service.cc 2024-02-24 15:05:00.882592705 +0100
@@ -90,7 +90,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);
@@ -1090,9 +1090,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-122.0.6261.69/components/optimization_guide/core/model_execution/model_execution_util.h.typename chromium-122.0.6261.69/components/optimization_guide/core/model_execution/model_execution_util.h
--- chromium-122.0.6261.69/components/optimization_guide/core/model_execution/model_execution_util.h.typename 2024-02-22 22:43:01.000000000 +0100
+++ chromium-122.0.6261.69/components/optimization_guide/core/model_execution/model_execution_util.h 2024-02-24 15:05:00.884592742 +0100
@@ -25,7 +25,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-122.0.6261.69/components/optimization_guide/core/model_quality/model_quality_log_entry.h.typename chromium-122.0.6261.69/components/optimization_guide/core/model_quality/model_quality_log_entry.h
--- chromium-122.0.6261.69/components/optimization_guide/core/model_quality/model_quality_log_entry.h.typename 2024-02-22 22:43:01.000000000 +0100
+++ chromium-122.0.6261.69/components/optimization_guide/core/model_quality/model_quality_log_entry.h 2024-02-24 15:05:00.884592742 +0100
@@ -29,7 +29,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-122.0.6261.69/components/optimization_guide/core/tflite_model_executor.h.typename chromium-122.0.6261.69/components/optimization_guide/core/tflite_model_executor.h
--- chromium-122.0.6261.69/components/optimization_guide/core/tflite_model_executor.h.typename 2024-02-22 22:43:01.000000000 +0100
+++ chromium-122.0.6261.69/components/optimization_guide/core/tflite_model_executor.h 2024-02-24 15:05:00.883592724 +0100
@@ -241,7 +241,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_);
@@ -263,7 +263,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<absl::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_);
@@ -421,7 +421,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_);
@@ -438,7 +438,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<absl::optional<OutputType>>* outputs) {
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
@@ -498,7 +498,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-122.0.6261.69/components/supervised_user/core/browser/proto_fetcher.h.typename chromium-122.0.6261.69/components/supervised_user/core/browser/proto_fetcher.h
diff -up chromium-122.0.6261.69/mojo/public/cpp/bindings/array_traits.h.typename chromium-122.0.6261.69/mojo/public/cpp/bindings/array_traits.h
--- chromium-122.0.6261.69/mojo/public/cpp/bindings/array_traits.h.typename 2024-02-22 22:43:15.000000000 +0100
+++ chromium-122.0.6261.69/mojo/public/cpp/bindings/array_traits.h 2024-02-24 15:05:00.884592742 +0100
@@ -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-122.0.6261.69/third_party/blink/renderer/bindings/core/v8/async_iterable.h.typename chromium-122.0.6261.69/third_party/blink/renderer/bindings/core/v8/async_iterable.h
--- chromium-122.0.6261.69/third_party/blink/renderer/bindings/core/v8/async_iterable.h.typename 2024-02-22 22:43:20.000000000 +0100
+++ chromium-122.0.6261.69/third_party/blink/renderer/bindings/core/v8/async_iterable.h 2024-02-24 15:05:00.883592724 +0100
@@ -218,7 +218,7 @@ class PairAsyncIterable {
private:
virtual IterationSource* CreateIterationSource(
ScriptState* script_state,
- IterationSource::Kind kind,
+ typename IterationSource::Kind kind,
ExceptionState& exception_state) = 0;
};
@@ -260,7 +260,7 @@ class ValueAsyncIterable {
private:
virtual IterationSource* CreateIterationSource(
ScriptState* script_state,
- IterationSource::Kind kind,
+ typename IterationSource::Kind kind,
ExceptionState& exception_state) = 0;
};
diff -up chromium-122.0.6261.69/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.typename chromium-122.0.6261.69/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc
--- chromium-122.0.6261.69/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.typename 2024-02-24 15:05:00.882592705 +0100
+++ chromium-122.0.6261.69/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc 2024-02-24 15:12:27.742724849 +0100
@@ -211,7 +211,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-122.0.6261.69/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h.typename chromium-122.0.6261.69/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h
--- chromium-122.0.6261.69/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h.typename 2024-02-22 22:43:21.000000000 +0100
+++ chromium-122.0.6261.69/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h 2024-02-24 15:05:00.883592724 +0100
@@ -272,8 +272,8 @@ class CORE_EXPORT ObjectPaintPropertiesS
NodeList& nodes,
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-122.0.6261.69/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.h.me chromium-122.0.6261.69/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.h
--- chromium-122.0.6261.69/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.h.me 2024-02-24 16:51:41.292310554 +0100
+++ chromium-122.0.6261.69/base/allocator/partition_allocator/src/partition_alloc/internal_allocator.h 2024-02-24 16:52:10.022896063 +0100
@@ -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-122.0.6261.69/base/functional/function_ref.h.me chromium-122.0.6261.69/base/functional/function_ref.h
--- chromium-122.0.6261.69/base/functional/function_ref.h.me 2024-02-24 17:59:35.119582549 +0100
+++ chromium-122.0.6261.69/base/functional/function_ref.h 2024-02-24 18:00:27.107938399 +0100
@@ -64,7 +64,7 @@ class FunctionRef;
template <typename R, typename... Args>
class FunctionRef<R(Args...)> {
template <typename Functor,
- typename RunType = internal::MakeFunctorTraits<Functor>::RunType>
+ typename RunType = typename internal::MakeFunctorTraits<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-122.0.6261.69/base/containers/heap_array.h.me chromium-122.0.6261.69/base/containers/heap_array.h
--- chromium-122.0.6261.69/base/containers/heap_array.h.me 2024-02-24 18:02:34.463921568 +0100
+++ chromium-122.0.6261.69/base/containers/heap_array.h 2024-02-24 18:04:01.922850571 +0100
@@ -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-122.0.6261.69/mojo/public/cpp/bindings/type_converter.h.me chromium-122.0.6261.69/mojo/public/cpp/bindings/type_converter.h
--- chromium-122.0.6261.69/mojo/public/cpp/bindings/type_converter.h.me 2024-02-24 18:51:06.957087464 +0100
+++ chromium-122.0.6261.69/mojo/public/cpp/bindings/type_converter.h 2024-02-24 18:51:27.778488490 +0100
@@ -125,7 +125,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-122.0.6261.69/third_party/blink/renderer/platform/wtf/hash_table.h.me chromium-122.0.6261.69/third_party/blink/renderer/platform/wtf/hash_table.h
--- chromium-122.0.6261.69/third_party/blink/renderer/platform/wtf/hash_table.h.me 2024-02-24 19:45:13.620934215 +0100
+++ chromium-122.0.6261.69/third_party/blink/renderer/platform/wtf/hash_table.h 2024-02-24 19:46:08.817940962 +0100
@@ -2005,7 +2005,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&;
@@ -2057,7 +2057,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&;
@@ -2111,7 +2111,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&;
@@ -2159,7 +2159,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-122.0.6261.69/base/types/fixed_array.h.me chromium-122.0.6261.69/base/types/fixed_array.h
--- chromium-122.0.6261.69/base/types/fixed_array.h.me 2024-02-25 11:22:59.819590529 +0100
+++ chromium-122.0.6261.69/base/types/fixed_array.h 2024-02-25 11:24:12.424953031 +0100
@@ -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-122.0.6261.69/chrome/browser/web_applications/commands/internal/command_internal.h.me chromium-122.0.6261.69/chrome/browser/web_applications/commands/internal/command_internal.h
--- chromium-122.0.6261.69/chrome/browser/web_applications/commands/internal/command_internal.h.me 2024-02-25 15:04:56.775897713 +0100
+++ chromium-122.0.6261.69/chrome/browser/web_applications/commands/internal/command_internal.h 2024-02-25 15:05:34.884579279 +0100
@@ -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-122.0.6261.69/chrome/browser/web_applications/commands/web_app_command.h.me chromium-122.0.6261.69/chrome/browser/web_applications/commands/web_app_command.h
--- chromium-122.0.6261.69/chrome/browser/web_applications/commands/web_app_command.h.me 2024-02-25 15:05:46.885793828 +0100
+++ chromium-122.0.6261.69/chrome/browser/web_applications/commands/web_app_command.h 2024-02-25 15:06:12.334248725 +0100
@@ -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-122.0.6261.69/chrome/browser/web_applications/web_app_command_scheduler.h.me chromium-122.0.6261.69/chrome/browser/web_applications/web_app_command_scheduler.h
--- chromium-122.0.6261.69/chrome/browser/web_applications/web_app_command_scheduler.h.me 2024-02-25 15:06:17.896348149 +0100
+++ chromium-122.0.6261.69/chrome/browser/web_applications/web_app_command_scheduler.h 2024-02-25 15:06:58.841076746 +0100
@@ -355,7 +355,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) {
@@ -373,7 +373,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-122.0.6261.69/components/supervised_user/core/browser/proto_fetcher.h.me chromium-122.0.6261.69/components/supervised_user/core/browser/proto_fetcher.h
--- chromium-122.0.6261.69/components/supervised_user/core/browser/proto_fetcher.h.me 2024-02-25 15:12:53.835409392 +0100
+++ chromium-122.0.6261.69/components/supervised_user/core/browser/proto_fetcher.h 2024-02-25 15:16:03.171931033 +0100
@@ -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(

@ -0,0 +1,44 @@
commit 5517d167c083885847a08a83b96da03b1eb2bc3e
Author: Jose Dapena Paz <jdapena@igalia.com>
Date: Tue Jan 23 15:34:35 2024 +0000
libstdc++: do not require including unique_ptr in header
Including std::unique_ptr declaration initial value requires
declaration of contained type.
Bug: 957519
Change-Id: If9b0362b6cea48a395041faa82f83b6f48b98403
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5225137
Reviewed-by: Caroline Rising <corising@chromium.org>
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1250826}
diff --git a/chrome/browser/ui/views/toolbar/toolbar_view.h b/chrome/browser/ui/views/toolbar/toolbar_view.h
index ec3e34a86f4c5..32ca27b6d126b 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_view.h
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.h
@@ -311,8 +311,7 @@ class ToolbarView : public views::AccessiblePaneView,
AppMenuIconController app_menu_icon_controller_;
std::unique_ptr<ChromeLabsModel> chrome_labs_model_;
- std::unique_ptr<ExtensionsToolbarCoordinator>
- extensions_toolbar_coordinator_ = nullptr;
+ std::unique_ptr<ExtensionsToolbarCoordinator> extensions_toolbar_coordinator_;
// Controls whether or not a home button should be shown on the toolbar.
BooleanPrefMember show_home_button_;
diff --git a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_toolbar_button_container.h b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_toolbar_button_container.h
index 3046c543c7c8e..46ff5d40ffad3 100644
--- a/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_toolbar_button_container.h
+++ b/chrome/browser/ui/views/web_apps/frame_toolbar/web_app_toolbar_button_container.h
@@ -150,8 +150,7 @@ class WebAppToolbarButtonContainer : public views::View,
std::unique_ptr<PageActionIconController> page_action_icon_controller_;
int page_action_insertion_point_ = 0;
- std::unique_ptr<ExtensionsToolbarCoordinator>
- extensions_toolbar_coordinator_ = nullptr;
+ std::unique_ptr<ExtensionsToolbarCoordinator> extensions_toolbar_coordinator_;
// All remaining members are owned by the views hierarchy.
raw_ptr<WebAppOriginText> web_app_origin_text_ = nullptr;

@ -51,3 +51,29 @@ diff -up chromium-121.0.6167.16/third_party/blink/renderer/core/layout/grid/grid
const auto* cached_layout_subtree = constraint_space.GetGridLayoutSubtree();
const auto container_writing_direction =
constraint_space.GetWritingDirection();
diff -up chromium-122.0.6261.69/content/common/service_worker/race_network_request_url_loader_client.cc.me chromium-122.0.6261.69/content/common/service_worker/race_network_request_url_loader_client.cc
--- chromium-122.0.6261.69/content/common/service_worker/race_network_request_url_loader_client.cc.me 2024-02-25 10:07:28.312646853 +0100
+++ chromium-122.0.6261.69/content/common/service_worker/race_network_request_url_loader_client.cc 2024-02-25 10:11:07.018481980 +0100
@@ -416,7 +416,8 @@ void ServiceWorkerRaceNetworkRequestURLL
}
uint32_t num_bytes_to_consume = 0;
- auto [result, read_buffer] = BeginReadData();
+ auto [r, read_buffer] = BeginReadData();
+ auto result = r;
TRACE_EVENT_WITH_FLOW2(
"ServiceWorker",
"ServiceWorkerRaceNetworkRequestURLLoaderClient::ReadAndWrite",
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),

@ -1,222 +0,0 @@
[Desktop Entry]
Version=1.0
Name=Chromium Gost Web Browser
Name[ru]=Веб-браузер Chromium Gost
# Only KDE 4 seems to use GenericName, so we reuse the KDE strings.
# From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413.
GenericName=Web Browser
GenericName[ar]=متصفح الشبكة
GenericName[bg]=Уеб браузър
GenericName[ca]=Navegador web
GenericName[cs]=WWW prohlížeč
GenericName[da]=Browser
GenericName[de]=Web-Browser
GenericName[el]=Περιηγητής ιστού
GenericName[en_GB]=Web Browser
GenericName[es]=Navegador web
GenericName[et]=Veebibrauser
GenericName[fi]=WWW-selain
GenericName[fr]=Navigateur Web
GenericName[gu]=વેબ બ્રાઉઝર
GenericName[he]=דפדפן אינטרנט
GenericName[hi]=वेब ब्राउज़र
GenericName[hu]=Webböngésző
GenericName[it]=Browser Web
GenericName[ja]=ウェブブラウザ
GenericName[kn]=ಜಾಲ ವೀಕ್ಷಕ
GenericName[ko]=웹 브라우저
GenericName[lt]=Žiniatinklio naršyklė
GenericName[lv]=Tīmekļa pārlūks
GenericName[ml]=വെബ് ബ്രൌസര്‍
GenericName[mr]=वेब ब्राऊजर
GenericName[nb]=Nettleser
GenericName[nl]=Webbrowser
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador da Internet
GenericName[ro]=Navigator de Internet
GenericName[ru]=Веб-браузер
GenericName[sl]=Spletni brskalnik
GenericName[sv]=Webbläsare
GenericName[ta]=இணைய உலாவி
GenericName[th]=เว็บเบราว์เซอร์
GenericName[tr]=Web Tarayıcı
GenericName[uk]=Навігатор Тенет
GenericName[zh_CN]=网页浏览器
GenericName[zh_HK]=網頁瀏覽器
GenericName[zh_TW]=網頁瀏覽器
# Not translated in KDE, from Epiphany 2.26.1-0ubuntu1.
GenericName[bn]=ওয়েব ব্রাউজার
GenericName[fil]=Web Browser
GenericName[hr]=Web preglednik
GenericName[id]=Browser Web
GenericName[or]=ଓ୍ବେବ ବ୍ରାଉଜର
GenericName[sk]=WWW prehliadač
GenericName[sr]=Интернет прегледник
GenericName[te]=మహాతల అన్వేషి
GenericName[vi]=Bộ duyệt Web
# Gnome and KDE 3 uses Comment.
Comment=Access the Internet
Comment[ar]=الدخول إلى الإنترنت
Comment[bg]=Достъп до интернет
Comment[bn]=ইন্টারনেটটি অ্যাক্সেস করুন
Comment[ca]=Accedeix a Internet
Comment[cs]=Přístup k internetu
Comment[da]=Få adgang til internettet
Comment[de]=Internetzugriff
Comment[el]=Πρόσβαση στο Διαδίκτυο
Comment[en_GB]=Access the Internet
Comment[es]=Accede a Internet.
Comment[et]=Pääs Internetti
Comment[fi]=Käytä internetiä
Comment[fil]=I-access ang Internet
Comment[fr]=Accéder à Internet
Comment[gu]=ઇંટરનેટ ઍક્સેસ કરો
Comment[he]=גישה אל האינטרנט
Comment[hi]=इंटरनेट तक पहुंच स्थापित करें
Comment[hr]=Pristup Internetu
Comment[hu]=Internetelérés
Comment[id]=Akses Internet
Comment[it]=Accesso a Internet
Comment[ja]=インターネットにアクセス
Comment[kn]=ಇಂಟರ್ನೆಟ್ ಅನ್ನು ಪ್ರವೇಶಿಸಿ
Comment[ko]=인터넷 연결
Comment[lt]=Interneto prieiga
Comment[lv]=Piekļūt internetam
Comment[ml]=ഇന്റര്‍‌നെറ്റ് ആക്‌സസ് ചെയ്യുക
Comment[mr]=इंटरनेटमध्ये प्रवेश करा
Comment[nb]=Gå til Internett
Comment[nl]=Verbinding maken met internet
Comment[or]=ଇଣ୍ଟର୍ନେଟ୍ ପ୍ରବେଶ କରନ୍ତୁ
Comment[pl]=Skorzystaj z internetu
Comment[pt]=Aceder à Internet
Comment[pt_BR]=Acessar a internet
Comment[ro]=Accesaţi Internetul
Comment[ru]=Доступ в Интернет
Comment[sk]=Prístup do siete Internet
Comment[sl]=Dostop do interneta
Comment[sr]=Приступите Интернету
Comment[sv]=Gå ut på Internet
Comment[ta]=இணையத்தை அணுகுதல்
Comment[te]=ఇంటర్నెట్‌ను ఆక్సెస్ చెయ్యండి
Comment[th]=เข้าถึงอินเทอร์เน็ต
Comment[tr]=İnternet'e erişin
Comment[uk]=Доступ до Інтернету
Comment[vi]=Truy cập Internet
Comment[zh_CN]=访问互联网
Comment[zh_HK]=連線到網際網路
Comment[zh_TW]=連線到網際網路
Exec=/usr/bin/chromium-browser-gost %U
StartupNotify=true
Terminal=false
Icon=chromium-browser-gost
Type=Application
Categories=Network;WebBrowser;
MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https;
Actions=new-window;new-private-window;
[Desktop Action new-window]
Name=New Window
Name[am]=አዲስ መስኮት
Name[ar]=نافذة جديدة
Name[bg]=Нов прозорец
Name[bn]=নতুন উইন্ডো
Name[ca]=Finestra nova
Name[cs]=Nové okno
Name[da]=Nyt vindue
Name[de]=Neues Fenster
Name[el]=Νέο Παράθυρο
Name[en_GB]=New Window
Name[es]=Nueva ventana
Name[et]=Uus aken
Name[fa]=پنجره جدید
Name[fi]=Uusi ikkuna
Name[fil]=New Window
Name[fr]=Nouvelle fenêtre
Name[gu]=નવી વિંડો
Name[hi]=नई विंडो
Name[hr]=Novi prozor
Name[hu]=Új ablak
Name[id]=Jendela Baru
Name[it]=Nuova finestra
Name[iw]=חלון חדש
Name[ja]=新規ウインドウ
Name[kn]=ಹೊಸ ವಿಂಡೊ
Name[ko]=새 창
Name[lt]=Naujas langas
Name[lv]=Jauns logs
Name[ml]=പുതിയ വിന്‍ഡോ
Name[mr]=नवीन विंडो
Name[nl]=Nieuw venster
Name[no]=Nytt vindu
Name[pl]=Nowe okno
Name[pt]=Nova janela
Name[pt_BR]=Nova janela
Name[ro]=Fereastră nouă
Name[ru]=Новое окно
Name[sk]=Nové okno
Name[sl]=Novo okno
Name[sr]=Нови прозор
Name[sv]=Nytt fönster
Name[sw]=Dirisha Jipya
Name[ta]=புதிய சாளரம்
Name[te]=క్రొత్త విండో
Name[th]=หน้าต่างใหม่
Name[tr]=Yeni Pencere
Name[uk]=Нове вікно
Name[vi]=Cửa sổ Mới
Name[zh_CN]=新建窗口
Name[zh_TW]=開新視窗
Exec=/usr/bin/chromium-browser-gost
[Desktop Action new-private-window]
Name=New Incognito Window
Name[ar]=نافذة جديدة للتصفح المتخفي
Name[bg]=Нов прозорец „инкогнито“
Name[bn]=নতুন ছদ্মবেশী উইন্ডো
Name[ca]=Finestra d'incògnit nova
Name[cs]=Nové anonymní okno
Name[da]=Nyt inkognitovindue
Name[de]=Neues Inkognito-Fenster
Name[el]=Νέο παράθυρο για ανώνυμη περιήγηση
Name[en_GB]=New Incognito window
Name[es]=Nueva ventana de incógnito
Name[et]=Uus inkognito aken
Name[fa]=پنجره جدید حالت ناشناس
Name[fi]=Uusi incognito-ikkuna
Name[fil]=Bagong Incognito window
Name[fr]=Nouvelle fenêtre de navigation privée
Name[gu]=નવી છુપી વિંડો
Name[hi]=नई गुप्त विंडो
Name[hr]=Novi anoniman prozor
Name[hu]=Új Inkognitóablak
Name[id]=Jendela Penyamaran baru
Name[it]=Nuova finestra di navigazione in incognito
Name[iw]=חלון חדש לגלישה בסתר
Name[ja]=新しいシークレット ウィンドウ
Name[kn]=ಹೊಸ ಅಜ್ಞಾತ ವಿಂಡೋ
Name[ko]=새 시크릿 창
Name[lt]=Naujas inkognito langas
Name[lv]=Jauns inkognito režīma logs
Name[ml]=പുതിയ വേഷ പ്രച്ഛന്ന വിന്‍ഡോ
Name[mr]=नवीन गुप्त विंडो
Name[nl]=Nieuw incognitovenster
Name[no]=Nytt inkognitovindu
Name[pl]=Nowe okno incognito
Name[pt]=Nova janela de navegação anónima
Name[pt_BR]=Nova janela anônima
Name[ro]=Fereastră nouă incognito
Name[ru]=Новое окно в режиме инкогнито
Name[sk]=Nové okno inkognito
Name[sl]=Novo okno brez beleženja zgodovine
Name[sr]=Нови прозор за прегледање без архивирања
Name[sv]=Nytt inkognitofönster
Name[ta]=புதிய மறைநிலைச் சாளரம்
Name[te]=క్రొత్త అజ్ఞాత విండో
Name[th]=หน้าต่างใหม่ที่ไม่ระบุตัวตน
Name[tr]=Yeni Gizli pencere
Name[uk]=Нове вікно в режимі анонімного перегляду
Name[vi]=Cửa sổ ẩn danh mới
Name[zh_CN]=新建隐身窗口
Name[zh_TW]=新增無痕式視窗
Exec=/usr/bin/chromium-browser-gost --incognito

@ -87,9 +87,6 @@ header_files=" libavcodec/x86/inline_asm.h \
libavcodec/dv.h \
libavcodec/error_resilience.h \
libavcodec/fdctdsp.h \
libavcodec/fft.h \
libavcodec/fft-internal.h \
libavcodec/fft_table.h \
libavcodec/flac.h \
libavcodec/flacdsp.h \
libavcodec/flac_parse.h \
@ -100,6 +97,7 @@ header_files=" libavcodec/x86/inline_asm.h \
libavcodec/hevc.h \
libavcodec/hpeldsp.h \
libavcodec/hwaccels.h \
libavcodec/hwaccel_internal.h \
libavcodec/hwconfig.h \
libavcodec/idctdsp.h \
libavcodec/internal.h \
@ -181,7 +179,7 @@ header_files=" libavcodec/x86/inline_asm.h \
libavutil/x86/asm.h \
libavutil/x86/bswap.h \
libavutil/x86/cpu.h \
libavutil/x86/emms.h
libavutil/emms.h \
libavutil/x86/intreadwrite.h \
libavutil/x86/intmath.h
libavutil/x86/timer.h \
@ -223,10 +221,8 @@ header_files=" libavcodec/x86/inline_asm.h \
compat/va_copy.h \
compat/atomics/gcc/stdatomic.h "
manual_files=" libavcodec/aarch64/fft_neon.S \
libavcodec/aarch64/h264pred_neon.S \
manual_files=" libavcodec/aarch64/h264pred_neon.S \
libavcodec/aarch64/hpeldsp_neon.S \
libavcodec/aarch64/mdct_neon.S \
libavcodec/aarch64/neon.S \
libavcodec/aarch64/vorbisdsp_neon.S \
libavcodec/aarch64/vorbisdsp_init.c \
@ -240,7 +236,6 @@ manual_files=" libavcodec/aarch64/fft_neon.S \
libavcodec/x86/vp3dsp.asm \
libavcodec/x86/vp8dsp.asm \
libavcodec/bit_depth_template.c \
libavcodec/fft_template.c \
libavcodec/flacdec.c \
libavcodec/flacdsp.c \
libavcodec/flacdsp_template.c \
@ -248,7 +243,6 @@ manual_files=" libavcodec/aarch64/fft_neon.S \
libavcodec/h264pred_template.c \
libavcodec/hpel_template.c \
libavcodec/hpeldsp.c \
libavcodec/mdct_template.c \
libavcodec/options.c \
libavcodec/pcm.c \
libavcodec/pel_template.c \
@ -301,7 +295,6 @@ mp3_files=" libavcodec/aarch64/aacpsdsp_init_aarch64.c \
libavcodec/autorename_libavcodec_mpegaudiodsp.c \
libavcodec/autorename_libavcodec_sbrdsp.c \
libavcodec/cbrt_data.c \
libavcodec/dct.c \
libavcodec/dct32_fixed.c \
libavcodec/dct32_float.c \
libavcodec/dct32_template.c \
@ -319,7 +312,6 @@ mp3_files=" libavcodec/aarch64/aacpsdsp_init_aarch64.c \
libavcodec/sbrdsp.c \
libavcodec/sbrdsp_template.c \
libavcodec/sinewin.c \
libavcodec/x86/dct_init.c \
libavcodec/x86/dct32.asm \
libavcodec/x86/imdct36.asm \
libavcodec/x86/mpegaudiodsp.c \

@ -0,0 +1,19 @@
Index: chromium-120.0.6099.71/third_party/dawn/src/dawn/common/Platform.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/dawn/src/dawn/common/Platform.h
+++ chromium-120.0.6099.71/third_party/dawn/src/dawn/common/Platform.h
@@ -158,10 +158,12 @@
#elif defined(__s390x__)
#define DAWN_PLATFORM_IS_S390X 1
-#elif defined(__PPC__)
-#define DAWN_PLATFORM_IS_PPC 1
+// Order matters here
+// PPC64 also defines PPC, which can lead to detection failures on ppc64le systems
#elif defined(__PPC64__)
#define DAWN_PLATFORM_IS_PPC64 1
+#elif defined(__PPC__)
+#define DAWN_PLATFORM_IS_PPC 1
#else
#error "Unsupported platform."

@ -0,0 +1,32 @@
Index: chromium-120.0.6099.71/third_party/dawn/src/dawn/common/Platform.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/dawn/src/dawn/common/Platform.h
+++ chromium-120.0.6099.71/third_party/dawn/src/dawn/common/Platform.h
@@ -153,9 +153,9 @@
#define DAWN_PLATFORM_IS_MIPS64 1
#endif
-#elif defiend(__s390__)
+#elif defined(__s390__)
#define DAWN_PLATFORM_IS_S390 1
-#elif defiend(__s390x__)
+#elif defined(__s390x__)
#define DAWN_PLATFORM_IS_S390X 1
#elif defined(__PPC__)
Index: chromium-120.0.6099.71/third_party/dawn/src/dawn/common/Assert.cpp
===================================================================
--- chromium-120.0.6099.71.orig/third_party/dawn/src/dawn/common/Assert.cpp
+++ chromium-120.0.6099.71/third_party/dawn/src/dawn/common/Assert.cpp
@@ -52,9 +52,9 @@ void BreakPoint() {
__asm__ __volatile__("ebreak");
#elif DAWN_PLATFORM_IS(MIPS)
__asm__ __volatile__("break");
-#elif DAWN_PLATFORM_IS(S390) || DAWN_PLATFORM_IS_(S390X)
+#elif DAWN_PLATFORM_IS(S390) || DAWN_PLATFORM_IS(S390X)
__asm__ __volatile__(".word 0x0001");
-#elif DAWN_PLATFORM_IS(PPC) || DAWN_PLATFORM_IS_(PPC64)
+#elif DAWN_PLATFORM_IS(PPC) || DAWN_PLATFORM_IS(PPC64)
__asm__ __volatile__("twge 2,2");
#else
#error "Unsupported platform"

@ -0,0 +1,29 @@
Index: chromium-120.0.6099.71/third_party/breakpad/BUILD.gn
===================================================================
--- chromium-120.0.6099.71.orig/third_party/breakpad/BUILD.gn
+++ chromium-120.0.6099.71/third_party/breakpad/BUILD.gn
@@ -618,7 +618,6 @@ if (is_linux || is_chromeos || is_androi
"breakpad/src/client/minidump_file_writer.h",
"breakpad/src/common/convert_UTF.cc",
"breakpad/src/common/convert_UTF.h",
- "breakpad/src/common/linux/breakpad_getcontext.S",
"breakpad/src/common/linux/elf_core_dump.cc",
"breakpad/src/common/linux/elf_core_dump.h",
"breakpad/src/common/linux/elfutils.cc",
@@ -650,6 +649,8 @@ if (is_linux || is_chromeos || is_androi
configs += [ "//build/config/compiler:no_chromium_code" ]
public_configs = [ ":client_config" ]
+ defines = [ "HAVE_GETCONTEXT" ]
+
if (current_cpu == "arm" && is_chromeos_ash) {
# Avoid running out of registers in
# linux_syscall_support.h:sys_clone()'s inline assembly.
@@ -707,7 +708,6 @@ if (is_linux || is_chromeos || is_androi
"breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc",
"breakpad/src/client/linux/minidump_writer/minidump_writer_unittest_utils.cc",
"breakpad/src/client/linux/minidump_writer/proc_cpuinfo_reader_unittest.cc",
- "breakpad/src/common/linux/breakpad_getcontext_unittest.cc",
"breakpad/src/common/linux/elf_core_dump_unittest.cc",
"breakpad/src/common/linux/file_id_unittest.cc",
"breakpad/src/common/linux/linux_libc_support_unittest.cc",

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

Loading…
Cancel
Save