Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 001f7dbb8bbfc1f05310c7c6eed4e092d674c523
      
https://github.com/WebKit/WebKit/commit/001f7dbb8bbfc1f05310c7c6eed4e092d674c523
  Author: Brian Weinstein <[email protected]>
  Date:   2026-09-22 (Tue, 22 Sep 2026)

  Changed paths:
    M Source/WebCore/workers/service/server/SWServer.cpp
    M Source/WebCore/workers/service/server/SWServer.h
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebExtensionAPIOffscreen.mm

  Log Message:
  -----------
  [Site Isolation] Make sure unloaded/reloaded service workers are spun up in 
the same process as their clients
rdar://188018607
https://bugs.webkit.org/show_bug.cgi?id=324754

Reviewed by Timothy Hatcher.

When a service worker is unloaded and reloaded, it needs to be loaded in the 
same process as the service worker page.

Without this, the extension bindings are never injected, because the service 
worker page can't be found in the per-process
map owned by the extension.

Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebExtensionAPIOffscreen.mm

* Source/WebCore/workers/service/server/SWServer.cpp:
(WebCore::SWServer::didReconnectServiceWorkerPage):
(WebCore::SWServer::replaceContextConnectionIfNotInServiceWorkerPageProcess):
(WebCore::SWServer::removeContextConnection):
* Source/WebCore/workers/service/server/SWServer.h:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebExtensionAPIOffscreen.mm:
(TestWebKitAPI::TEST_F(WKWebExtensionAPIOffscreen, 
BackgroundServiceWorkerKeepsExtensionAPIsWhenReloadedInNewProcess)):

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



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

Reply via email to