Changeset 137810 in webkit
- Timestamp:
- Dec 15, 2012, 2:04:12 PM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r137809 r137810 1 2012-12-15 Anders Carlsson <andersca@apple.com> 2 3 DownloadProxy should keep a strong reference to its associated web context 4 https://bugs.webkit.org/show_bug.cgi?id=105107 5 6 Reviewed by Alexey Proskuryakov. 7 8 While this does create a ref-cycle, it's broken when the download completes, fails, is canceled or 9 if the process that's doing the download crashes. 10 11 * UIProcess/Downloads/DownloadProxy.cpp: 12 (WebKit::DownloadProxy::processDidClose): 13 (WebKit::DownloadProxy::didStart): 14 (WebKit::DownloadProxy::didReceiveAuthenticationChallenge): 15 (WebKit::DownloadProxy::didReceiveResponse): 16 (WebKit::DownloadProxy::didReceiveData): 17 (WebKit::DownloadProxy::shouldDecodeSourceDataOfMIMEType): 18 (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename): 19 (WebKit::DownloadProxy::didCreateDestination): 20 (WebKit::DownloadProxy::didFinish): 21 (WebKit::DownloadProxy::didFail): 22 (WebKit::DownloadProxy::didCancel): 23 * UIProcess/Downloads/DownloadProxy.h: 24 (DownloadProxy): 25 1 26 2012-12-15 Anders Carlsson <andersca@apple.com> 2 27 -
trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxy.cpp
r137809 r137810 83 83 return; 84 84 85 m_webContext->downloadClient().processDidCrash(m_webContext , this);85 m_webContext->downloadClient().processDidCrash(m_webContext.get(), this); 86 86 } 87 87 … … 103 103 return; 104 104 105 m_webContext->downloadClient().didStart(m_webContext , this);105 m_webContext->downloadClient().didStart(m_webContext.get(), this); 106 106 } 107 107 … … 114 114 // Once this is fixed, remove WebContext::deprecatedSharedProcess(). 115 115 RefPtr<AuthenticationChallengeProxy> authenticationChallengeProxy = AuthenticationChallengeProxy::create(authenticationChallenge, challengeID, m_webContext->deprecatedSharedProcess()); 116 m_webContext->downloadClient().didReceiveAuthenticationChallenge(m_webContext , this, authenticationChallengeProxy.get());116 m_webContext->downloadClient().didReceiveAuthenticationChallenge(m_webContext.get(), this, authenticationChallengeProxy.get()); 117 117 } 118 118 … … 122 122 return; 123 123 124 m_webContext->downloadClient().didReceiveResponse(m_webContext , this, response);124 m_webContext->downloadClient().didReceiveResponse(m_webContext.get(), this, response); 125 125 } 126 126 … … 130 130 return; 131 131 132 m_webContext->downloadClient().didReceiveData(m_webContext , this, length);132 m_webContext->downloadClient().didReceiveData(m_webContext.get(), this, length); 133 133 } 134 134 … … 138 138 return; 139 139 140 result = m_webContext->downloadClient().shouldDecodeSourceDataOfMIMEType(m_webContext , this, mimeType);140 result = m_webContext->downloadClient().shouldDecodeSourceDataOfMIMEType(m_webContext.get(), this, mimeType); 141 141 } 142 142 … … 146 146 return; 147 147 148 destination = m_webContext->downloadClient().decideDestinationWithSuggestedFilename(m_webContext , this, filename, allowOverwrite);148 destination = m_webContext->downloadClient().decideDestinationWithSuggestedFilename(m_webContext.get(), this, filename, allowOverwrite); 149 149 150 150 if (!destination.isNull()) … … 157 157 return; 158 158 159 m_webContext->downloadClient().didCreateDestination(m_webContext , this, path);159 m_webContext->downloadClient().didCreateDestination(m_webContext.get(), this, path); 160 160 } 161 161 … … 165 165 return; 166 166 167 m_webContext->downloadClient().didFinish(m_webContext , this);167 m_webContext->downloadClient().didFinish(m_webContext.get(), this); 168 168 169 169 // This can cause the DownloadProxy object to be deleted. … … 186 186 m_resumeData = createWebData(resumeData); 187 187 188 m_webContext->downloadClient().didFail(m_webContext , this, error);188 m_webContext->downloadClient().didFail(m_webContext.get(), this, error); 189 189 190 190 // This can cause the DownloadProxy object to be deleted. … … 196 196 m_resumeData = createWebData(resumeData); 197 197 198 m_webContext->downloadClient().didCancel(m_webContext , this);198 m_webContext->downloadClient().didCancel(m_webContext.get(), this); 199 199 200 200 // This can cause the DownloadProxy object to be deleted. -
trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxy.h
r137807 r137810 92 92 93 93 DownloadProxyMap& m_downloadProxyMap; 94 WebContext*m_webContext;94 RefPtr<WebContext> m_webContext; 95 95 uint64_t m_downloadID; 96 96
Note:
See TracChangeset
for help on using the changeset viewer.