Commit 34c05bfa authored by Bruce Dawson's avatar Bruce Dawson Committed by Chromium LUCI CQ

Pin shell32.dll in ppapi processes

Due to an OS bug shell32.dll may get unloaded while still in use.
Pinning shell32.dll avoids this and the associated crashes with no
downside.

This is an expansion of the fix in crrev.com/c/2505835

Bug: 1076771
Change-Id: I89153998a5dabb345db0435877201de771a60b5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2588012Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#836825}
parent d508d81e
......@@ -68,6 +68,11 @@ int PpapiPluginMain(const MainFunctionParams& parameters) {
const base::CommandLine& command_line = parameters.command_line;
#if defined(OS_WIN)
// https://crbug.com/1139752 Premature unload of shell32 caused process to
// crash during process shutdown.
HMODULE shell32_pin = ::LoadLibrary(L"shell32.dll");
UNREFERENCED_PARAMETER(shell32_pin);
g_target_services = parameters.sandbox_info->target_services;
#endif
......
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