Closed Bug 1860941 Opened 1 year ago Closed 1 year ago

Don't call GetProp in LazyInstantiator::EnableBlindAggregation if a11y is enabled

Categories

(Core :: Disability Access APIs, task)

Desktop
Windows
task

Tracking

()

RESOLVED FIXED
121 Branch
Tracking Status
firefox121 --- fixed

People

(Reporter: Jamie, Assigned: Jamie)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

When a11y is disabled, LazyInstantiator::GetRootAccessible will return a LazyInstantiator instead of a real MsaaRootAccessible. It disables blind aggregation temporarily when it does this so that COM interface marshaling can occur without unintentionally instantiating a11y. Once marshaling is done, nsWindow calls EnableBlindAggregation to re-enable it. EnableBlindAggregation needs to query the HWND to get its associated LazyInstantiator. It does this using GetProp.

I've seen this GetProp call show up in profiles when clients are responding to a flood of events. But once a11y is enabled, GetRootAccessible returns a real MsaaRootAccessible anyway, not a LazyInstantiator. Therefore, there's no reason for EnableBlindAggregation to call GetProp at all because there's no LazyInstantiator to enable blind aggregation for.

We should just return early in this case and avoid the GetProp call.

Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/38841aca565f Don't pointlessly call GetProp in EnableBlindAggregation if there's no LazyInstantiator on which blind aggregation needs to be enabled. r=morgan
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: