pin user32 on startup

https://chromium-review.googlesource.com/c/chromium/src/+/1551709

Loading it later causes a blocking call where blocking calls aren't allowed.
This commit is contained in:
Jeremy Apthorp
2019-05-14 15:42:39 -07:00
committed by deepak1556
parent 2ba3a26785
commit c957215854

View File

@@ -47,6 +47,10 @@
#include "atom/app/atom_main_delegate_mac.h"
#endif
#if defined(OS_WIN)
#include "base/win/win_util.h"
#endif
namespace atom {
namespace {
@@ -181,6 +185,9 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
// Disable the ActiveVerifier, which is used by Chrome to track possible
// bugs, but no use in Electron.
base::win::DisableHandleVerifier();
if (IsBrowserProcess(command_line))
base::win::PinUser32();
#endif
content_client_ = std::make_unique<AtomContentClient>();