Commit 2b52a1af authored by Reilly Grant's avatar Reilly Grant Committed by Commit Bot

[password_manager] Boost priority while calling NetUserGetInfo()

This may be the first time that a function from Netapi32.dll has been
called and so the dynamic loader lock may be held while this library is
initialized. Since this call occurs on a low priority background thread
this can cause other threads which need to load libraries or look up
function addressed to hang while they wait for the lock.

Noticed in crash/b4a7bd8445afe9f3.

Bug: 973868
Change-Id: I6604971ac9d95f626690ed043141631d5a907995
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2216716
Auto-Submit: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Vasilii Sukhanov <vasilii@chromium.org>
Reviewed-by: default avatarVasilii Sukhanov <vasilii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772242}
parent 28ba379a
......@@ -209,6 +209,10 @@ void PasswordCheckPrefs::Write(PrefService* local_state) {
}
int64_t GetPasswordLastChanged(const WCHAR* username) {
// Mitigate the issues caused by loading DLLs on a background thread
// (http://crbug/973868).
SCOPED_MAY_LOAD_LIBRARY_AT_BACKGROUND_PRIORITY();
LPUSER_INFO_1 user_info = NULL;
DWORD age = 0;
......
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