Bug 1546156: Don't forcibly load user32 when win32k lockdown is enabled. r=aklotz

Differential Revision: https://phabricator.services.mozilla.com/D107498
This commit is contained in:
Bob Owen 2021-03-09 08:35:07 +00:00
Родитель 0066fab260
Коммит 86def8279e
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -20,6 +20,7 @@
#include "mozilla/TimeStamp.h"
#include "mozilla/UniquePtr.h"
#include "mozilla/Vector.h"
#include "mozilla/WindowsProcessMitigations.h"
#include "mozilla/WindowsVersion.h"
#include "mozilla/WinHeaderOnlyUtils.h"
#include "nsWindowsHelpers.h"
@ -672,7 +673,7 @@ MFBT_API void DllBlocklist_Initialize(uint32_t aInitFlags) {
// If someone injects a thread early that causes user32.dll to load off the
// main thread this causes issues, so load it as soon as we've initialized
// the block-list. (See bug 1400637)
if (!sUser32BeforeBlocklist) {
if (!sUser32BeforeBlocklist && !IsWin32kLockedDown()) {
::LoadLibraryW(L"user32.dll");
}