Bug 1860941: Don't pointlessly call GetProp in EnableBlindAggregation if there's no LazyInstantiator on which blind aggregation needs to be enabled. r=morgan

Differential Revision: https://phabricator.services.mozilla.com/D191812
This commit is contained in:
James Teh 2023-10-25 22:58:15 +00:00
parent 2cc42dc9c8
commit 6ac2a29689

View File

@ -112,6 +112,14 @@ already_AddRefed<IAccessible> LazyInstantiator::GetRootAccessible(HWND aHwnd) {
*/
/* static */
void LazyInstantiator::EnableBlindAggregation(HWND aHwnd) {
if (GetAccService()) {
// The accessibility service is already running. That means that
// LazyInstantiator::GetRootAccessible returned the real MsaaRootAccessible,
// rather than returning a LazyInstantiator with blind aggregation disabled.
// Thus, we have nothing to do here.
return;
}
LazyInstantiator* existingInstantiator = reinterpret_cast<LazyInstantiator*>(
::GetProp(aHwnd, kLazyInstantiatorProp));