cefclient: win: Fix delayload of user32.dll

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 appears to only work with
non-component Release builds. See https://crbug.com/326277735
This commit is contained in:
Marshall Greenblatt
2024-05-24 10:54:37 -04:00
parent bd1e188c77
commit 5fe6382906
4 changed files with 46 additions and 16 deletions

View File

@@ -324,10 +324,11 @@ std::optional<int> ChromeMainDelegateCef::BasicStartupComplete() {
disable_features.push_back(base::kEnableHangWatcher.name);
}
#if BUILDFLAG(IS_WIN) && !defined(OFFICIAL_BUILD)
// Disable WinSboxNoFakeGdiInit which causes the 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#comment23.
#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