From 8e0c2ff1d1cf7daf9aec7bc7bfb32e8b84ce741c Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Tue, 4 Jun 2024 11:46:52 -0400 Subject: [PATCH] win: Enable WinSboxNoFakeGdiInit for Debug component builds (see #3708) The WinSboxNoFakeGdiInit feature requires delayload of all DLLs that might load user32.dll in the renderer process. It's enabled as a field trial for all non-Official builds, but caused problems with Debug component builds using VS 17.5.0 due to MSVCP140D.dll depending on OLE32.DLL (which depends on user32.dll). The dependency on OLE32.DLL is removed with VS 17.9.2 so the feature can now be enabled. See https://crbug.com/326277735#comment39 for background. --- libcef/common/chrome/chrome_main_delegate_cef.cc | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/libcef/common/chrome/chrome_main_delegate_cef.cc b/libcef/common/chrome/chrome_main_delegate_cef.cc index 9189d1341..5212cc35c 100644 --- a/libcef/common/chrome/chrome_main_delegate_cef.cc +++ b/libcef/common/chrome/chrome_main_delegate_cef.cc @@ -35,8 +35,6 @@ #include "cef/libcef/common/util_mac.h" #elif BUILDFLAG(IS_POSIX) #include "cef/libcef/common/util_linux.h" -#elif BUILDFLAG(IS_WIN) -#include "sandbox/policy/features.h" #endif namespace { @@ -324,15 +322,6 @@ std::optional ChromeMainDelegateCef::BasicStartupComplete() { disable_features.push_back(base::kEnableHangWatcher.name); } -#if BUILDFLAG(IS_WIN) && (defined(COMPONENT_BUILD) || !defined(NDEBUG)) - // Disable WinSboxNoFakeGdiInit for component and Debug builds. It causes - // renderer processes to crash with STATUS_DLL_INIT_FAILED. This is - // currently enabled via a field trial for non-Official builds. - // See https://crbug.com/326277735#comment37. - disable_features.push_back( - sandbox::policy::features::kWinSboxNoFakeGdiInit.name); -#endif - if (!disable_features.empty()) { DCHECK(!base::FeatureList::GetInstance()); std::string disable_features_str =