Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4e7754ef16e98b6e1d826786245b97bdf9e9e734
      
https://github.com/WebKit/WebKit/commit/4e7754ef16e98b6e1d826786245b97bdf9e9e734
  Author: Youenn Fablet <[email protected]>
  Date:   2026-01-14 (Wed, 14 Jan 2026)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/static-router-race-network-and-fetch-handler.https-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/static-router-subresource.https-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/tentative/static-router/static-router-resource-timing.https-expected.txt
    M Source/WebCore/workers/service/InstallEvent.cpp
    M Source/WebCore/workers/service/RouterSourceEnum.h
    M Source/WebCore/workers/service/RouterSourceEnum.idl
    M Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp
    M Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h
    M Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in

  Log Message:
  -----------
  Add support for race-network-and-fetch-handler service worker router source
rdar://167982454
https://bugs.webkit.org/show_bug.cgi?id=305324

Reviewed by Chris Dumez.

We reuse the service worker preloader to implement 
race-network-and-fetch-handler.
When receiving a response from the preloader, we use it and stop listening to 
the fetch event handler.
Conversely, when receiving a response from the fetch event handler, we cancel 
the preloader.
This allows to select the fastest route.

We update InstallEvent::addRoutes to check for fetch event registration in case 
of race-network-and-fetch-handler route, and fix a potential use-after-move.

We update the IDL to accept race-network-and-fetch-handler and we update 
InstallEvent::addRoutes according the spec.
Covered by existing WPT tests.

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



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

Reply via email to