<?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>311114</bug_id>
          
          <creation_ts>2026-03-30 09:32:23 -0700</creation_ts>
          <short_desc>AX: ASSERTION FAILED on AXIsolatedTree.cpp:249 when running http/tests/site-isolation/accessibility/client/simple-iframe.html</short_desc>
          <delta_ts>2026-04-08 15:38:36 -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>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2195194</commentid>
    <comment_count>0</comment_count>
    <who name="Dominic Mazzoni">dm_mazzoni</who>
    <bug_when>2026-03-30 09:32:23 -0700</bug_when>
    <thetext>I intermittently hit this assertion failure when running http/tests/site-isolation/accessibility/client/simple-iframe.html, which tests accessibility with site isolation. By fiddling with the test timing I was able to reproduce it reliably.

ASSERTION FAILED: AX: After applying pending root node, 15 reachable nodes but 17 are in the node map
reachableNodes.size() == m_readerThreadNodeMap.size()
/Volumes/Code/safari/OpenSource/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp(249) : void WebCore::AXIsolatedTree::applyPendingRootNodeLocked()
1   WebCore::AXIsolatedTree::applyPendingRootNodeLocked()
2   WebCore::AXIsolatedTree::applyPendingChangesLocked()
3   WebCore::AXIsolatedTree::applyPendingChanges()

The bug happens when the in-process FrameHost (AccessibilityScrollView) is replaced with the out-of-process FrameHost, and then the FrameHost ends up in both m_pendingSubtreeRemovals and m_pendingAppends in applyPendingChangesLocked.

We never hit this before because it doesn&apos;t happen with DOM nodes or LayoutObjects - if the old object was removed from the AX cache, then it won&apos;t end up in m_pendingAppends. In this case both the old Widget and the new Widget exist, so the assertion is telling us we&apos;re leaking the old isolated objects.

With this fix, http/tests/site-isolation/accessibility/client/simple-iframe.html can be enabled.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2195195</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-03-30 09:32:30 -0700</bug_when>
    <thetext>&lt;rdar://problem/173698630&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2195208</commentid>
    <comment_count>2</comment_count>
    <who name="Dominic Mazzoni">dm_mazzoni</who>
    <bug_when>2026-03-30 10:26:39 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/61704</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2198129</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-04-08 15:38:35 -0700</bug_when>
    <thetext>Committed 310800@main (8c8159f34720): &lt;https://commits.webkit.org/310800@main&gt;

Reviewed commits have been landed. Closing PR #61704 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>