From f1af6179f0361273df88da59ffe80ed7e7e8f7d5 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Thu, 8 Aug 2024 13:39:15 -0400 Subject: [PATCH] Fix path override ordering (fixes #3749) The chrome::DIR_RESOURCES and ui::DIR_LOCALES overrides need to be configured before calling ChromeMainDelegate::PreSandboxStartup. --- libcef/common/chrome/chrome_main_delegate_cef.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libcef/common/chrome/chrome_main_delegate_cef.cc b/libcef/common/chrome/chrome_main_delegate_cef.cc index 5212cc35c..bab6aae5e 100644 --- a/libcef/common/chrome/chrome_main_delegate_cef.cc +++ b/libcef/common/chrome/chrome_main_delegate_cef.cc @@ -376,12 +376,6 @@ void ChromeMainDelegateCef::PreSandboxStartup() { // number in the app bundle path. resource_util::OverrideUserDataDir(settings_, command_line); - ChromeMainDelegate::PreSandboxStartup(); - - // Initialize crash reporting state for this process/module. - // chrome::DIR_CRASH_DUMPS must be configured before calling this function. - crash_reporting::PreSandboxStartup(*command_line, process_type); - base::FilePath resources_dir; if (command_line->HasSwitch(switches::kResourcesDirPath)) { resources_dir = @@ -402,6 +396,12 @@ void ChromeMainDelegateCef::PreSandboxStartup() { } } + ChromeMainDelegate::PreSandboxStartup(); + + // Initialize crash reporting state for this process/module. + // chrome::DIR_CRASH_DUMPS must be configured before calling this function. + crash_reporting::PreSandboxStartup(*command_line, process_type); + #if !BUILDFLAG(IS_WIN) // Call after InitLogging() potentially changes values in // chrome/app/chrome_main_delegate.cc.