From ed43e558678c0fe3e694e00a0cf86d2a0c1645d9 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Fri, 22 May 2020 14:56:02 -0400 Subject: [PATCH] Linux: Fix undefined symbol: ui::GtkUiDelegate::SetInstance See https://crbug.com/1085806 for details. --- patch/patch.cfg | 6 ++++++ patch/patches/linux_chrome_views_1085806.patch | 13 +++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 patch/patches/linux_chrome_views_1085806.patch diff --git a/patch/patch.cfg b/patch/patch.cfg index c3468a673..fbe7a1c6b 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -498,5 +498,11 @@ patches = [ # iframes. # https://bugs.chromium.org/p/chromium/issues/detail?id=1081397#c9 'name': 'browser_security_policy_1081397', + }, + { + # Linux: Fix undefined symbol: ui::GtkUiDelegate::SetInstance in + # ChromeBrowserMainExtraPartsViewsLinux::ToolkitInitialized. + # https://bugs.chromium.org/p/chromium/issues/detail?id=1085806 + 'name': 'linux_chrome_views_1085806', } ] diff --git a/patch/patches/linux_chrome_views_1085806.patch b/patch/patches/linux_chrome_views_1085806.patch new file mode 100644 index 000000000..f56045546 --- /dev/null +++ b/patch/patches/linux_chrome_views_1085806.patch @@ -0,0 +1,13 @@ +diff --git chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc +index 55026be5292d..589e2c3afd28 100644 +--- chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc ++++ chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc +@@ -45,7 +45,7 @@ ChromeBrowserMainExtraPartsViewsLinux:: + } + + void ChromeBrowserMainExtraPartsViewsLinux::ToolkitInitialized() { +-#if defined(USE_X11) ++#if defined(USE_X11) && BUILDFLAG(USE_GTK) + // In Aura/X11, Gtk-based LinuxUI implementation is used, so we instantiate + // and inject the GtkUiDelegate before ChromeBrowserMainExtraPartsViewsLinux, + // so it can properly initialize GtkUi on its |ToolkitInitialized| override.