Title: [100770] trunk/Source/WebKit2
- Revision
- 100770
- Author
- carlo...@webkit.org
- Date
- 2011-11-18 06:48:40 -0800 (Fri, 18 Nov 2011)
Log Message
[GTK] Cancel current download operation before download object is deleted
https://bugs.webkit.org/show_bug.cgi?id=72721
Reviewed by Martin Robinson.
It fixes a crash in the web process when a download finishes early
due to a failure.
* WebProcess/Downloads/soup/DownloadSoup.cpp:
(WebKit::Download::cancel): Delete current ResourceHandle.
(WebKit::Download::platformInvalidate): If there's a
ResourceHandle active, cancel the download operation and delete
the handle.
(WebKit::Download::platformDidFinish): Delete current ResourceHandle.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (100769 => 100770)
--- trunk/Source/WebKit2/ChangeLog 2011-11-18 14:45:57 UTC (rev 100769)
+++ trunk/Source/WebKit2/ChangeLog 2011-11-18 14:48:40 UTC (rev 100770)
@@ -1,5 +1,22 @@
2011-11-18 Carlos Garcia Campos <cgar...@igalia.com>
+ [GTK] Cancel current download operation before download object is deleted
+ https://bugs.webkit.org/show_bug.cgi?id=72721
+
+ Reviewed by Martin Robinson.
+
+ It fixes a crash in the web process when a download finishes early
+ due to a failure.
+
+ * WebProcess/Downloads/soup/DownloadSoup.cpp:
+ (WebKit::Download::cancel): Delete current ResourceHandle.
+ (WebKit::Download::platformInvalidate): If there's a
+ ResourceHandle active, cancel the download operation and delete
+ the handle.
+ (WebKit::Download::platformDidFinish): Delete current ResourceHandle.
+
+2011-11-18 Carlos Garcia Campos <cgar...@igalia.com>
+
[GTK] Downloads not started by WebView only fail for transport errors
https://bugs.webkit.org/show_bug.cgi?id=72718
Modified: trunk/Source/WebKit2/WebProcess/Downloads/soup/DownloadSoup.cpp (100769 => 100770)
--- trunk/Source/WebKit2/WebProcess/Downloads/soup/DownloadSoup.cpp 2011-11-18 14:45:57 UTC (rev 100769)
+++ trunk/Source/WebKit2/WebProcess/Downloads/soup/DownloadSoup.cpp 2011-11-18 14:48:40 UTC (rev 100770)
@@ -153,12 +153,17 @@
return;
m_resourceHandle->cancel();
didCancel(CoreIPC::DataReference());
+ m_resourceHandle = 0;
}
void Download::platformInvalidate()
{
+ if (m_resourceHandle) {
+ m_resourceHandle->setClient(0);
+ m_resourceHandle->cancel();
+ m_resourceHandle = 0;
+ }
m_downloadClient.release();
- m_resourceHandle = 0;
}
void Download::didDecideDestination(const String& destination, bool allowOverwrite)
@@ -168,7 +173,7 @@
void Download::platformDidFinish()
{
- notImplemented();
+ m_resourceHandle = 0;
}
void Download::receivedCredential(const AuthenticationChallenge& authenticationChallenge, const Credential& credential)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes