Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 821d1ca973031360e9f5327c49f57fed1c0c38d7
      
https://github.com/WebKit/WebKit/commit/821d1ca973031360e9f5327c49f57fed1c0c38d7
  Author: Chris Dumez <[email protected]>
  Date:   2024-07-02 (Tue, 02 Jul 2024)

  Changed paths:
    M Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp
    M Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h
    M 
Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.messages.in
    M 
Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp
    M Source/WebKit/WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp

  Log Message:
  -----------
  Crash under ServiceWorkerFetchTask::contextClosed()
https://bugs.webkit.org/show_bug.cgi?id=276079
rdar://130856919

Reviewed by David Kilzer and Youenn Fablet.

This crash is a regression from 280246@main. When 
ServiceWorkerFetchTask::contextClosed()
was called due to receiving the ServiceWorkerFetchTask::ContextClosed IPC, the 
task
would fail to unregister itself from the WebSWServerToContextConnection, 
leaving a null
WebPtr in the map. We would then dereference this null WeakPtr in the 
WebSWServerToContextConnection
destructor.

To address the issue, I have renamed the IPC to WorkerClosed, and the 
implementation now
unregisters the task from the WebSWServerToContextConnection before calling 
contextClosed().

* Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:
(WebKit::ServiceWorkerFetchTask::workerClosed):
* Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h:
* Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.messages.in:
* Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
(WebKit::WebSWServerToContextConnection::~WebSWServerToContextConnection):

Canonical link: https://commits.webkit.org/280600@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