<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - AX: Use UNLIKELY around AXObjectCache::accessibilityEnabled()"
   href="https://bugs.webkit.org/show_bug.cgi?id=159445#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - AX: Use UNLIKELY around AXObjectCache::accessibilityEnabled()"
   href="https://bugs.webkit.org/show_bug.cgi?id=159445">bug 159445</a>
              from <span class="vcard"><a class="email" href="mailto:jdiggs&#64;igalia.com" title="Joanmarie Diggs (irc: joanie) &lt;jdiggs&#64;igalia.com&gt;"> <span class="fn">Joanmarie Diggs (irc: joanie)</span></a>
</span></b>
        <pre>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().</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>