Bug 159445 - AX: Use UNLIKELY around AXObjectCache::accessibilityEnabled()
Summary: AX: Use UNLIKELY around AXObjectCache::accessibilityEnabled()
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Safari 9
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-07-05 17:22 PDT by chris fleizach
Modified: 2016-07-05 17:54 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description chris fleizach 2016-07-05 17:22:29 PDT
This is being done in some places, we could do it in more
Comment 1 Radar WebKit Bug Importer 2016-07-05 17:22:51 PDT
<rdar://problem/27185997>
Comment 2 Joanmarie Diggs (irc: joanie) 2016-07-05 17:54:22 PDT
Related to this:

There are a number of places in WebCore, but outside of the accessibility code, in which Document::existingAXObjectCache() is called without first checking AXObjectCache::accessibilityEnabled().

If the checks that are present (e.g. in RenderBlockLineLayout.cpp, RenderImage.cpp) are indeed worth doing, they are potentially also worth doing in RenderBlock.cpp and RenderWidget.cpp, and RenderText.cpp, and RenderMenuList.cpp, and .... 

Or we could instead just add a single:

    if (UNLIKELY(AXObjectCache::accessibilityEnabled()))

to Document::existingAXObjectCache().