Bug 1853627 - Preload ole32.dll only on NS_FREE_PERMANENT_DATA r=bobowen

Differential Revision: https://phabricator.services.mozilla.com/D188608
This commit is contained in:
Alexandre Lissy 2023-09-19 16:18:58 +00:00
parent 5e99494bdd
commit 67cbfc151a

View File

@ -81,8 +81,11 @@ void UtilityAudioDecoderParent::WMFPreloadForSandbox() {
#if defined(MOZ_SANDBOX) && defined(XP_WIN)
// mfplat.dll and mf.dll will be preloaded by
// wmf::MediaFoundationInitializer::HasInitialized()
# if defined(NS_FREE_PERMANENT_DATA)
// WMF Shutdown requires this or it will badly crash
UtilityProcessImpl::LoadLibraryOrCrash(L"ole32.dll");
# endif // defined(NS_FREE_PERMANENT_DATA)
auto rv = wmf::MediaFoundationInitializer::HasInitialized();
if (!rv) {