<?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>314131</bug_id>
          
          <creation_ts>2026-05-05 15:34:39 -0700</creation_ts>
          <short_desc>[Site Isolation] Only reuse target back/forward item&apos;s process when navigating the main frame</short_desc>
          <delta_ts>2026-05-06 14:17:27 -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>New Bugs</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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="Basuke Suzuki">basuke</reporter>
          <assigned_to name="Basuke Suzuki">basuke</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2207820</commentid>
    <comment_count>0</comment_count>
    <who name="Basuke Suzuki">basuke</who>
    <bug_when>2026-05-05 15:34:39 -0700</bug_when>
    <thetext>In WebProcessPool::processForNavigationInternal, when handling a back/forward navigation, the code looks up targetItem-&gt;lastProcessIdentifier() and reuses that process for any frame — including subframes.

Under Site Isolation with multi-process BFCache enabled, subframe back/forward navigations can reach this code path. The target back/forward item&apos;s lastProcessIdentifier is always the main frame&apos;s process, so using it for a subframe navigation picks the wrong process.

Guard the lastProcessIdentifier lookup with frame.isMainFrame() so only main-frame navigations take this path. Subframe back/forward navigations fall through to the normal process-selection logic, which selects the appropriate site-matched process for the subframe.

Prep patch for rdar://173743733 (multi-process BFCache restoration under Site Isolation).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2207866</commentid>
    <comment_count>1</comment_count>
    <who name="Basuke Suzuki">basuke</who>
    <bug_when>2026-05-05 16:45:54 -0700</bug_when>
    <thetext>&lt;rdar://problem/176305015&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2207867</commentid>
    <comment_count>2</comment_count>
    <who name="Basuke Suzuki">basuke</who>
    <bug_when>2026-05-05 16:46:10 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/64311</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2208280</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-05-06 14:17:25 -0700</bug_when>
    <thetext>Committed 312735@main (4fd10b14732e): &lt;https://commits.webkit.org/312735@main&gt;

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

    </bug>

</bugzilla>