Commit 7eb40fe9 authored by Stefan Smolen's avatar Stefan Smolen Committed by Commit Bot

Pin shell32.dll in utility processes

This is a change we made to Edge to pin shell32.dll so it will not be
unloaded, due to an OS bug where it would be unloaded while still in
use.

Bug: 1076771,1075487,1139752
Change-Id: I836ddb663ca6d76984186306023ec2a47f9d8fdf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2505835Reviewed-by: default avatarBruce Dawson <brucedawson@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Stefan Smolen <ssmole@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#822884}
parent e74f8e44
......@@ -155,6 +155,12 @@ int UtilityMain(const MainFunctionParams& parameters) {
#if defined(OS_WIN)
auto sandbox_type =
sandbox::policy::SandboxTypeFromCommandLine(parameters.command_line);
// https://crbug.com/1076771 https://crbug.com/1075487 Premature unload of
// shell32 caused process to crash during process shutdown.
HMODULE shell32_pin = ::LoadLibrary(L"shell32.dll");
UNREFERENCED_PARAMETER(shell32_pin);
if (!sandbox::policy::IsUnsandboxedSandboxType(sandbox_type) &&
sandbox_type != sandbox::policy::SandboxType::kCdm) {
if (!g_utility_target_services)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment