Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7223c62c181adfde7ae62a19d8ff5b4b5907ccc3
      
https://github.com/WebKit/WebKit/commit/7223c62c181adfde7ae62a19d8ff5b4b5907ccc3
  Author: Sihui Liu <[email protected]>
  Date:   2026-06-29 (Mon, 29 Jun 2026)

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

  Log Message:
  -----------
  [Site Isolation][Debug] Fix 
TestWebKitAPI.SiteIsolation.DrawAfterNavigateToDomainAgain
https://bugs.webkit.org/show_bug.cgi?id=317965
rdar://180757482

Reviewed by Basuke Suzuki.

When site isolation is on but the back/forward cache is not actually in use, 
SuspendedPageProxy can still be created
with a null m_suspendedFrameItemID (e.g. to delay tearing down the old page and 
avoid a white flash during navigation)
In this case suspendSubframeProcesses() is never called, so subframe processes 
never receive addSuspendedPageProxy().
However, teardown() unconditionally iterated over all remote pages in the 
BrowsingContextGroup and called
removeSuspendedPageProxy() on each of their processes, hitting assertion 
m_suspendedPages.contains(suspendedPage).

Fix by guarding the loop with m_suspendedFrameItemID: if it is not set, 
suspendSubframeProcesses() was never called and
there is nothing to clean up in subframe processes. Within the loop, mirror the 
hasSubframeInProcess() filter from
suspendSubframeProcesses() so that only processes that actually received 
addSuspendedPageProxy() get the matching
removeSuspendedPageProxy().

* Source/WebKit/UIProcess/SuspendedPageProxy.cpp:
(WebKit::SuspendedPageProxy::teardown):

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



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

Reply via email to