From 6eb62d841ab7eaacdde71930ad0111eea7af9d48 Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Sun, 5 Nov 2023 19:36:57 +0100 Subject: [PATCH] #504 Fix crash --- .../00Fix-crash-on-customize-profile-ui.patch | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/build/patches/00Fix-crash-on-customize-profile-ui.patch b/build/patches/00Fix-crash-on-customize-profile-ui.patch index 71de2fb9..11319429 100644 --- a/build/patches/00Fix-crash-on-customize-profile-ui.patch +++ b/build/patches/00Fix-crash-on-customize-profile-ui.patch @@ -4,9 +4,31 @@ Subject: Fix crash on customize profile ui License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - .../webui/customize_themes/chrome_customize_themes_handler.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + .../theme_color_picker/theme_color_picker_handler.cc | 4 ++-- + .../webui/customize_themes/chrome_customize_themes_handler.cc | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) +diff --git a/chrome/browser/ui/webui/cr_components/theme_color_picker/theme_color_picker_handler.cc b/chrome/browser/ui/webui/cr_components/theme_color_picker/theme_color_picker_handler.cc +--- a/chrome/browser/ui/webui/cr_components/theme_color_picker/theme_color_picker_handler.cc ++++ b/chrome/browser/ui/webui/cr_components/theme_color_picker/theme_color_picker_handler.cc +@@ -48,7 +48,7 @@ theme_color_picker::mojom::ChromeColorPtr CreateChromeColor( + chrome_colors::ColorInfo color_info) { + auto theme_colors = GetAutogeneratedThemeColors(color_info.color); + auto color = theme_color_picker::mojom::ChromeColor::New(); +- color->name = l10n_util::GetStringUTF8(color_info.label_id); ++ //color->name = l10n_util::GetStringUTF8(color_info.label_id); + color->seed = color_info.color; + color->background = theme_colors.active_tab_color; + color->foreground = theme_colors.frame_color; +@@ -63,7 +63,7 @@ theme_color_picker::mojom::ChromeColorPtr CreateDynamicChromeColor( + auto color = theme_color_picker::mojom::ChromeColor::New(); + auto color_palette = ui::GeneratePalette( + color_info.color, GetSchemeVariant(color_info.variant)); +- color->name = l10n_util::GetStringUTF8(color_info.label_id); ++ //color->name = l10n_util::GetStringUTF8(color_info.label_id); + color->seed = color_info.color; + color->background = is_dark_mode ? color_palette->primary().get(80) + : color_palette->primary().get(40); diff --git a/chrome/browser/ui/webui/customize_themes/chrome_customize_themes_handler.cc b/chrome/browser/ui/webui/customize_themes/chrome_customize_themes_handler.cc --- a/chrome/browser/ui/webui/customize_themes/chrome_customize_themes_handler.cc +++ b/chrome/browser/ui/webui/customize_themes/chrome_customize_themes_handler.cc