RESOLVED FIXED248458
[Curl] Register/Unregister NetworkDataTaskCurl to NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=248458
Summary [Curl] Register/Unregister NetworkDataTaskCurl to NetworkSession
Attachments
Kenji Shukuwa
Comment 1 2022-11-28 23:50:13 PST
It seems that by registering to the NetworkSession, NetworkDataTask::invalidateAndCancel is called when the WebsiteDataStore is destroyed. https://github.com/WebKit/WebKit/blob/main/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp#L170-L171 --- WebsiteDataStore::~WebsiteDataStore() { if (m_networkProcess) m_networkProcess->removeSession(*this); --- https://github.com/WebKit/WebKit/blob/main/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp#L1427-L1428 --- void NetworkProcessProxy::removeSession(WebsiteDataStore& websiteDataStore) { if (canSendMessage()) send(Messages::NetworkProcess::DestroySession { websiteDataStore.sessionID() }, 0); --- https://github.com/WebKit/WebKit/blob/main/Source/WebKit/NetworkProcess/NetworkProcess.cpp#L560 --- void NetworkProcess::destroySession(PAL::SessionID sessionID) { if (auto session = m_networkSessions.take(sessionID)) { session->invalidateAndCancel(); --- https://github.com/WebKit/WebKit/blob/main/Source/WebKit/NetworkProcess/NetworkSession.cpp#L215-L216 --- void NetworkSession::invalidateAndCancel() { for (auto& task : m_dataTaskSet) task.invalidateAndCancel(); ---
Kenji Shukuwa
Comment 2 2022-11-28 23:59:11 PST
EWS
Comment 3 2022-11-29 16:24:22 PST
Committed 257150@main (8ba585344147): <https://commits.webkit.org/257150@main> Reviewed commits have been landed. Closing PR #6910 and removing active labels.
Radar WebKit Bug Importer
Comment 4 2022-11-29 16:25:18 PST
Note You need to log in before you can comment on or make changes to this bug.