Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 733ef2764b021031b2789c7664379615f1f479a4
      
https://github.com/WebKit/WebKit/commit/733ef2764b021031b2789c7664379615f1f479a4
  Author: Dominic Mazzoni <[email protected]>
  Date:   2026-09-02 (Wed, 02 Sep 2026)

  Changed paths:
    A 
LayoutTests/accessibility/mac/client/isolated-tree-after-navigation-expected.txt
    A LayoutTests/accessibility/mac/client/isolated-tree-after-navigation.html
    A 
LayoutTests/accessibility/mac/client/resources/isolated-tree-after-navigation-second.html
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp

  Log Message:
  -----------
  AX: isolated tree can serve old page's content after navigation
https://bugs.webkit.org/show_bug.cgi?id=323182
rdar://186427494

Reviewed by Tyler Wilcock.

In-between queueForDestruction and applyPendingChangesOrTearDown, if
accessibilityRootObjectWrapper got called it applied pending changes
and cleared m_hasPendingChanges, which prevented it from being torn
down.

The stale tree then kept the bug alive on its own: because
m_isolatedTree only clears when the tree dies, and because a
non-null tree short-circuits the off-main-thread fast path, the
main-thread path that would have built a replacement tree was
never reached again.

The fix is to check m_queuedForDestruction first, so teardown does not
depend on a flag any other thread can consume.

Test: accessibility/mac/client/isolated-tree-after-navigation.html

* 
LayoutTests/accessibility/mac/client/isolated-tree-after-navigation-expected.txt:
 Added.
* LayoutTests/accessibility/mac/client/isolated-tree-after-navigation.html: 
Added.
* 
LayoutTests/accessibility/mac/client/resources/isolated-tree-after-navigation-second.html:
 Added.
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::applyPendingChangesOrTearDown):

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



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

Reply via email to