| Summary: | [Curl] Register/Unregister NetworkDataTaskCurl to NetworkSession | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Kenji Shukuwa <kenji.shukuwa> |
| Component: | Platform | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | Hironori.Fujii, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
|
Description
Kenji Shukuwa
2022-11-28 23:42:39 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(); --- Pull request: https://github.com/WebKit/WebKit/pull/6910 Committed 257150@main (8ba585344147): <https://commits.webkit.org/257150@main> Reviewed commits have been landed. Closing PR #6910 and removing active labels. |