Bug 163545

Summary: NetworkSession: PendingDownload is leaked if canceled before willDecidePendingDownloadDestination
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen
Priority: P2    
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Fix debug build with network session disabled. achristensen: review+

Carlos Garcia Campos
Reported 2016-10-17 08:55:16 PDT
If a download started by DownloadManager::startDownload() is cancelled before DownloadManager::willDecidePendingDownloadDestination() is called, DownloadManager::cancelDownload() does nothing, because the Download hasn't been created yet and m_downloadsWaitingForDestination map doesn't contain the download ID, and the PendingDownload is never removed from the m_pendingDownloads map.
Attachments
Patch (4.37 KB, patch)
2016-10-17 09:00 PDT, Carlos Garcia Campos
no flags
Fix debug build with network session disabled. (4.41 KB, patch)
2016-10-17 09:29 PDT, Carlos Garcia Campos
achristensen: review+
Carlos Garcia Campos
Comment 1 2016-10-17 09:00:14 PDT
Carlos Garcia Campos
Comment 2 2016-10-17 09:29:20 PDT
Created attachment 291823 [details] Fix debug build with network session disabled. So, Mac EWS debug doesn't have network session enabled?
Alex Christensen
Comment 3 2016-10-17 10:25:17 PDT
(In reply to comment #2) > Created attachment 291823 [details] > Fix debug build with network session disabled. > > So, Mac EWS debug doesn't have network session enabled? This is true, unfortunately. Network session is only enabled starting with Sierra/iOS10 and I think EWS uses El Capitan.
Alex Christensen
Comment 4 2016-10-17 10:30:01 PDT
Comment on attachment 291823 [details] Fix debug build with network session disabled. r=me
Carlos Garcia Campos
Comment 5 2016-10-17 23:06:47 PDT
Note You need to log in before you can comment on or make changes to this bug.