After the completion handler a reference of the NetworkDataTask is saved in m_downloadsAfterDestinationDecided. If the download failed or was canceled DownloadManager::dataTaskBecameDownloadTask is never called and the data task is kept in the download manager forever.
Created attachment 291085 [details] Patch
Created attachment 291090 [details] Try to fix mac builds
Comment on attachment 291090 [details] Try to fix mac builds View in context: https://bugs.webkit.org/attachment.cgi?id=291090&action=review > Source/WebKit2/ChangeLog:11 > + NetworkDataTask, so that the download manager can check the task state after the co,pletion handler and return completion > Source/WebKit2/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:426 > + ASSERT_NOT_REACHED(); > + return State::Running; I know this should be impossible and doesn't matter, but let's default to Completed in this case so we won't do anything.
(In reply to comment #3) > Comment on attachment 291090 [details] > Try to fix mac builds > > View in context: > https://bugs.webkit.org/attachment.cgi?id=291090&action=review > > > Source/WebKit2/ChangeLog:11 > > + NetworkDataTask, so that the download manager can check the task state after the co,pletion handler and return > > completion > > > Source/WebKit2/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:426 > > + ASSERT_NOT_REACHED(); > > + return State::Running; > > I know this should be impossible and doesn't matter, but let's default to > Completed in this case so we won't do anything. Good point
Committed r207042: <http://trac.webkit.org/changeset/207042>