Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: afc5c2a4647ccacf4755d91a618f042609142768
      
https://github.com/WebKit/WebKit/commit/afc5c2a4647ccacf4755d91a618f042609142768
  Author: Elika Etemad <[email protected]>
  Date:   2026-09-30 (Wed, 30 Sep 2026)

  Changed paths:
    A 
LayoutTests/accessibility/select-reload-unignored-content-object-count-crash-expected.txt
    A 
LayoutTests/accessibility/select-reload-unignored-content-object-count-crash.html
    M Source/WebCore/accessibility/AXObjectCache.cpp
    M Source/WebCore/accessibility/AXObjectCache.h
    M Source/WebCore/accessibility/AccessibilityObject.cpp

  Log Message:
  -----------
  ~AccessibilityObject() incorrectly decrements m_unignoredContentObjectCount
https://bugs.webkit.org/show_bug.cgi?id=325708
rdar://187406629

Reviewed by Tyler Wilcock.

The destructor decremented the count whenever cachedIsIgnored() was empty,
but empty means the ignored state was never computed -- so the object was
never counted. It therefore skipped the objects that were actually counted
(unignored), and decremented ones that weren't, underflowing the unsigned
count and firing the AX_ASSERT in decrementUnignoredContentObjectCount().

This patch cleans up the increment/decrement handling to be more consistent.

* 
LayoutTests/accessibility/select-reload-unignored-content-object-count-crash-expected.txt:
 Added.
* 
LayoutTests/accessibility/select-reload-unignored-content-object-count-crash.html:
 Added.
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::isCounted const):
(WebCore::AXObjectCache::reconcileCount):
(WebCore::AXObjectCache::handleRoleChanged):
* Source/WebCore/accessibility/AXObjectCache.h:
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::~AccessibilityObject):
(WebCore::AccessibilityObject::isIgnoredWithoutCache const):

Canonical link: https://commits.webkit.org/322348@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to