<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>296895</bug_id>
          
          <creation_ts>2025-08-04 13:45:52 -0700</creation_ts>
          <short_desc>AX: fix broken and expensive ASSERTS in accessibility code</short_desc>
          <delta_ts>2025-08-06 07:18:07 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Accessibility</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dominic Mazzoni">dm_mazzoni</reporter>
          <assigned_to name="Dominic Mazzoni">dm_mazzoni</assigned_to>
          <cc>andresg_22</cc>
    
    <cc>philn</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2134263</commentid>
    <comment_count>0</comment_count>
    <who name="Dominic Mazzoni">dm_mazzoni</who>
    <bug_when>2025-08-04 13:45:52 -0700</bug_when>
    <thetext>We have ~100 ASSERTS in WebCore/accessibility, and of those I found 6 that are broken - they&apos;re asserting on live pages - and about 10 that are called way too often, hundreds of thousands of times per minute.

If we sequester those - the broken ones and the ones called way too often - we&apos;ll be able to run release builds with assertions enabled all of the time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2134264</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-08-04 13:45:59 -0700</bug_when>
    <thetext>&lt;rdar://problem/157501091&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2134265</commentid>
    <comment_count>2</comment_count>
    <who name="Dominic Mazzoni">dm_mazzoni</who>
    <bug_when>2025-08-04 13:56:51 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/48918</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2134485</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-08-05 13:04:55 -0700</bug_when>
    <thetext>Committed 298252@main (ab66a869bd96): &lt;https://commits.webkit.org/298252@main&gt;

Reviewed commits have been landed. Closing PR #48918 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2134674</commentid>
    <comment_count>4</comment_count>
    <who name="Philippe Normand">philn</who>
    <bug_when>2025-08-06 07:12:25 -0700</bug_when>
    <thetext>This introduced new clang linux warnings:

In file included from /var/home/phil/WebKit/local-build-gtk/WebKitBuild/GTK/Release/WebCore/DerivedSources/unified-sources/UnifiedSource-aba958d6-3.cpp:7:
/var/home/phil/WebKit/Source/WebCore/accessibility/AccessibilityObject.cpp:730:18: warning: address of function &apos;isAccessibilityLogChannelEnabled&apos; will always evaluate to &apos;true&apos; [-Wpointer-bool-conversion]
  730 |         do { if (isAccessibilityLogChannelEnabled) { do { if (__builtin_expect(!!(!(isTableComponent(child) || isTableComponent(*this) || child.parentObject() == this)), 0)) do { if (LogAccessibility.state != WTFLogChannelState::Off) sd_journal_send_with_location(&quot;CODE_FILE=&quot; &quot;/var/home/phil/WebKit/Source/WebCore/accessibility/AccessibilityObject.cpp&quot;, &quot;CODE_LINE=&quot; &quot;730&quot;, __func__, &quot;WEBKIT_SUBSYSTEM=&quot; &quot;WebKitGTK&quot;, &quot;WEBKIT_CHANNEL=%s&quot;, LogAccessibility.name, &quot;PRIORITY=%i&quot;, 3, &quot;MESSAGE=&quot; &quot;BROKEN ASSERTION FAILED in %s(%d) : %s\n&quot;, &quot;/var/home/phil/WebKit/Source/WebCore/accessibility/AccessibilityObject.cpp&quot;, 730, __PRETTY_FUNCTION__, nullptr); } while (0); } while (0); } } while (0);
      |              ~~  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/home/phil/WebKit/Source/WebCore/accessibility/AccessibilityObject.cpp:730:18: note: prefix with the address-of operator to silence this warning
  730 |         do { if (isAccessibilityLogChannelEnabled) { do { if (__builtin_expect(!!(!(isTableComponent(child) || isTableComponent(*this) || child.parentObject() == this)), 0)) do { if (LogAccessibility.state != WTFLogChannelState::Off) sd_journal_send_with_location(&quot;CODE_FILE=&quot; &quot;/var/home/phil/WebKit/Source/WebCore/accessibility/AccessibilityObject.cpp&quot;, &quot;CODE_LINE=&quot; &quot;730&quot;, __func__, &quot;WEBKIT_SUBSYSTEM=&quot; &quot;WebKitGTK&quot;, &quot;WEBKIT_CHANNEL=%s&quot;, LogAccessibility.name, &quot;PRIORITY=%i&quot;, 3, &quot;MESSAGE=&quot; &quot;BROKEN ASSERTION FAILED in %s(%d) : %s\n&quot;, &quot;/var/home/phil/WebKit/Source/WebCore/accessibility/AccessibilityObject.cpp&quot;, 730, __PRETTY_FUNCTION__, nullptr); } while (0); } while (0); } } while (0);
      |                  ^
      |                  &amp;
