DownloadProxy should keep a strong reference to its associated web context
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 15 Dec 2012 22:04:12 +0000 (22:04 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 15 Dec 2012 22:04:12 +0000 (22:04 +0000)
commit858185bf4428b38a971f0c89c3422a3abe23c87d
treed0c68286b58418ff7fa002d73389c51e1bf7ef5a
parent1ff2a5970c803aebc1e0ceebd6c331dabb31beb6
DownloadProxy should keep a strong reference to its associated web context
https://bugs.webkit.org/show_bug.cgi?id=105107

Reviewed by Alexey Proskuryakov.

While this does create a ref-cycle, it's broken when the download completes, fails, is canceled or
if the process that's doing the download crashes.

* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::processDidClose):
(WebKit::DownloadProxy::didStart):
(WebKit::DownloadProxy::didReceiveAuthenticationChallenge):
(WebKit::DownloadProxy::didReceiveResponse):
(WebKit::DownloadProxy::didReceiveData):
(WebKit::DownloadProxy::shouldDecodeSourceDataOfMIMEType):
(WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
(WebKit::DownloadProxy::didCreateDestination):
(WebKit::DownloadProxy::didFinish):
(WebKit::DownloadProxy::didFail):
(WebKit::DownloadProxy::didCancel):
* UIProcess/Downloads/DownloadProxy.h:
(DownloadProxy):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@137810 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/Downloads/DownloadProxy.cpp
Source/WebKit2/UIProcess/Downloads/DownloadProxy.h