RESOLVED FIXED 163204
NetworkSession: NetworkDataTask is leaked if download finishes in didReceiveResponse completion handler
https://bugs.webkit.org/show_bug.cgi?id=163204
Summary NetworkSession: NetworkDataTask is leaked if download finishes in didReceiveR...
Carlos Garcia Campos
Reported 2016-10-10 03:58:04 PDT
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.
Attachments
Patch (3.85 KB, patch)
2016-10-10 04:03 PDT, Carlos Garcia Campos
no flags
Try to fix mac builds (3.87 KB, patch)
2016-10-10 05:13 PDT, Carlos Garcia Campos
achristensen: review+
Carlos Garcia Campos
Comment 1 2016-10-10 04:03:14 PDT
Carlos Garcia Campos
Comment 2 2016-10-10 05:13:37 PDT
Created attachment 291090 [details] Try to fix mac builds
Alex Christensen
Comment 3 2016-10-10 09:21:48 PDT
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.
Carlos Garcia Campos
Comment 4 2016-10-10 09:27:15 PDT
(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
Carlos Garcia Campos
Comment 5 2016-10-10 22:31:29 PDT
Note You need to log in before you can comment on or make changes to this bug.