Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 01a643acd37aaf87c26ee65dc46250df3eb9eb0c
      
https://github.com/WebKit/WebKit/commit/01a643acd37aaf87c26ee65dc46250df3eb9eb0c
  Author: Youenn Fablet <you...@apple.com>
  Date:   2024-06-21 (Fri, 21 Jun 2024)

  Changed paths:
    M Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp
    M Source/WebCore/workers/service/ServiceWorkerGlobalScope.h
    M Source/WebCore/workers/service/context/ServiceWorkerFetch.cpp
    M Source/WebCore/workers/service/context/ServiceWorkerFetch.h
    M Source/WebCore/workers/service/context/ServiceWorkerThread.cpp
    M Source/WebCore/workers/service/context/ServiceWorkerThread.h
    M Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.cpp
    M Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.h
    M Source/WebKit/WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp
    M Source/WebKit/WebProcess/Storage/WebServiceWorkerFetchTaskClient.h

  Log Message:
  -----------
  Stop storing FetchEvent in WebServiceWorkerFetchTaskClient
rdar://129926640
https://bugs.webkit.org/show_bug.cgi?id=275610

Reviewed by Chris Dumez.

We do not want to extend the lifetime of FetchEvents, so we mvoe them out of 
WebServiceWorkerFetchTaskClient.
Instead we store the ongoing fetch tasks in ServiceWorkerGlobalScope (both 
WebServiceWorkerFetchTaskClient and FetchEvent).
And we handle navigation preloads from there.

Covered by existing tests.

* Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp:
(WebCore::ServiceWorkerGlobalScope::skipWaiting):
(WebCore::ServiceWorkerGlobalScope::prepareForDestruction):
(WebCore::ServiceWorkerGlobalScope::addFetchTask):
(WebCore::ServiceWorkerGlobalScope::addFetchEvent):
(WebCore::ServiceWorkerGlobalScope::removeFetchTask):
(WebCore::ServiceWorkerGlobalScope::fetchTask):
(WebCore::ServiceWorkerGlobalScope::takeFetchTask):
(WebCore::ServiceWorkerGlobalScope::hasFetchTask const):
(WebCore::ServiceWorkerGlobalScope::navigationPreloadFailed):
(WebCore::ServiceWorkerGlobalScope::navigationPreloadIsReady):
* Source/WebCore/workers/service/ServiceWorkerGlobalScope.h:
* Source/WebCore/workers/service/context/ServiceWorkerFetch.cpp:
(WebCore::ServiceWorkerFetch::dispatchFetchEvent):
* Source/WebCore/workers/service/context/ServiceWorkerFetch.h:
* Source/WebCore/workers/service/context/ServiceWorkerThread.cpp:
(WebCore::ServiceWorkerThread::queueTaskToFireFetchEvent):
* Source/WebCore/workers/service/context/ServiceWorkerThread.h:
* Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.cpp:
(WebCore::ServiceWorkerThreadProxy::startFetch):
(WebCore::ServiceWorkerThreadProxy::cancelFetch):
(WebCore::ServiceWorkerThreadProxy::convertFetchToDownload):
(WebCore::ServiceWorkerThreadProxy::navigationPreloadIsReady):
(WebCore::ServiceWorkerThreadProxy::navigationPreloadFailed):
(WebCore::ServiceWorkerThreadProxy::continueDidReceiveFetchResponse):
(WebCore::ServiceWorkerThreadProxy::removeFetch):
* Source/WebCore/workers/service/context/ServiceWorkerThreadProxy.h:
* Source/WebKit/WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp:
(WebKit::WebServiceWorkerFetchTaskClient::cleanup):
(WebKit::WebServiceWorkerFetchTaskClient::setFetchEvent): Deleted.
(WebKit::WebServiceWorkerFetchTaskClient::navigationPreloadIsReady): Deleted.
(WebKit::WebServiceWorkerFetchTaskClient::navigationPreloadFailed): Deleted.
* Source/WebKit/WebProcess/Storage/WebServiceWorkerFetchTaskClient.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to