- update to 127.0.6533.72

* CVE-2024-6988: Use after free in Downloads
    * CVE-2024-6989: Use after free in Loader
    * CVE-2024-6991: Use after free in Dawn
    * CVE-2024-6992: Out of bounds memory access in ANGLE
    * CVE-2024-6993: Inappropriate implementation in Canvas
    * CVE-2024-6994: Heap buffer overflow in Layout
    * CVE-2024-6995: Inappropriate implementation in Fullscreen
    * CVE-2024-6996: Race in Frames
    * CVE-2024-6997: Use after free in Tabs
    * CVE-2024-6998: Use after free in User Education
    * CVE-2024-6999: Inappropriate implementation in FedCM
    * CVE-2024-7000: Use after free in CSS. Reported by Anonymous
    * CVE-2024-7001: Inappropriate implementation in HTML
    * CVE-2024-7003: Inappropriate implementation in FedCM
    * CVE-2024-7004: Insufficient validation of untrusted input in Safe Browsing
    * CVE-2024-7005: Insufficient validation of untrusted input in Safe
- fix condition for is_cfi/use_thin_lto on aarch64/ppc64le
- update powerpc patches
i9e changed/i9e/chromium-127.0.6533.72-1.el9.inferit
Arkady L. Shane 4 months ago
parent 16e0e65575
commit c0a4345e58
Signed by: tigro
GPG Key ID: 1EC08A25C9DB2503

@ -1,4 +1,4 @@
2ddb48a7a9ac3d7bd5a4096c0d29f71ccba563b2 SOURCES/chromium-126.0.6478.182.tar.xz
ffbc2f978b302589cefc1bd668e4e6ec156b246f SOURCES/chromium-127.0.6533.72.tar.xz
dea187019741602d57aaf189a80abba261fbd2aa SOURCES/linux-x64-0.19.2.tgz
7e5d2c7864c5c83ec789b59c77cd9c20d2594916 SOURCES/linux-arm64-0.19.2.tgz
769196d081c6a0ad37f1c63dec56febfff3370de SOURCES/node-v20.6.1-linux-x64.tar.xz
@ -6,3 +6,4 @@ dea187019741602d57aaf189a80abba261fbd2aa SOURCES/linux-x64-0.19.2.tgz
8e9bc55cce3899627b2810ecfe87116c5a9147b5 SOURCES/chromium-browser-gost-icons.tar.xz
a2a9663fa5c46439dafbc1b0f23825b2a8c68acf SOURCES/msspi-2e626e5a5605cc4c03fa4bfc0145e459864e897a.tar.xz
6fa9320397a6393a77152807c6de0306837dcc5f SOURCES/Chromium-Gost-39c440395462a753a3f064f7e28fdc2bc3173bf2.tar.xz
4543172087b8a3971b37ddaa4cf1fc91a575bfae SOURCES/Chromium-Gost-3224c62bcc360b80de98da20358cbbe16d773c10.tar.xz

4
.gitignore vendored

@ -1,8 +1,8 @@
SOURCES/chromium-126.0.6478.182.tar.xz
SOURCES/chromium-127.0.6533.72.tar.xz
SOURCES/linux-x64-0.19.2.tgz
SOURCES/linux-arm64-0.19.2.tgz
SOURCES/node-v20.6.1-linux-x64.tar.xz
SOURCES/node-v20.6.1-linux-arm64.tar.xz
SOURCES/chromium-browser-gost-icons.tar.xz
SOURCES/msspi-2e626e5a5605cc4c03fa4bfc0145e459864e897a.tar.xz
SOURCES/Chromium-Gost-39c440395462a753a3f064f7e28fdc2bc3173bf2.tar.xz
SOURCES/Chromium-Gost-3224c62bcc360b80de98da20358cbbe16d773c10.tar.xz

@ -1,6 +1,6 @@
From f823aa91e0a714774a2ca18ccb402078c7336929 Mon Sep 17 00:00:00 2001
From d3529c6a229e229a13e942540ab7d53cbc485cc6 Mon Sep 17 00:00:00 2001
From: tigro <tigro@msvsphere-os.ru>
Date: Sun, 16 Jun 2024 15:49:58 +0300
Date: Thu, 25 Jul 2024 18:22:15 +0300
Subject: [PATCH] Added Yandex search bar as default on newtab and new-tab-page
---
@ -24,15 +24,15 @@ Subject: [PATCH] Added Yandex search bar as default on newtab and new-tab-page
.../search_engines/prepopulated_engines.json | 11 ++++++-----
.../search_engine_countries-inc.cc | 9 +++++----
.../search_engines/template_url_data_util.cc | 6 +++++-
.../template_url_prepopulate_data.cc | 15 +++++++++------
.../template_url_prepopulate_data.cc | 9 ++++++++-
.../cr_components/searchbox/realbox.html | 7 +++++++
22 files changed, 103 insertions(+), 35 deletions(-)
22 files changed, 102 insertions(+), 30 deletions(-)
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index b54ec8a465..4043570c4b 100644
index 3a9f1ea3d2..ae7b29fe19 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -7708,10 +7708,8 @@ Keep your key file in a safe place. You will need it to create new versions of y
@@ -7733,10 +7733,8 @@ 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_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.">
@ -44,10 +44,10 @@ index b54ec8a465..4043570c4b 100644
<message name="IDS_GOOGLE_SEARCH_BOX_EMPTY_HINT_MULTIMODAL" desc="The text displayed in the multimodal searchbox when it is empty. It is meant to invite the user to add a text query to the existing image query in order to issue a 'multimodal' (image + text) query.">
Add to your search
diff --git a/chrome/app/resources/generated_resources_be.xtb b/chrome/app/resources/generated_resources_be.xtb
index e6f66c5fdd..f1d9597fef 100644
index b0de6288a7..08a8252694 100644
--- a/chrome/app/resources/generated_resources_be.xtb
+++ b/chrome/app/resources/generated_resources_be.xtb
@@ -9407,7 +9407,7 @@
@@ -9507,7 +9507,7 @@
<translation id="8048728378294435881">Стварайце рэзервовыя копіі сваіх даных, каб іх можна было выкарыстоўваць на іншых прыладах</translation>
<translation id="8048977114738515028">Стварыце ярлык на працоўным стале прылады, каб мець прамы доступ да гэтага профілю</translation>
<translation id="8049029041626250638">Падключыце клавіятуру або мыш. Калі вы выкарыстоўваеце прылады з Bluetooth, упэўніцеся, што яны гатовыя да спалучэння.</translation>
@ -57,10 +57,10 @@ index e6f66c5fdd..f1d9597fef 100644
<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 16706b18e5..bae533b582 100644
index 9e06a084c2..e87dd7bf09 100644
--- a/chrome/app/resources/generated_resources_en-GB.xtb
+++ b/chrome/app/resources/generated_resources_en-GB.xtb
@@ -9421,7 +9421,7 @@ Keep your key file in a safe place. You will need it to create new versions of y
@@ -9518,7 +9518,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>
@ -70,10 +70,10 @@ index 16706b18e5..bae533b582 100644
<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 a048aeac98..561eb8746d 100644
index dd0110ed61..fe6b05c22d 100644
--- a/chrome/app/resources/generated_resources_ru.xtb
+++ b/chrome/app/resources/generated_resources_ru.xtb
@@ -9412,7 +9412,7 @@
@@ -9512,7 +9512,7 @@
<translation id="8048728378294435881">Создайте резервную копию данных и используйте их на любом устройстве.</translation>
<translation id="8048977114738515028">Чтобы быстро переключаться на этот профиль, создайте ярлык на рабочем столе</translation>
<translation id="8049029041626250638">Подключите мышь или клавиатуру. Если вы используете устройства Bluetooth, убедитесь, что они готовы к подключению.</translation>
@ -83,10 +83,10 @@ index a048aeac98..561eb8746d 100644
<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 fa169a612c..90305e3675 100644
index 369b16c102..2873728092 100644
--- a/chrome/app/resources/generated_resources_uk.xtb
+++ b/chrome/app/resources/generated_resources_uk.xtb
@@ -9426,7 +9426,7 @@
@@ -9522,7 +9522,7 @@
<translation id="8048728378294435881">Створюйте резервні копії даних і використовуйте їх на будь-якому пристрої</translation>
<translation id="8048977114738515028">Створити ярлик на робочому столі, щоб відразу переходити до цього профілю</translation>
<translation id="8049029041626250638">Підключіть клавіатуру або мишу. Якщо ви користуєтеся пристроями з Bluetooth, переконайтеся, що вони готові до підключення.</translation>
@ -315,10 +315,10 @@ index c7ae65114f..5859d72731 100644
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 41036ffb07..2b0b90b553 100644
index 552058b069..34ebdde320 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 @@
@@ -37,6 +37,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"
@ -326,7 +326,7 @@ index 41036ffb07..2b0b90b553 100644
#include "chrome/browser/signin/identity_manager_factory.h"
#include "chrome/browser/sync/sync_service_factory.h"
#include "chrome/browser/themes/theme_service_factory.h"
@@ -661,6 +662,10 @@ content::WebUIDataSource* CreateAndAddNewTabPageUiHtmlSource(Profile* profile) {
@@ -679,6 +680,10 @@ content::WebUIDataSource* CreateAndAddNewTabPageUiHtmlSource(Profile* profile) {
base::FeatureList::IsEnabled(
ntp_features::kNtpChromeCartInHistoryClusterModule));
@ -379,10 +379,10 @@ index 98572faa77..cfb6727848 100644
#endif // COMPONENTS_SEARCH_SEARCH_H_
diff --git a/components/search_engines/keyword_table.cc b/components/search_engines/keyword_table.cc
index 35a2bce59e..a7207635cb 100644
index d4f6038697..b493d4c587 100644
--- a/components/search_engines/keyword_table.cc
+++ b/components/search_engines/keyword_table.cc
@@ -172,7 +172,9 @@ void BindURLToStatement(const TemplateURLData& data,
@@ -173,7 +173,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);
@ -392,7 +392,7 @@ index 35a2bce59e..a7207635cb 100644
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));
@@ -544,7 +546,9 @@ bool KeywordTable::GetKeywordDataFromStatement(sql::Statement& s,
@@ -543,7 +545,9 @@ bool KeywordTable::GetKeywordDataFromStatement(sql::Statement& s,
data->SetURL(s.ColumnString(4));
data->suggestions_url = s.ColumnString(10);
data->image_url = s.ColumnString(16);
@ -403,7 +403,7 @@ index 35a2bce59e..a7207635cb 100644
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 91539be7a0..63b30e6c92 100644
index cdb763081d..d4b06432f2 100644
--- a/components/search_engines/prepopulated_engines.json
+++ b/components/search_engines/prepopulated_engines.json
@@ -665,7 +665,7 @@
@ -552,33 +552,34 @@ index 6f85515188..7791bf8113 100644
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 39e72f6be1..82e64ffb6f 100644
index 3a7798c2d1..60959c3e24 100644
--- a/components/search_engines/template_url_prepopulate_data.cc
+++ b/components/search_engines/template_url_prepopulate_data.cc
@@ -237,12 +237,15 @@ std::vector<std::unique_ptr<TemplateURLData>> GetPrepopulatedEngines(
search_engines::RecordIsDefaultProviderAddedToChoices(inserted_default);
}
}
- 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;
@@ -81,6 +81,13 @@ GetPrepopulatedEnginesForEeaRegionCountries(int country_id,
std::shuffle(t_urls.begin(), t_urls.end(), generator);
CHECK_LE(t_urls.size(), kMaxEeaPrepopulatedEngines);
+
+ 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;
}
@@ -325,7 +332,7 @@ std::unique_ptr<TemplateURLData> GetPrepopulatedFallbackSearch(
PrefService* prefs,
search_engines::SearchEngineChoiceService* search_engine_choice_service) {
return FindPrepopulatedEngineInternal(prefs, search_engine_choice_service,
- google.id,
+ yandex_ru.id,
/*use_first_as_fallback=*/true);
}
diff --git a/ui/webui/resources/cr_components/searchbox/realbox.html b/ui/webui/resources/cr_components/searchbox/realbox.html
index 007ba1fafa..5fd20d191c 100644
index aab1bb1034..4ff6b1f282 100644
--- a/ui/webui/resources/cr_components/searchbox/realbox.html
+++ b/ui/webui/resources/cr_components/searchbox/realbox.html
@@ -1,4 +1,11 @@
@ -594,5 +595,5 @@ index 007ba1fafa..5fd20d191c 100644
/* Embedders should define --cr-realbox-min-width. */
--cr-realbox-shadow: 0 1px 6px 0 var(--color-realbox-shadow);
--
2.45.1
2.45.2

@ -1,16 +1,16 @@
From 8f60875d92978a514def55dbe973ee90c9b58a94 Mon Sep 17 00:00:00 2001
From: Sergey Cherevko <s.cherevko@msvsphere-os.ru>
Date: Fri, 14 Jun 2024 17:11:59 +0300
From ea76dbff544332f6d8d4d3b5629edd79269613ec Mon Sep 17 00:00:00 2001
From: tigro <tigro@msvsphere-os.ru>
Date: Thu, 25 Jul 2024 18:32:03 +0300
Subject: [PATCH] Yandex as default search engine
---
.../search_engines/prepopulated_engines.json | 11 ++++++-----
.../search_engines/search_engine_countries-inc.cc | 11 ++++++-----
.../template_url_prepopulate_data.cc | 15 +++++++++------
3 files changed, 21 insertions(+), 16 deletions(-)
components/search_engines/prepopulated_engines.json | 11 ++++++-----
.../search_engines/search_engine_countries-inc.cc | 11 ++++++-----
.../search_engines/template_url_prepopulate_data.cc | 9 ++++++++-
3 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/components/search_engines/prepopulated_engines.json b/components/search_engines/prepopulated_engines.json
index 91539be7a0..63b30e6c92 100644
index cdb763081d..d4b06432f2 100644
--- a/components/search_engines/prepopulated_engines.json
+++ b/components/search_engines/prepopulated_engines.json
@@ -665,7 +665,7 @@
@ -130,31 +130,32 @@ index 6c8ffb9e7d..4c99be8769 100644
{SearchEngineTier::kTopEngines, &duckduckgo},
{SearchEngineTier::kTopEngines, &yahoo},
diff --git a/components/search_engines/template_url_prepopulate_data.cc b/components/search_engines/template_url_prepopulate_data.cc
index 39e72f6be1..82e64ffb6f 100644
index 3a7798c2d1..60959c3e24 100644
--- a/components/search_engines/template_url_prepopulate_data.cc
+++ b/components/search_engines/template_url_prepopulate_data.cc
@@ -237,12 +237,15 @@ std::vector<std::unique_ptr<TemplateURLData>> GetPrepopulatedEngines(
search_engines::RecordIsDefaultProviderAddedToChoices(inserted_default);
}
}
- 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;
@@ -81,6 +81,13 @@ GetPrepopulatedEnginesForEeaRegionCountries(int country_id,
std::shuffle(t_urls.begin(), t_urls.end(), generator);
CHECK_LE(t_urls.size(), kMaxEeaPrepopulatedEngines);
+
+ 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;
}
@@ -325,7 +332,7 @@ std::unique_ptr<TemplateURLData> GetPrepopulatedFallbackSearch(
PrefService* prefs,
search_engines::SearchEngineChoiceService* search_engine_choice_service) {
return FindPrepopulatedEngineInternal(prefs, search_engine_choice_service,
- google.id,
+ yandex_ru.id,
/*use_first_as_fallback=*/true);
}
--
2.39.3
2.45.2

@ -0,0 +1,11 @@
--- a/base/system/sys_info.cc
+++ b/base/system/sys_info.cc
@@ -255,6 +255,8 @@
return "ARM";
#elif defined(ARCH_CPU_ARM64)
return "ARM_64";
+#elif defined(ARCH_CPU_PPC64)
+ return "PPC_64";
#elif defined(ARCH_CPU_RISCV64)
return "RISCV_64";
#else

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

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

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

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

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

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

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

@ -1,42 +0,0 @@
diff -up chromium-120.0.6099.35/build/linux/unbundle/libusb.gn.system-libusb chromium-120.0.6099.35/build/linux/unbundle/libusb.gn
--- chromium-120.0.6099.35/build/linux/unbundle/libusb.gn.system-libusb 2023-11-22 20:31:32.000000000 +0100
+++ chromium-120.0.6099.35/build/linux/unbundle/libusb.gn 2023-11-26 11:46:14.559263668 +0100
@@ -1,3 +1,27 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/linux/pkg_config.gni")
+import("//build/shim_headers.gni")
+
+pkg_config("system_libusb") {
+ packages = [ "libusb-1.0" ]
+}
+
+shim_headers("libusb_shim") {
+ root_path = "src/libusb"
+ headers = [
+ "libusb.h",
+ ]
+}
+
+source_set("libusb") {
+ deps = [
+ ":libusb_shim",
+ ]
+ public_configs = [ ":system_libusb" ]
+}
import("//build/config/linux/pkg_config.gni")
import("//build/shim_headers.gni")
diff -up chromium-120.0.6099.35/build/linux/unbundle/replace_gn_files.py.system-libusb chromium-120.0.6099.35/build/linux/unbundle/replace_gn_files.py
--- chromium-120.0.6099.35/build/linux/unbundle/replace_gn_files.py.system-libusb 2023-11-26 11:46:14.559263668 +0100
+++ chromium-120.0.6099.35/build/linux/unbundle/replace_gn_files.py 2023-11-26 12:05:20.542665877 +0100
@@ -56,6 +56,7 @@ REPLACEMENTS = {
'libevent': 'third_party/libevent/BUILD.gn',
'libjpeg': 'third_party/libjpeg.gni',
'libpng': 'third_party/libpng/BUILD.gn',
+ 'libusb': 'third_party/libusb/BUILD.gn',
'libsecret' : 'third_party/libsecret/BUILD.gn',
'libusb': 'third_party/libusb/BUILD.gn',
'libvpx': 'third_party/libvpx/BUILD.gn',

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File diff suppressed because it is too large Load Diff

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

File diff suppressed because it is too large Load Diff

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

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

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

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

@ -0,0 +1,44 @@
commit 4ca70656fde83d2db6ed5a8ac9ec9e7443846924
Author: Lei Zhang <thestig@chromium.org>
Date: Wed Jun 26 16:35:34 2024 +0000
Move chrome/browser/ui:webui_name_variants to public_deps
The chrome/browser/ui build target contains webui_contents_wrapper.h,
which included the generated webui_name_variants.h header. For this to
work correctly, the build system must process the webui_name_variants
target first and generate webui_name_variants.h. To do this reliably,
without having to depend on webui_name_variants in all targets that
transitively include webui_contents_wrapper.h, make it a public_deps.
Bug: 40253918, 346711540, 346699817, 345645751
Change-Id: I6e0b573427cda1b2b408702f139b2c9e83f05045
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5646245
Reviewed-by: Anthony Vallée-Dubois <anthonyvd@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1319828}
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
index 46648a4c2194e..0883714163a31 100644
--- a/chrome/browser/ui/BUILD.gn
+++ b/chrome/browser/ui/BUILD.gn
@@ -6436,7 +6436,6 @@ static_library("ui") {
}
deps += [
- ":webui_name_variants",
"side_search:side_search_tab_data_proto",
"//base",
"//chrome/browser:main_extra_parts",
@@ -6495,7 +6494,10 @@ static_library("ui") {
"//ui/lottie",
"//ui/views:buildflags",
]
- public_deps += [ "//ui/base/dragdrop/mojom:mojom_headers" ]
+ public_deps += [
+ ":webui_name_variants",
+ "//ui/base/dragdrop/mojom:mojom_headers",
+ ]
allow_circular_includes_from += [ "//chrome/browser/ui/views" ]

@ -0,0 +1,62 @@
commit 50d63ffee3f7f1b1b9303363742ad8ebbfec31fa
Author: Lei Zhang <thestig@chromium.org>
Date: Wed Jun 26 21:27:51 2024 +0000
Make more deps entries public_deps in chrome/browser/ui/BUILD.gn
The chrome/browser/ui build target includes several buildflag headers.
For this to work correctly, the build system must be able to generate
the buildflag headers first. To do this reliably, without having to
depend on buildflag targets in all targets that transitively include the
headers that includes buildflag heaers, make these dependencies
public_deps.
For //components/paint_preview/buildflags, remove the deps entry, as it
is already in public_deps.
Bug: 40253918, 346711540, 346699817, 345645751
Change-Id: I00e78a430f2e99aa3732406882b352d31e3d7da7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5647662
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1320033}
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
index bc6a7c03ecd1c..74f92f0431494 100644
--- a/chrome/browser/ui/BUILD.gn
+++ b/chrome/browser/ui/BUILD.gn
@@ -415,8 +415,10 @@ static_library("ui") {
"//chrome/browser/ui/tabs:tab_enums",
"//components/cross_device/logging",
"//components/dom_distiller/core",
+ "//components/enterprise/buildflags",
"//components/paint_preview/buildflags",
"//components/safe_browsing:buildflags",
+ "//components/segmentation_platform/public",
"//components/sync",
"//components/sync_user_events",
"//components/translate/content/browser",
@@ -533,7 +535,6 @@ static_library("ui") {
"//components/embedder_support:browser_util",
"//components/encrypted_messages:encrypted_message_proto",
"//components/enterprise",
- "//components/enterprise/buildflags:buildflags",
"//components/error_page/content/browser",
"//components/facilitated_payments/core/features",
"//components/favicon/content",
@@ -644,7 +645,6 @@ static_library("ui") {
"//components/security_interstitials/core:unsafe_resource",
"//components/security_state/content",
"//components/security_state/core",
- "//components/segmentation_platform/public",
"//components/send_tab_to_self",
"//components/sessions",
"//components/sharing_message",
@@ -2119,7 +2119,6 @@ static_library("ui") {
"//components/omnibox/browser:mojo_bindings",
"//components/page_load_metrics/browser",
"//components/paint_preview/browser",
- "//components/paint_preview/buildflags",
"//components/paint_preview/common",
"//components/paint_preview/public",
"//components/password_manager/content/common",

@ -0,0 +1,37 @@
commit 2c101186b60ed50f2ba4feaa2e963bd841bcca47
Author: Takuto Ikuta <tikuta@chromium.org>
Date: Fri Jun 21 06:23:27 2024 +0000
chrome/browser: add missing dependency
This is to fix build error due to missing dependency when we update
ninja to 1.12.
e.g. https://ci.chromium.org/ui/p/chromium/builders/build/linux-build-perf-no-rbe/1690/overview
Bug: 346711540, 346699817, 345645751, 40253918
Change-Id: Ife0a4e09969a4ad2e61dfc1598c9a63ac0b2abd5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5641516
Reviewed-by: Anthony Vallée-Dubois <anthonyvd@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1317790}
diff --git a/chrome/browser/ui/views/side_panel/BUILD.gn b/chrome/browser/ui/views/side_panel/BUILD.gn
index 96f2c30a6dd22..2957730277a29 100644
--- a/chrome/browser/ui/views/side_panel/BUILD.gn
+++ b/chrome/browser/ui/views/side_panel/BUILD.gn
@@ -201,5 +201,13 @@ source_set("side_panel") {
"//ui/gfx:color_utils",
"//ui/gfx/geometry:geometry_skia",
"//ui/webui",
+
+ # TODO(crbug.com/346711540,crbug.com/346699817,crbug.com/345645751):
+ # Use //chrome/browser/ui instead after fixing cyclic dependency.
+ "//chrome/browser/ui:webui_name_variants",
+ "//components/enterprise/buildflags",
+ "//components/paint_preview/buildflags",
+ "//components/segmentation_platform/public/proto",
+ "//components/webapps/common:mojo_bindings",
]
}

@ -0,0 +1,49 @@
commit f2b43c18b8ecfc3ddc49c42c062d796c8b563984
Author: Takuto Ikuta <tikuta@chromium.org>
Date: Wed Jul 3 09:00:47 2024 +0000
chrome/browser/ui: add missing dependency
This is to fix build error due to missing dependency when we update
ninja to 1.12.
e.g. https://ci.chromium.org/ui/p/chromium/builders/build.shadow/win-build-perf-developer/1/overview
Bug: 40253918, 345645751, 346694160, 346709958, 346707816
Change-Id: I3ede8e345aef5d6d2d8bf5b155601650828bc817
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5644627
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1322655}
diff --git a/chrome/browser/ui/views/side_panel/BUILD.gn b/chrome/browser/ui/views/side_panel/BUILD.gn
index 2957730277a29..2680a77d855d5 100644
--- a/chrome/browser/ui/views/side_panel/BUILD.gn
+++ b/chrome/browser/ui/views/side_panel/BUILD.gn
@@ -202,12 +202,24 @@ source_set("side_panel") {
"//ui/gfx/geometry:geometry_skia",
"//ui/webui",
- # TODO(crbug.com/346711540,crbug.com/346699817,crbug.com/345645751):
+ # TODO(crbug.com/345645751): Use //chrome/browser instead after fixing cyclic dependency.
+ "//components/enterprise/common/proto:connectors_proto",
+
+ # TODO(crbug.com/346711540,crbug.com/346699817,crbug.com/345645751,
+ # crbug.com/346694160,crbug.com/346709958,crbug.com/346707816):
# Use //chrome/browser/ui instead after fixing cyclic dependency.
+ "//chrome/browser/cart:mojo_bindings",
+ "//chrome/browser/companion/visual_query",
"//chrome/browser/ui:webui_name_variants",
+ "//chrome/browser/ui/webui/side_panel/bookmarks:mojo_bindings",
+ "//chrome/browser/ui/webui/side_panel/customize_chrome:mojo_bindings",
+ "//chrome/browser/ui/webui/side_panel/reading_list:mojo_bindings",
"//components/enterprise/buildflags",
+ "//components/page_image_service/mojom:mojo_bindings",
"//components/paint_preview/buildflags",
"//components/segmentation_platform/public/proto",
+ "//components/user_education/webui",
"//components/webapps/common:mojo_bindings",
+ "//ui/webui/resources/cr_components/commerce:mojo_bindings",
]
}

@ -1,20 +0,0 @@
diff -up chromium-98.0.4758.80/components/ui_devtools/views/ui_element_with_metadata.cc.erase-fix chromium-98.0.4758.80/components/ui_devtools/views/ui_element_with_metadata.cc
--- chromium-98.0.4758.80/components/ui_devtools/views/ui_element_with_metadata.cc.erase-fix 2022-02-03 19:16:57.784979831 +0000
+++ chromium-98.0.4758.80/components/ui_devtools/views/ui_element_with_metadata.cc 2022-02-03 19:17:12.983633352 +0000
@@ -19,14 +19,14 @@ namespace {
// Remove any custom editor "prefixes" from the property name. The prefixes must
// not be valid identifier characters.
void StripPrefix(std::string& property_name) {
- auto cur = property_name.cbegin();
+ auto cur = property_name.begin();
for (; cur < property_name.cend(); ++cur) {
if ((*cur >= 'A' && *cur <= 'Z') || (*cur >= 'a' && *cur <= 'z') ||
*cur == '_') {
break;
}
}
- property_name.erase(property_name.cbegin(), cur);
+ property_name.erase(property_name.begin(), cur);
}
} // namespace

@ -315,10 +315,7 @@ if __name__ == '__main__':
nacl_versions(chromium_version)
if (args.cleansources):
junk_dirs = ['third_party/WebKit/Tools/Scripts/webkitpy/layout_tests',
'webkit/data/layout_tests', 'third_party/hunspell/dictionaries',
'chrome/test/data', 'native_client/tests',
'third_party/WebKit/LayoutTests']
junk_dirs = ['build/linux/debian_bullseye_amd64-sysroot', 'build/linux/debian_bullseye_i386-sysroot']
# First, the dirs:
for directory in junk_dirs:

@ -138,6 +138,7 @@ header_files=" libavcodec/x86/inline_asm.h \
libavcodec/pixels.h \
libavcodec/png.h \
libavcodec/pngdsp.h \
libavcodec/progressframe.h \
libavcodec/put_bits.h \
libavcodec/qpeldsp.h \
libavcodec/ratecontrol.h \

@ -1,10 +1,13 @@
diff -up third_party/ffmpeg/ffmpeg_generated.gni.me third_party/ffmpeg/ffmpeg_generated.gni
--- third_party/ffmpeg/ffmpeg_generated.gni.me 2024-05-05 00:45:53.017100841 +0200
+++ third_party/ffmpeg/ffmpeg_generated.gni 2024-05-05 00:46:20.244559951 +0200
@@ -17,8 +17,8 @@ use_linux_config = is_linux || is_chrome
if ((is_android && current_cpu == "arm" && arm_use_neon) ||
(is_android && current_cpu == "arm64") ||
(is_android && current_cpu == "x64") ||
--- third_party/ffmpeg/ffmpeg_generated.gni.me 2024-07-19 23:49:33.776963768 +0200
+++ third_party/ffmpeg/ffmpeg_generated.gni 2024-07-19 23:50:14.377819007 +0200
@@ -14,10 +14,10 @@ ffmpeg_asm_sources = []
use_linux_config = is_linux || is_chromeos || is_fuchsia
-if (current_cpu == "arm64" || current_cpu == "x64" ||
+if ((current_cpu == "arm64") || (current_cpu == "x64") ||
(is_android && current_cpu == "arm" && arm_use_neon) ||
- (is_android && current_cpu == "x86") || is_apple || is_win ||
- use_linux_config) {
+ (is_android && current_cpu == "x86") || (is_apple) || (is_win) ||

@ -0,0 +1,24 @@
--- a/components/variations/proto/study.proto
+++ b/components/variations/proto/study.proto
@@ -264,6 +264,9 @@
// A Mac-only value, indicating an x86-64 binary running on an arm64 host
// via "Rosetta 2" binary translation.
TRANSLATED_X86_64 = 4;
+
+ // A POSIX-only value, indicating an OpenPOWER host
+ PPC64 = 5;
}
// Enum to pass as optional bool.
--- a/components/variations/service/variations_field_trial_creator_base.cc
+++ b/components/variations/service/variations_field_trial_creator_base.cc
@@ -109,6 +109,9 @@
if (process_arch == "x86") {
return Study::X86_32;
}
+ if (process_arch == "PPC_64") {
+ return Study::PPC64;
+ }
if (process_arch == "x86_64") {
std::string os_arch = base::SysInfo::OperatingSystemArchitecture();
if (base::StartsWith(os_arch, "arm",

@ -0,0 +1,22 @@
--- a/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.cc
+++ b/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.cc
@@ -506,6 +506,9 @@
partition_page_count <= kMaxPartitionPagesPerRegularSlotSpan;
partition_page_count++) {
size_t candidate_size = partition_page_count * PartitionPageSize();
+ if (candidate_size > kMaxBucketed) {
+ break;
+ }
size_t waste = candidate_size % slot_size;
if (waste <= .02 * SystemPageSize()) {
return partition_page_count * NumSystemPagesPerPartitionPage();
@@ -522,6 +525,9 @@
size_t system_page_count =
partition_page_count * NumSystemPagesPerPartitionPage() - slack;
size_t candidate_size = system_page_count * SystemPageSize();
+ if (candidate_size > kMaxBucketed) {
+ break;
+ }
size_t waste = candidate_size % slot_size;
if (waste < best_waste) {
best_waste = waste;

@ -0,0 +1,112 @@
--- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h
+++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h
@@ -100,21 +100,21 @@
// other constant values, we pack _all_ `PartitionRoot::Alloc` sizes perfectly
// up against the end of a system page.
-#if defined(_MIPS_ARCH_LOONGSON) || defined(ARCH_CPU_LOONGARCH64)
+#if (BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS)) || \
+ defined(PARTITION_ALLOCATOR_CONSTANTS_POSIX_NONCONST_PAGE_SIZE)
PA_ALWAYS_INLINE PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR size_t
PartitionPageShift() {
- return 16; // 64 KiB
+ return PageAllocationGranularityShift() + 2;
}
-#elif defined(ARCH_CPU_PPC64)
+#elif defined(_MIPS_ARCH_LOONGSON) || defined(ARCH_CPU_LOONGARCH64)
PA_ALWAYS_INLINE PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR size_t
PartitionPageShift() {
- return 18; // 256 KiB
+ return 16; // 64 KiB
}
-#elif (BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS)) || \
- defined(PARTITION_ALLOCATOR_CONSTANTS_POSIX_NONCONST_PAGE_SIZE)
+#elif defined(ARCH_CPU_PPC64)
PA_ALWAYS_INLINE PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR size_t
PartitionPageShift() {
- return PageAllocationGranularityShift() + 2;
+ return 18; // 256 KiB
}
#else
PA_ALWAYS_INLINE PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR size_t
--- a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h
+++ b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h
@@ -26,7 +26,8 @@
#define PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR __attribute__((const))
#elif (BUILDFLAG(IS_ANDROID) && defined(ARCH_CPU_64_BITS)) || \
- (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64))
+ (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)) || \
+ (BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_PPC64))
// This should work for all POSIX (if needed), but currently all other
// supported OS/architecture combinations use either hard-coded values
// (such as x86) or have means to determine these values without needing
@@ -86,17 +87,7 @@
PA_ALWAYS_INLINE PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR size_t
PageAllocationGranularityShift() {
-#if BUILDFLAG(IS_WIN) || defined(ARCH_CPU_PPC64)
- // Modern ppc64 systems support 4kB (shift = 12) and 64kB (shift = 16) page
- // sizes. Since 64kB is the de facto standard on the platform and binaries
- // compiled for 64kB are likely to work on 4kB systems, 64kB is a good choice
- // here.
- return 16; // 64kB
-#elif defined(_MIPS_ARCH_LOONGSON) || defined(ARCH_CPU_LOONGARCH64)
- return 14; // 16kB
-#elif BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS)
- return static_cast<size_t>(vm_page_shift);
-#elif defined(PARTITION_ALLOCATOR_CONSTANTS_POSIX_NONCONST_PAGE_SIZE)
+#if defined(PARTITION_ALLOCATOR_CONSTANTS_POSIX_NONCONST_PAGE_SIZE)
// arm64 supports 4kb (shift = 12), 16kb (shift = 14), and 64kb (shift = 16)
// page sizes. Retrieve from or initialize cache.
size_t shift = page_characteristics.shift.load(std::memory_order_relaxed);
@@ -106,6 +97,16 @@
page_characteristics.shift.store(shift, std::memory_order_relaxed);
}
return shift;
+#elif BUILDFLAG(IS_WIN) || defined(ARCH_CPU_PPC64)
+ // Modern ppc64 systems support 4kB (shift = 12) and 64kB (shift = 16) page
+ // sizes. Since 64kB is the de facto standard on the platform and binaries
+ // compiled for 64kB are likely to work on 4kB systems, 64kB is a good choice
+ // here.
+ return 16; // 64kB
+#elif defined(_MIPS_ARCH_LOONGSON) || defined(ARCH_CPU_LOONGARCH64)
+ return 14; // 16kB
+#elif BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS)
+ return static_cast<size_t>(vm_page_shift);
#else
return 12; // 4kB
#endif
--- a/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h
+++ b/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h
@@ -180,10 +180,10 @@
#else // !BUILDFLAG(IS_AIX) && !defined(ARCH_CPU_BIG_ENDIAN)
// Little-endian Linux PPC has 48 bits of virtual addressing. Use 46.
- PA_ALWAYS_INLINE constexpr uintptr_t ASLRMask() {
+ PA_ALWAYS_INLINE PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR uintptr_t ASLRMask() {
return AslrMask(46);
}
- PA_ALWAYS_INLINE constexpr uintptr_t ASLROffset() {
+ PA_ALWAYS_INLINE PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR uintptr_t ASLROffset() {
return AslrAddress(0);
}
--- a/base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h
+++ b/base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h
@@ -17,10 +17,15 @@
// PartitionPageSize() is 4 times the OS page size.
static constexpr size_t kMaxSlotsPerSlotSpan = 4 * (1 << 14) / kSmallestBucket;
#elif defined(PARTITION_ALLOCATOR_CONSTANTS_POSIX_NONCONST_PAGE_SIZE)
+#if defined(ARCH_CPU_PPC64)
+// System page size can be 4 or 64 kiB on Linux on ppc64. Use 64 kiB maximum.
+static constexpr size_t kMaxSlotsPerSlotSpan = 4 * (1 << 16) / kSmallestBucket;
+#else
// System page size can be 4, 16, or 64 kiB on Linux on arm64. 64 kiB is
// currently (kMaxSlotsPerSlotSpanBits == 13) not supported by the code,
// so we use the 16 kiB maximum (64 kiB will crash).
static constexpr size_t kMaxSlotsPerSlotSpan = 4 * (1 << 14) / kSmallestBucket;
+#endif
#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_PPC64)
// System page size is not a constant on OpenPOWER systems, but is either 4kiB
// or 64kiB (1 << 12 or 1 << 16)

@ -2,6 +2,7 @@
%bcond_with gost
%define _lto_cflags %{nil}
%global _default_patch_fuzz 2
# enable|disable system build flags
%global system_build_flags 0
@ -26,6 +27,11 @@
# enable|disble bootstrap
%global bootstrap 0
# workaround for old gn on rhel, it causes build error: unknown function filter_labels_include()
%if 0%{?rhel}
%global bootstrap 1
%endif
# Fancy build status, so we at least know, where we are..
# %1 where
# %2 what
@ -76,25 +82,13 @@
%global dts_version 13
%endif
# set latest version for llvm-toolset on el7
%global llvm_toolset_version 14.0
# set name for toolset
%if 0%{?rhel} == 7
%global toolset devtoolset
%else
%global toolset gcc-toolset
%endif
%if 0%{?rhel} == 7
%global chromium_pybin /opt/rh/rh-python38/root/usr/bin/python
%else
%if 0%{?rhel} == 8
%global chromium_pybin /usr/bin/python3.9
%else
%global chromium_pybin %{__python3}
%endif
%endif
# va-api only supported in rhel >= 9 and fedora
%global use_vaapi 1
@ -102,8 +96,8 @@
# v4l2_codec only enable for fedora aarch64
%global use_v4l2_codec 0
# libva in EL7 and EL8 is too old.
%if 0%{?rhel} == 7 || 0%{?rhel} == 8
# libva is too old on el8
%if 0%{?rhel} == 8
%global use_vaapi 0
%endif
@ -129,10 +123,6 @@
%endif
%endif
# Seems like we might need this sometimes
# Practically, no. But it's here in case we do.
%global use_gold 0
%global build_clear_key_cdm 0
# Disabled because of Google, starting with Chromium 88.
@ -151,9 +141,6 @@
# disable debuginfo due to a bug in debugedit on el7
# error: canonicalization unexpectedly shrank by one character
# https://bugzilla.redhat.com/show_bug.cgi?id=304121
%if 0%{?rhel} == 7
%global enable_debug 0
%endif
%if ! %{enable_debug}
%global debug_package %{nil}
%global debug_level 0
@ -188,20 +175,19 @@
# enable|disable use_custom_libcxx
%global use_custom_libcxx 1
%if 0%{?rhel} == 7
%global use_custom_libcxx 0
%endif
# enable clang by default
%global clang 1
# enable|disable control flow integrity support
%global cfi 0
%ifarch x86_64 aarch64
%if %{clang}
%if 0%{?fedora} || 0%{?rhel} > 7
%global cfi 1
%endif
%endif
%endif
%ifarch ppc64le
# workaround for a bug in new llvm on f40/rawhide (ppc64le)
@ -240,6 +226,8 @@
%global bundlelibaom 1
%global bundlelibavif 1
%global bundlesnappy 1
%global bundleicu 1
%global bundledav1d 1
%global bundlepylibs 0
%global bundlelibxslt 0
%global bundleflac 0
@ -256,14 +244,14 @@
# enable bundleminizip for Fedora > 39 due to switch to minizip-ng
# which breaks the build
%global bundleminizip 0
%if 0%{?rhel} == 7 || 0%{?fedora} > 39
%if 0%{?fedora} > 39
%global bundleminizip 1
%endif
# Always build with internal ffmpeg
%global bundleffmpegfree 0
%if 0%{?rhel} == 7 || 0%{?rhel} == 8
%if 0%{?rhel} == 8
%global bundleharfbuzz 1
%global bundlelibwebp 1
%global bundlelibpng 1
@ -272,7 +260,6 @@
%global bundlelibdrm 1
%global bundlefontconfig 1
%global bundlebrotli 1
%global bundleicu 1
%global bundlelibopenjpeg2 1
%global bundlelibtiff 1
%global bundlecrc32c 1
@ -281,14 +268,11 @@
%else
%if 0%{?fedora} > 38 || 0%{?rhel} > 9
%global bundlebrotli 0
%global bundleicu 0
%global bundlelibwebp 0
%else
%global bundlebrotli 1
%global bundleicu 1
%global bundlelibwebp 1
%endif
%global bundledav1d 0
%global bundlelibwebp 1
%global bundlelibpng 0
%global bundlelibjpeg 0
%global bundlelibdrm 0
@ -311,7 +295,7 @@
# Build with GOST patches
# https://github.com/deemru/chromium-gost/
%global gost_build 1
%define chromium_gost_commit 39c440395462a753a3f064f7e28fdc2bc3173bf2
%define chromium_gost_commit 3224c62bcc360b80de98da20358cbbe16d773c10
%define msspi_commit 2e626e5a5605cc4c03fa4bfc0145e459864e897a
%define chromium_path_gost %{_builddir}/chromium-gost
%endif
@ -350,8 +334,8 @@
%endif
Name: chromium%{chromium_channel}
Version: 126.0.6478.182
Release: 1%{?dist}.inferit.1
Version: 127.0.6533.72
Release: 1%{?dist}.inferit
Summary: A WebKit (Blink) powered web browser that Google doesn't want you to use
Url: http://www.chromium.org/Home
License: BSD-3-Clause AND LGPL-2.1-or-later AND Apache-2.0 AND IJG AND MIT AND GPL-2.0-or-later AND ISC AND OpenSSL AND (MPL-1.1 OR GPL-2.0-only OR LGPL-2.0-only)
@ -362,9 +346,6 @@ Patch0: chromium-70.0.3538.67-sandbox-pie.patch
# Use /etc/chromium for initial_prefs
Patch1: chromium-115-initial_prefs-etc-path.patch
# system libusb
Patch2: chromium-120-system-libusb.patch
# Do not mangle zlib
Patch5: chromium-77.0.3865.75-no-zlib-mangle.patch
@ -408,67 +389,6 @@ Patch90: chromium-121-system-libxml.patch
# patch for using system opus
Patch91: chromium-108-system-opus.patch
# need to explicitly include a kernel header on EL7 to support MFD_CLOEXEC, F_SEAL_SHRINK, F_ADD_SEALS, F_SEAL_SEAL
Patch100: chromium-126-el7-include-fcntl-memfd.patch
# add define HAVE_STRNDUP on epel7
Patch101: chromium-108-el7-wayland-strndup-error.patch
# Workaround for old clang 14
# error: defaulting this default constructor would delete it after its first declaration
Patch102: chromium-125-el7-default-constructor-involving-anonymous-union.patch
# Work around old and missing headers on EPEL7
Patch103: chromium-110-epel7-old-headers-workarounds.patch
# Use old cups (chromium's code workaround breaks on gcc)
# Revert: https://github.com/chromium/chromium/commit/c3213f8779ddc427e89d982514185ed5e4c94e91
Patch104: chromium-126-el7-old-cups.patch
# libdrm on EL7 is rather old and chromium assumes newer
# This gets us by for now
Patch105: chromium-125-el7-old-libdrm.patch
# error: no matching function for call to 'std::basic_string<char>::erase(std::basic_string<char>::const_iterator, __gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >&)'
# 33 | property_name.erase(property_name.cbegin(), cur);
# Not sure how this EVER worked anywhere, but it only seems to fail on EPEL-7.
Patch106: chromium-98.0.4758.80-epel7-erase-fix.patch
# Add additional operator== to make el7 happy.
Patch107: chromium-122-el7-extra-operator.patch
# old v4l2 on el7
Patch108: chromium-118-el7_v4l2_quantization.patch
# workaround for old clang on el7
Patch109: chromium-114-wireless-el7.patch
Patch110: chromium-115-buildflag-el7.patch
Patch111: chromium-122-el7-inline-function.patch
Patch112: chromium-126-el7-rust-c_string.patch
Patch113: chromium-121-el7-clang-version-warning.patch
Patch114: chromium-123-el7-clang-build-failure.patch
Patch115: chromium-124-el7-size_t.patch
# fixes for old clang version in el7 (clang <= 15)
# compiler build errors, no matching constructor for initialization
Patch116: chromium-126-el7-no_matching_constructor.patch
Patch117: chromium-115-el7-compiler-SkColor4f.patch
# workaround for clang bug, https://github.com/llvm/llvm-project/issues/57826
Patch118: chromium-124-el7-workaround_clang_bug-structured_binding.patch
# missing typename
Patch119: chromium-125-el7-typename.patch
# error: invalid operands to binary expression
Patch120: chromium-117-el7-string-convert.patch
Patch121: chromium-125-el7-assert.patch
Patch122: chromium-126-el7-constexpr.patch
Patch123: chromium-126-el7-type-alias.patch
Patch124: chromium-125-el7-optional-workaround-assert.patch
Patch125: chromium-126-el7-interator.patch
Patch126: chromium-126-el7-colormap.patch
Patch127: chromium-126-el7-stdformat.patch
Patch128: chromium-126-el7-std_variant.patch
# system ffmpeg
# need for old ffmpeg 5.x on epel9
Patch129: chromium-125-ffmpeg-5.x-reordered_opaque.patch
@ -482,41 +402,26 @@ Patch133: chromium-121-system-old-ffmpeg.patch
# disable FFmpegAllowLists by default to allow external ffmpeg
patch134: chromium-125-disable-FFmpegAllowLists.patch
# revert AV1 VAAPI video encode due to old libva on el9 (rhel9.3)
Patch140: chromium-122-revert-av1enc-el9.patch
# file conflict with old kernel on el8/el9
Patch141: chromium-118-dma_buf_export_sync_file-conflict.patch
# add correct path for Qt6Gui header and libs
Patch150: chromium-124-qt6.patch
# disable memory tagging in epel7 and epel8 on aarch64 due to new feature IFUNC-Resolver
# not supported in old glibc < 2.30, error: fatal error: 'sys/ifunc.h' file not found
Patch305: chromium-124-arm64-memory_tagging.patch
Patch306: chromium-126-ifunc-header.patch
# compiler errors on el7/el8 and f38 (clang <17)
Patch307: chromium-125-el-NativeValueTraits-p1.patch
Patch308: chromium-125-el-NativeValueTraits-p2.patch
# disable memory tagging (epel8 on aarch64) due to new feature IFUNC-Resolver
# it is not supported in old glibc < 2.30, error: fatal error: 'sys/ifunc.h' file not found
Patch305: chromium-124-el8-arm64-memory_tagging.patch
Patch306: chromium-126-el8-ifunc-header.patch
# build error: unknown architectural extension on aarch64 (epel8)
Patch307: chromium-124-el8-libdav1d-aarch64.patch
# 64kpage support on aarch64 (el8)
Patch308: chromium-124-el8-support-64kpage.patch
# enable fstack-protector-strong
Patch312: chromium-123-fstack-protector-strong.patch
# rust is old, function or associated item not found in `OsStr`
Patch313: chromium-123-rust-clap_lex.patch
Patch314: chromium-126-clang16-buildflags.patch
# remove ldflags -Wl,-mllvm,-disable-auto-upgrade-debug-info which is not supported
Patch315: chromium-126-clang16-disable-auto-upgrade-debug-info.patch
# add -ftrivial-auto-var-init=zero and -fwrapv
Patch316: chromium-122-clang-build-flags.patch
# build error: unknown architectural extension on aarch64 (epel and < f39)
Patch317: chromium-124-libdav1d-aarch64.patch
# Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=2239523
# https://bugs.chromium.org/p/chromium/issues/detail?id=1145581#c60
# Disable BTI until this is fixed upstream.
@ -531,12 +436,10 @@ Patch355: chromium-126-system-libstdc++.patch
# set clang_lib path
Patch358: chromium-124-rust-clang_lib.patch
# ERROR Unresolved dependencies
Patch359: chromium-124-libavif-deps.patch
# PowerPC64 LE support
# Patches taken from Debian, Timothy Pearson's patchset
# https://salsa.debian.org/chromium-team/chromium/-/tree/master/debian/patches/ppc64le?ref_type=heads
# Timothy Pearson's patchset
# https://gitlab.solidsilicon.io/public-development/open-source/chromium/openpower-patches/-/tree/chromium-126/patches/ppc64le
Patch359: add-ppc64-architecture-string.patch
Patch360: 0001-linux-seccomp-bpf-ppc64-glibc-workaround-in-SIGSYS-h.patch
Patch361: 0001-sandbox-Enable-seccomp_bpf-for-ppc64.patch
Patch362: 0001-services-service_manager-sandbox-linux-Fix-TCGETS-de.patch
@ -589,22 +492,28 @@ Patch400: fix-rustc.patch
Patch401: fix-rust-linking.patch
Patch402: fix-breakpad-compile.patch
Patch403: fix-partition-alloc-compile.patch
Patch404: 0002-Add-ppc64-trap-instructions.patch
Patch404: fix-study-crash.patch
Patch405: memory-allocator-dcheck-assert-fix.patch
Patch406: 0002-Add-ppc64-trap-instructions.patch
Patch407: fix-ppc64-linux-syscalls-headers.patch
Patch409: use-sysconf-page-size-on-ppc64.patch
Patch408: use-sysconf-page-size-on-ppc64.patch
Patch409: partition-alloc-4k-detect.patch
Patch410: dawn-fix-typos.patch
Patch411: dawn-fix-ppc64le-detection.patch
Patch412: fix-swiftshader-compile.patch
# Suppress harmless compiler warning messages that appear on ppc64 due to arch-specific warning flags being passed
Patch413: fix-unknown-warning-option-messages.diff
Patch412: fix-unknown-warning-option-messages.diff
# error: undefined symbol: llvm::MCAsmInfoXCOFF::MCAsmInfoXCOFF()
Patch413: fix-swiftshader-compile.patch
# upstream patches
# 64kpage support on el8
Patch500: chromium-124-el8-support-64kpage.patch
Patch501: chromium-127-ninja-1.21.1-deps-part0.patch
Patch502: chromium-127-ninja-1.21.1-deps-part1.patch
Patch503: chromium-127-ninja-1.21.1-deps-part2.patch
Patch504: chromium-127-ninja-1.21.1-deps-part3.patch
# Old Yandex patch
Patch600: 0001-Yandex-as-default-search-engine.patch
@ -653,10 +562,6 @@ Source15: https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-%{esbuil
BuildRequires: golang-github-evanw-esbuild
%endif
%if 0%{?rhel} == 7
BuildRequires: rh-python38
%endif
# Yandex logo
Source50: https://upload.wikimedia.org/wikipedia/commons/f/f1/Yandex_logo_2021_Russian.svg
@ -668,20 +573,16 @@ Source103: chromium-browser-gost-icons.tar.xz
%endif
%if %{clang}
%if 0%{?rhel} == 7
BuildRequires: llvm-toolset-%{llvm_toolset_version}
%else
BuildRequires: clang
BuildRequires: clang-tools-extra
BuildRequires: llvm
BuildRequires: lld
%endif
# needs for libatomic
%if 0%{?rhel} >= 7
%if 0%{?rhel} >= 8
BuildRequires: %{toolset}-%{dts_version}-libatomic-devel
%endif
%else
%if 0%{?rhel} == 7 || 0%{?rhel} == 8
%if 0%{?rhel} == 8
BuildRequires: %{toolset}-%{dts_version}-binutils, %{toolset}-%{dts_version}-libatomic-devel
%endif
%if 0%{?fedora} || 0%{?rhel} > 8
@ -743,11 +644,7 @@ BuildRequires: pkgconfig(Qt6Core)
BuildRequires: pkgconfig(Qt6Widgets)
%endif
%if 0%{?rhel} == 7
BuildRequires: llvm-toolset-%{llvm_toolset_version}-compiler-rt
%else
BuildRequires: compiler-rt
%endif
%if ! %{bundleharfbuzz}
BuildRequires: harfbuzz-devel >= 2.4.0
@ -802,8 +699,9 @@ BuildRequires: pciutils-devel
BuildRequires: pulseaudio-libs-devel
# For screen sharing on Wayland
%if 0%{?fedora} || 0%{?rhel} >= 8
BuildRequires: pkgconfig(libpipewire-0.3)
# pipewire is old on el8, chromium needs new version, disable it temporary
%if 0%{?fedora} || 0%{?rhel} > 8
BuildRequires: pipewire-devel
%endif
# for /usr/bin/appstream-util
@ -996,18 +894,13 @@ Requires: u2f-hidraw-policy
Requires: %{name}-common%{_isa} = %{version}-%{release}
# rhel 7: x86_64
# rhel 8 or newer: x86_64, aarch64
# fedora 38 or newer: x86_64, aarch64, ppc64le
%if 0%{?rhel} == 7
ExclusiveArch: x86_64
%else
# rhel 8 or newer and fedora < 40: x86_64, aarch64
# fedora 40 or newer: x86_64, aarch64, ppc64le
%if 0%{?fedora} >= 40
ExclusiveArch: x86_64 aarch64 ppc64le
%else
ExclusiveArch: x86_64 aarch64
%endif
%endif
# FIXME
%if "%{_lib}" == "lib64"
@ -1273,7 +1166,6 @@ sed -i 's/std::string data_dir_basename = "chromium"/std::string data_dir_basena
### Chromium Fedora Patches ###
%patch -P0 -p1 -b .sandboxpie
%patch -P1 -p1 -b .etc
%patch -P2 -p1 -b .system-libusb
%patch -P5 -p1 -b .nozlibmangle
%patch -P6 -p1 -b .nounrar
%patch -P8 -p1 -b .widevine-other-locations
@ -1305,44 +1197,6 @@ sed -i 's/std::string data_dir_basename = "chromium"/std::string data_dir_basena
%patch -P91 -p1 -b .system-opus
%endif
# EPEL specific patches
%if 0%{?rhel} == 7
cp /opt/rh/%{toolset}-%{dts_version}/root/usr/include/c++/%{dts_version}/optional .
%patch -P100 -p1 -b .el7-memfd-fcntl-include
%patch -P101 -p1 -b .wayland-strndup-error
%patch -P102 -p1 -b .default-constructor-involving-anonymous-union
%patch -P103 -p1 -b .epel7-header-workarounds
%patch -P104 -p1 -b .el7cups
%patch -P105 -p1 -b .el7-old-libdrm
%patch -P106 -p1 -b .el7-erase-fix
%patch -P107 -p1 -b .el7-extra-operator-equalequal
%patch -P108 -p1 -b .el7_v4l2_quantization
%patch -P109 -p1 -b .wireless
%patch -P110 -p1 -b .buildflag-el7
%patch -P111 -p1 -b .inline-function-el7
%patch -P112 -p1 -R -b .rust-s_ctring
%patch -P113 -p1 -b .el7-clang-version-warning
%patch -P114 -p1 -b .clang-build-failure
%patch -P115 -p1 -b .el7-size_t
%patch -P116 -p1 -b .no_matching_constructor
%patch -P117 -p1 -b .workaround_clang-SkColor4f
%patch -P118 -p1 -b .workaround_clang_bug-structured_binding
%patch -P119 -p1 -b .typename
%patch -P120 -p1 -b .string-convert
%patch -P121 -p1 -b .assert
%patch -P122 -p1 -b .constexpr
%patch -P123 -p1 -b .el7-type-alias
%patch -P124 -p1 -b .el7-workaround-assert
%patch -P125 -p1 -b .el7-interator
%patch -P126 -p1 -b .el7-colormap
%patch -P127 -p1 -b .el7-stdformat
%patch -P128 -p1 -b .el7-std_variant
%endif
%if 0%{?rhel} == 9
%patch -P140 -p1 -b .revert-av1enc
%endif
%if 0%{?rhel} == 8 || 0%{?rhel} == 9
%patch -P141 -p1 -b .dma_buf_export_sync_file-conflict
%endif
@ -1361,30 +1215,18 @@ cp /opt/rh/%{toolset}-%{dts_version}/root/usr/include/c++/%{dts_version}/optiona
%patch -P150 -p1 -b .qt6
%endif
%if 0%{?rhel} && 0%{?rhel} <= 8
%if 0%{?rhel} == 8
%ifarch aarch64
%patch -P305 -p1 -b .memory_tagging
%patch -P306 -p1 -b .ifunc-header
%patch -P317 -p1 -b .libdav1d-aarch64
%patch -P305 -p1 -b .el8-memory_tagging
%patch -P306 -p1 -b .el8-ifunc-header
%patch -P307 -p1 -b .el8-libdav1d-aarch64
%patch -P308 -p1 -b .el8-support-64kpage.patch
%endif
%endif
%if 0%{?rhel} && 0%{?rhel} < 9 || 0%{?fedora} && 0%{?fedora} < 39
%patch -P307 -p1 -b .el-NativeValueTraits-p1
%patch -P308 -p1 -b .el-NativeValueTraits
%patch -P314 -p1 -b .clang16-buildflag
%patch -P315 -p1 -b .clang16-disable-auto-upgrade-debug-info
%endif
%patch -P312 -p1 -b .fstack-protector-strong
%if 0%{?rhel} && 0%{?rhel} < 10
%patch -P313 -p1 -b .rust-clap_lex
%endif
%if 0%{?rhel} >= 8 || 0%{?fedora}
%patch -P316 -p1 -b .clang-build-flags
%endif
%if %{disable_bti}
%patch -P352 -p1 -b .workaround_for_crash_on_BTI_capable_system
@ -1401,6 +1243,7 @@ cp /opt/rh/%{toolset}-%{dts_version}/root/usr/include/c++/%{dts_version}/optiona
%patch -P359 -p1 -b .libavif-deps
%ifarch ppc64le
%patch -P359 -p1 -b .add-ppc64-architecture-string
%patch -P360 -p1 -b .0001-linux-seccomp-bpf-ppc64-glibc-workaround-in-SIGSYS-h
%patch -P361 -p1 -b .0001-sandbox-Enable-seccomp_bpf-for-ppc64
%patch -P362 -p1 -b .0001-services-service_manager-sandbox-linux-Fix-TCGETS-de
@ -1451,22 +1294,26 @@ cp /opt/rh/%{toolset}-%{dts_version}/root/usr/include/c++/%{dts_version}/optiona
%patch -P401 -p1 -b .fix-rust-linking
%patch -P402 -p1 -b .fix-breakpad-compile
%patch -P403 -p1 -b .fix-partition-alloc-compile
%patch -P404 -p1 -b .0002-Add-ppc64-trap-instructions
%patch -P404 -p1 -b .fix-study-crash
%patch -P405 -p1 -b .memory-allocator-dcheck-assert-fix
%patch -P406 -p1 -b .0002-Add-ppc64-trap-instructions
%patch -P407 -p1 -b .fix-ppc64-linux-syscalls-headers
%patch -P409 -p1 -b .use-sysconf-page-size-on-ppc64
%patch -P408 -p1 -b .use-sysconf-page-size-on-ppc64
%patch -P409 -p1 -b .partition-alloc-4k-detect
%patch -P410 -p1 -b .dawn-fix-typos
%patch -P411 -p1 -b .dawn-fix-ppc64le-detection
%patch -P412 -p1 -b .fix-swiftshader-compile.patch
%patch -P413 -p1 -b .fix-unknown-warning-option-messages
%patch -P412 -p1 -b .fix-unknown-warning-option-messages
%patch -P413 -p1 -b .fix-swiftshader-compile
%endif
%%ifarch aarch64
%if 0%{?rhel} == 8
%patch -P500 -p1 -b .el8-support-64kpage.patch
%endif
%if 0%{?fedora} > 39
%patch -P501 -p1 -b .ninja-1.21.1-deps
%patch -P502 -p1 -b .ninja-1.21.1-deps
%patch -P503 -p1 -b .ninja-1.21.1-deps
%patch -P504 -p1 -b .ninja-1.21.1-deps
%endif
%patch -P601 -p1 -b .Added-Russian-description-and-summary-for-gnome-soft
@ -1601,16 +1448,6 @@ export CXXFLAGS
export LDFLAGS
export RUSTFLAGS
# enable toolset on el7
%if 0%{?rhel} == 7
. /opt/rh/rh-python38/enable
%if %{clang}
. /opt/rh/llvm-toolset-%{llvm_toolset_version}/enable
%else
. /opt/rh/%{toolset}-%{dts_version}/enable
%endif
%endif
# enable gcc toolset on el8
%if 0%{?rhel} == 8 && ! %{clang}
. /opt/rh/%{toolset}-%{dts_version}/enable
@ -1632,7 +1469,6 @@ CHROMIUM_CORE_GN_DEFINES=""
CHROMIUM_CORE_GN_DEFINES+=' custom_toolchain="//build/toolchain/linux/unbundle:default"'
CHROMIUM_CORE_GN_DEFINES+=' host_toolchain="//build/toolchain/linux/unbundle:default"'
CHROMIUM_CORE_GN_DEFINES+=' is_debug=false dcheck_always_on=false dcheck_is_configurable=false'
CHROMIUM_CORE_GN_DEFINES+=' use_goma=false'
CHROMIUM_CORE_GN_DEFINES+=' enable_nacl=false'
CHROMIUM_CORE_GN_DEFINES+=' system_libdir="%{_lib}"'
@ -1645,6 +1481,8 @@ CHROMIUM_CORE_GN_DEFINES+=' chrome_pgo_phase=0'
%if ! %{cfi}
CHROMIUM_CORE_GN_DEFINES+=' is_cfi=false use_thin_lto=false'
%else
CHROMIUM_CORE_GN_DEFINES+=' is_cfi=true use_thin_lto=true'
%endif
%if %{useapikey}
@ -1673,12 +1511,6 @@ CHROMIUM_CORE_GN_DEFINES+=" rustc_version=\"$rustc_version\""
CHROMIUM_CORE_GN_DEFINES+=' use_sysroot=false'
%if %{use_gold}
CHROMIUM_CORE_GN_DEFINES+=' use_gold=true'
%else
CHROMIUM_CORE_GN_DEFINES+=' use_gold=false'
%endif
%ifarch aarch64
CHROMIUM_CORE_GN_DEFINES+=' target_cpu="arm64"'
%endif
@ -1745,8 +1577,10 @@ CHROMIUM_BROWSER_GN_DEFINES+=' use_vaapi=false'
CHROMIUM_BROWSER_GN_DEFINES+=' use_v4l2_codec=true'
%endif
%if 0%{?fedora} || 0%{?rhel} >= 8
%if 0%{?fedora} || 0%{?rhel} > 8
CHROMIUM_BROWSER_GN_DEFINES+=' rtc_use_pipewire=true rtc_link_pipewire=true'
%else
CHROMIUM_BROWSER_GN_DEFINES+=' rtc_use_pipewire=false rtc_link_pipewire=false'
%endif
%if ! %{bundlelibjpeg}
@ -2307,6 +2141,27 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt
%endif
%changelog
* Thu Jul 25 2024 Arkady L. Shane <tigro@msvsphere-os.ru> - 127.0.6533.72-1.inferit
- update to 127.0.6533.72
* CVE-2024-6988: Use after free in Downloads
* CVE-2024-6989: Use after free in Loader
* CVE-2024-6991: Use after free in Dawn
* CVE-2024-6992: Out of bounds memory access in ANGLE
* CVE-2024-6993: Inappropriate implementation in Canvas
* CVE-2024-6994: Heap buffer overflow in Layout
* CVE-2024-6995: Inappropriate implementation in Fullscreen
* CVE-2024-6996: Race in Frames
* CVE-2024-6997: Use after free in Tabs
* CVE-2024-6998: Use after free in User Education
* CVE-2024-6999: Inappropriate implementation in FedCM
* CVE-2024-7000: Use after free in CSS. Reported by Anonymous
* CVE-2024-7001: Inappropriate implementation in HTML
* CVE-2024-7003: Inappropriate implementation in FedCM
* CVE-2024-7004: Insufficient validation of untrusted input in Safe Browsing
* CVE-2024-7005: Insufficient validation of untrusted input in Safe
- fix condition for is_cfi/use_thin_lto on aarch64/ppc64le
- update powerpc patches
* Fri Jul 19 2024 Arkady L. Shane <tigro@msvsphere-os.ru> - 126.0.6478.182-1.inferit.1
- set mode 755 during install chromium-browser.sh

Loading…
Cancel
Save