Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a4713c7d3119fd38d6212eb7dacbfbded37c567c
      
https://github.com/WebKit/WebKit/commit/a4713c7d3119fd38d6212eb7dacbfbded37c567c
  Author: Youenn Fablet <[email protected]>
  Date:   2025-02-28 (Fri, 28 Feb 2025)

  Changed paths:
    M Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp
    M Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h

  Log Message:
  -----------
  ServiceWorkerFetchTask::cancelFromClient can dereference 
m_serverConnectionIdentifier
rdar://145431694
https://bugs.webkit.org/show_bug.cgi?id=288818

Reviewed by Alex Christensen.

A ServiceWorkerFetchTask can be created without m_serverConnectionIdentifier in 
case of preload reuse.
Before https://commits.webkit.org/284688@main, this was ok as 
m_serverConnectionIdentifier was only used if there was a connection to the 
service worker.
After https://commits.webkit.org/284688@main, we would dereference 
m_serverConnectionIdentifier before checking whether there is a connection to 
the service worker.
We remove sendToServiceWorker and do a test on the connection so that we only 
dereference when we are sure we need to send the message.

* Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:
(WebKit::ServiceWorkerFetchTask::sendToServiceWorker):
(WebKit::ServiceWorkerFetchTask::startFetch):
(WebKit::ServiceWorkerFetchTask::cancelFromClient):
(WebKit::ServiceWorkerFetchTask::continueDidReceiveFetchResponse):
(WebKit::ServiceWorkerFetchTask::sendNavigationPreloadUpdate):
* Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h:

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



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

Reply via email to