Bug 1562948: Use a multi-threaded apartment inside AnnotateWMIData_ThreadStart; r=mhowell

Using a single-threaded apartment creates a race condition that triggers a
crash in a11y when it hooks InSendMessageEx. Since we're on a background thread,
we don't have a strongly compelling reason to use an STA when an MTA will work
just fine.

Differential Revision: https://phabricator.services.mozilla.com/D36677

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Aaron Klotz 2019-07-02 22:22:32 +00:00
parent c92947ecc6
commit 4a0b496713

View File

@ -3601,15 +3601,12 @@ static void AnnotateWMIData() {
}
static void PR_CALLBACK AnnotateWMIData_ThreadStart(void*) {
HRESULT hr = CoInitialize(nullptr);
if (FAILED(hr)) {
mscom::MTARegion mta;
if (!mta.IsValid()) {
return;
}
AnnotateWMIData();
CoUninitialize();
}
#endif // XP_WIN