<?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>314129</bug_id>
          
          <creation_ts>2026-05-05 15:34:25 -0700</creation_ts>
          <short_desc>Only update page main frame&apos;s process in ProvisionalPageProxy::didCommitLoadForFrame when committing the main frame itself</short_desc>
          <delta_ts>2026-05-06 14:34:28 -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>2207818</commentid>
    <comment_count>0</comment_count>
    <who name="Basuke Suzuki">basuke</who>
    <bug_when>2026-05-05 15:34:25 -0700</bug_when>
    <thetext>In ProvisionalPageProxy::didCommitLoadForFrame, the code assigns the provisional page&apos;s FrameProcess to the underlying page&apos;s main frame when the frame process has changed:

    bool frameProcessChanged = m_frameProcess.ptr() != pageMainFrameProcess.ptr();
    if (frameProcessChanged)
        pageMainFrame-&gt;setProcess(m_frameProcess);

This assignment is only correct when the provisional commit is for the page&apos;s main frame itself. Under Site Isolation, a provisional page may commit for a different frame (e.g., during a multi-process BFCache restoration), in which case overwriting the page main frame&apos;s FrameProcess with the provisional&apos;s FrameProcess is incorrect — it leaves the real main frame pointing to the wrong process.

Guard the setProcess call with &apos;pageMainFrame == m_mainFrame&apos; so we only update the process when the provisional owns the page main frame. In paths where the provisional is for the main frame (the common case), this is a no-op.

Prep patch for rdar://173743733 (multi-process BFCache restoration under Site Isolation).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2207862</commentid>
    <comment_count>1</comment_count>
    <who name="Basuke Suzuki">basuke</who>
    <bug_when>2026-05-05 16:43:17 -0700</bug_when>
    <thetext>&lt;rdar://problem/176305054&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2207864</commentid>
    <comment_count>2</comment_count>
    <who name="Basuke Suzuki">basuke</who>
    <bug_when>2026-05-05 16:43:38 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/64310</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2208289</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-05-06 14:34:26 -0700</bug_when>
    <thetext>Committed 312737@main (64bbad66316c): &lt;https://commits.webkit.org/312737@main&gt;

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

    </bug>

</bugzilla>