Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4fd10b14732ed05b6c2561ca97308a40a5032202
      
https://github.com/WebKit/WebKit/commit/4fd10b14732ed05b6c2561ca97308a40a5032202
  Author: Basuke Suzuki <[email protected]>
  Date:   2026-05-06 (Wed, 06 May 2026)

  Changed paths:
    M Source/WebKit/UIProcess/WebProcessPool.cpp

  Log Message:
  -----------
  [Site Isolation] Only reuse target back/forward item's process when 
navigating the main frame
https://bugs.webkit.org/show_bug.cgi?id=314131
rdar://176305015

Reviewed by Sihui Liu.

In WebProcessPool::processForNavigationInternal, back/forward
navigations try to reuse the process associated with the target
history item. Two strategies: reuse the SuspendedPageProxy's process
for a BFCache restore, or fall back to the process that last rendered
the item (targetItem->lastProcessIdentifier()). Both reference
page-level state tied to the main frame — the SuspendedPage is the
main frame's BFCache entry, and lastProcessIdentifier is the main
frame's process.

Taking this block for a subframe navigation picks the wrong process.
Move frame.isMainFrame() into the outer condition so only main-frame
back/forward navigations enter this block; subframes fall through to
the normal site-based selection below.

In paths reachable today (Site Isolation disabled), subframes and the
main frame share a process, so this is a no-op. With Site Isolation +
multi-process BFCache (introduced in a follow-up patch), subframes
reach this path and the guard is load-bearing.

* Source/WebKit/UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForNavigationInternal):

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



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

Reply via email to