/var/home/phil/WebKit/Source/WebCore/accessibility/AccessibilityObject.cpp:730:18: note: suffix with parentheses to turn this into a function call
  730 |         do { if (isAccessibilityLogChannelEnabled) { do { if (__builtin_expect(!!(!(isTableComponent(child) || isTableComponent(*this) || child.parentObject() == this)), 0)) do { if (LogAccessibility.state != WTFLogChannelState::Off) sd_journal_send_with_location(&quot;CODE_FILE=&quot; &quot;/var/home/phil/WebKit/Source/WebCore/accessibility/AccessibilityObject.cpp&quot;, &quot;CODE_LINE=&quot; &quot;730&quot;, __func__, &quot;WEBKIT_SUBSYSTEM=&quot; &quot;WebKitGTK&quot;, &quot;WEBKIT_CHANNEL=%s&quot;, LogAccessibility.name, &quot;PRIORITY=%i&quot;, 3, &quot;MESSAGE=&quot; &quot;BROKEN ASSERTION FAILED in %s(%d) : %s\n&quot;, &quot;/var/home/phil/WebKit/Source/WebCore/accessibility/AccessibilityObject.cpp&quot;, 730, __PRETTY_FUNCTION__, nullptr); } while (0); } while (0); } } while (0);
      |                  ^
      |                                                  ()
1 warning generated.

In file included from /var/home/phil/WebKit/local-build-gtk/WebKitBuild/GTK/Release/WebCore/DerivedSources/unified-sources/UnifiedSource-aba958d6-1.cpp:5:
/var/home/phil/WebKit/Source/WebCore/accessibility/AXObjectCache.cpp:1045:14: warning: address of function &apos;isAccessibilityLogChannelEnabled&apos; will always evaluate to &apos;true&apos; [-Wpointer-bool-conversion]
 1045 |     do { if (isAccessibilityLogChannelEnabled) { do { if (__builtin_expect(!!(!(!get(renderer))), 0)) do { if (LogAccessibility.state != WTFLogChannelState::Off) sd_journal_send_with_location(&quot;CODE_FILE=&quot; &quot;/var/home/phil/WebKit/Source/WebCore/accessibility/AXObjectCache.cpp&quot;, &quot;CODE_LINE=&quot; &quot;1045&quot;, __func__, &quot;WEBKIT_SUBSYSTEM=&quot; &quot;WebKitGTK&quot;, &quot;WEBKIT_CHANNEL=%s&quot;, LogAccessibility.name, &quot;PRIORITY=%i&quot;, 3, &quot;MESSAGE=&quot; &quot;BROKEN ASSERTION FAILED in %s(%d) : %s\n&quot;, &quot;/var/home/phil/WebKit/Source/WebCore/accessibility/AXObjectCache.cpp&quot;, 1045, __PRETTY_FUNCTION__, nullptr); } while (0); } while (0); } } while (0);
      |          ~~  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/home/phil/WebKit/Source/WebCore/accessibility/AXObjectCache.cpp:1045:14: note: prefix with the address-of operator to silence this warning
 1045 |     do { if (isAccessibilityLogChannelEnabled) { do { if (__builtin_expect(!!(!(!get(renderer))), 0)) do { if (LogAccessibility.state != WTFLogChannelState::Off) sd_journal_send_with_location(&quot;CODE_FILE=&quot; &quot;/var/home/phil/WebKit/Source/WebCore/accessibility/AXObjectCache.cpp&quot;, &quot;CODE_LINE=&quot; &quot;1045&quot;, __func__, &quot;WEBKIT_SUBSYSTEM=&quot; &quot;WebKitGTK&quot;, &quot;WEBKIT_CHANNEL=%s&quot;, LogAccessibility.name, &quot;PRIORITY=%i&quot;, 3, &quot;MESSAGE=&quot; &quot;BROKEN ASSERTION FAILED in %s(%d) : %s\n&quot;, &quot;/var/home/phil/WebKit/Source/WebCore/accessibility/AXObjectCache.cpp&quot;, 1045, __PRETTY_FUNCTION__, nullptr); } while (0); } while (0); } } while (0);
      |              ^
      |              &amp;
/var/home/phil/WebKit/Source/WebCore/accessibility/AXObjectCache.cpp:1045:14: note: suffix with parentheses to turn this into a function call
 1045 |     do { if (isAccessibilityLogChannelEnabled) { do { if (__builtin_expect(!!(!(!get(renderer))), 0)) do { if (LogAccessibility.state != WTFLogChannelState::Off) sd_journal_send_with_location(&quot;CODE_FILE=&quot; &quot;/var/home/phil/WebKit/Source/WebCore/accessibility/AXObjectCache.cpp&quot;, &quot;CODE_LINE=&quot; &quot;1045&quot;, __func__, &quot;WEBKIT_SUBSYSTEM=&quot; &quot;WebKitGTK&quot;, &quot;WEBKIT_CHANNEL=%s&quot;, LogAccessibility.name, &quot;PRIORITY=%i&quot;, 3, &quot;MESSAGE=&quot; &quot;BROKEN ASSERTION FAILED in %s(%d) : %s\n&quot;, &quot;/var/home/phil/WebKit/Source/WebCore/accessibility/AXObjectCache.cpp&quot;, 1045, __PRETTY_FUNCTION__, nullptr); } while (0); } while (0); } } while (0);
      |              ^
      |                                              ()
In file included from /var/home/phil/WebKit/local-build-gtk/WebKitBuild/GTK/Release/WebCore/DerivedSources/unified-sources/UnifiedSource-aba958d6-1.cpp:7:
/var/home/phil/WebKit/Source/WebCore/accessibility/AXSearchManager.cpp:246:18: warning: address of function &apos;isAccessibilityLogChannelEnabled&apos; will always evaluate to &apos;true&apos; [-Wpointer-bool-conversion]
  246 |         do { if (isAccessibilityLogChannelEnabled) { do { if (__builtin_expect(!!(!(is&lt;AccessibilityObject&gt;(startObject))), 0)) do { if (LogAccessibility.state != WTFLogChannelState::Off) sd_journal_send_with_location(&quot;CODE_FILE=&quot; &quot;/var/home/phil/WebKit/Source/WebCore/accessibility/AXSearchManager.cpp&quot;, &quot;CODE_LINE=&quot; &quot;246&quot;, __func__, &quot;WEBKIT_SUBSYSTEM=&quot; &quot;WebKitGTK&quot;, &quot;WEBKIT_CHANNEL=%s&quot;, LogAccessibility.name, &quot;PRIORITY=%i&quot;, 3, &quot;MESSAGE=&quot; &quot;BROKEN ASSERTION FAILED in %s(%d) : %s\n&quot;, &quot;/var/home/phil/WebKit/Source/WebCore/accessibility/AXSearchManager.cpp&quot;, 246, __PRETTY_FUNCTION__, nullptr); } while (0); } while (0); } } while (0);
      |              ~~  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/home/phil/WebKit/Source/WebCore/accessibility/AXSearchManager.cpp:246:18: note: prefix with the address-of operator to silence this warning
  246 |         do { if (isAccessibilityLogChannelEnabled) { do { if (__builtin_expect(!!(!(is&lt;AccessibilityObject&gt;(startObject))), 0)) do { if (LogAccessibility.state != WTFLogChannelState::Off) sd_journal_send_with_location(&quot;CODE_FILE=&quot; &quot;/var/home/phil/WebKit/Source/WebCore/accessibility/AXSearchManager.cpp&quot;, &quot;CODE_LINE=&quot; &quot;246&quot;, __func__, &quot;WEBKIT_SUBSYSTEM=&quot; &quot;WebKitGTK&quot;, &quot;WEBKIT_CHANNEL=%s&quot;, LogAccessibility.name, &quot;PRIORITY=%i&quot;, 3, &quot;MESSAGE=&quot; &quot;BROKEN ASSERTION FAILED in %s(%d) : %s\n&quot;, &quot;/var/home/phil/WebKit/Source/WebCore/accessibility/AXSearchManager.cpp&quot;, 246, __PRETTY_FUNCTION__, nullptr); } while (0); } while (0); } } while (0);
      |                  ^
      |                  &amp;
/var/home/phil/WebKit/Source/WebCore/accessibility/AXSearchManager.cpp:246:18: note: suffix with parentheses to turn this into a function call
  246 |         do { if (isAccessibilityLogChannelEnabled) { do { if (__builtin_expect(!!(!(is&lt;AccessibilityObject&gt;(startObject))), 0)) do { if (LogAccessibility.state != WTFLogChannelState::Off) sd_journal_send_with_location(&quot;CODE_FILE=&quot; &quot;/var/home/phil/WebKit/Source/WebCore/accessibility/AXSearchManager.cpp&quot;, &quot;CODE_LINE=&quot; &quot;246&quot;, __func__, &quot;WEBKIT_SUBSYSTEM=&quot; &quot;WebKitGTK&quot;, &quot;WEBKIT_CHANNEL=%s&quot;, LogAccessibility.name, &quot;PRIORITY=%i&quot;, 3, &quot;MESSAGE=&quot; &quot;BROKEN ASSERTION FAILED in %s(%d) : %s\n&quot;, &quot;/var/home/phil/WebKit/Source/WebCore/accessibility/AXSearchManager.cpp&quot;, 246, __PRETTY_FUNCTION__, nullptr); } while (0); } while (0); } } while (0);
      |                  ^
      |                                                  ()
2 warnings generated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2134678</commentid>
    <comment_count>5</comment_count>
    <who name="Philippe Normand">philn</who>
    <bug_when>2025-08-06 07:18:07 -0700</bug_when>
    <thetext>https://github.com/WebKit/WebKit/pull/49007</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>