From 1eff0baf946a56eca05b285f421d39ac474cbf33 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Thu, 23 Jun 2022 13:59:09 +0300 Subject: [PATCH] Windows: Fix AssertBlockingAllowed failure in GetAzureADJoinStateStorage (fixes issue #3342) --- libcef/browser/alloy/alloy_browser_main.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libcef/browser/alloy/alloy_browser_main.cc b/libcef/browser/alloy/alloy_browser_main.cc index f8adaba12..02dc89b39 100644 --- a/libcef/browser/alloy/alloy_browser_main.cc +++ b/libcef/browser/alloy/alloy_browser_main.cc @@ -55,6 +55,7 @@ #include "ui/wm/core/wm_state.h" #if BUILDFLAG(IS_WIN) +#include "base/enterprise_util.h" #include "chrome/browser/chrome_browser_main_win.h" #include "chrome/browser/win/parental_controls.h" #endif @@ -308,7 +309,13 @@ int AlloyBrowserMainParts::PreMainMessageLoopRun() { // Windows parental controls calls can be slow, so we do an early init here // that calculates this value off of the UI thread. InitializeWinParentalControls(); -#endif + + // These methods may call LoadLibrary and could trigger + // AssertBlockingAllowed() failures if executed at a later time on the UI + // thread. + base::IsManagedDevice(); + base::IsEnterpriseDevice(); +#endif // BUILDFLAG(IS_WIN) // Triggers initialization of the singleton instance on UI thread. PluginFinder::GetInstance();