Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8a2ed1e825c63b12df77348e9be0ba3ac22ab93c
      
https://github.com/WebKit/WebKit/commit/8a2ed1e825c63b12df77348e9be0ba3ac22ab93c
  Author: David Kilzer <[email protected]>
  Date:   2026-07-20 (Mon, 20 Jul 2026)

  Changed paths:
    M Source/WebKit/UIProcess/RemotePageProxy.cpp
    M Source/WebKit/UIProcess/RemotePageProxy.h

  Log Message:
  -----------
  REGRESSION(309528@main): [Site Isolation] RemotePageProxy is referenced 
before adoptRef() during construction
<https://bugs.webkit.org/show_bug.cgi?id=319735>
<rdar://182576177>

Reviewed by Alex Christensen.

RemotePageProxy::create() adopts the object with adoptRef(), but its
constructor calls WebPageProxy::didCreateRemotePage(), which takes a
foreground process activity that can flip the process throttle state
and re-enter WebProcessProxy to take a Ref to the still-unadopted
object.  This trips the Debug RefCountDebugger assertion
`!m_adoptionIsRequired`.

Fix the Debug assertion by moving the object's self-registration and
process-activity setup out of the constructor into
initializeAfterAdoption(), which create() runs after adoptRef() has
taken ownership.

Covered by existing tests in Debug:

    TestWebKitAPI.SiteIsolation.IframeRedirectCrossSite
    TestWebKitAPI.SiteIsolation.IframeRedirectSameSite
    TestWebKitAPI.SiteIsolation.MultipleReloads
    TestWebKitAPI.SiteIsolation.NavigationWithIFrames
    TestWebKitAPI.SiteIsolation.ProcessReuse
    TestWebKitAPI.SiteIsolation.ReuseConfiguration
    TestWebKitAPI.SiteIsolation.WebsitePoliciesCustomUserAgent
    
TestWebKitAPI.SiteIsolation.WebsitePoliciesCustomUserAgentDuringCrossSiteProvisionalNavigation

* Source/WebKit/UIProcess/RemotePageProxy.cpp:
(WebKit::RemotePageProxy::create):
(WebKit::RemotePageProxy::RemotePageProxy):
(WebKit::RemotePageProxy::initializeAfterAdoption): Add.
* Source/WebKit/UIProcess/RemotePageProxy.h:
(WebKit::RemotePageProxy::initializeAfterAdoption): Add.

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



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

Reply via email to