Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: cf8cfa7fdbca2e449a15beded452d3dc4cf4abf9
https://github.com/WebKit/WebKit/commit/cf8cfa7fdbca2e449a15beded452d3dc4cf4abf9
Author: Chris Dumez <[email protected]>
Date: 2026-06-08 (Mon, 08 Jun 2026)
Changed paths:
M Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
Log Message:
-----------
BlobDataTaskClient leaks completed tasks in
NetworkSessionCocoa::m_blobDataTasksForAPI
https://bugs.webkit.org/show_bug.cgi?id=316524
Reviewed by Alex Christensen.
NetworkSessionCocoa::BlobDataTaskClient takes a NetworkSessionCocoa&
in its constructor but never assigned it to its m_session member
(declared as WeakPtr<NetworkSessionCocoa>). As a result, the cleanup
in didCompleteWithError():
```
if (CheckedPtr session = m_session.get())
session->removeBlobDataTask(m_identifier);
```
never ran, because m_session.get() was always null. Each successful
blob: data task started via NetworkSessionCocoa::dataTaskWithRequest()
left its Ref<BlobDataTaskClient> (and the wrapped NetworkDataTaskBlob)
retained in m_blobDataTasksForAPI for the lifetime of the session
unless the caller explicitly invoked cancelDataTask().
Initialize m_session in the constructor's member initializer list so
the entry is removed when the load completes.
* Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:
Canonical link: https://commits.webkit.org/314765@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications