Title: [101393] trunk/Source/WebKit/gtk
Revision
101393
Author
ser...@webkit.org
Date
2011-11-29 09:36:35 -0800 (Tue, 29 Nov 2011)

Log Message

[GTK] SIGSEV when a WebKitDownload fails
https://bugs.webkit.org/show_bug.cgi?id=72883

Reviewed by Xan Lopez.

After r100769 http status codes >= 400 trigger download
failures. We must ensure that the download is properly cancelled
before clearing the ResourceHandle client to avoid crashes.

* webkit/webkitdownload.cpp:
(DownloadClient::didReceiveResponse):

Modified Paths

Diff

Modified: trunk/Source/WebKit/gtk/ChangeLog (101392 => 101393)


--- trunk/Source/WebKit/gtk/ChangeLog	2011-11-29 17:34:50 UTC (rev 101392)
+++ trunk/Source/WebKit/gtk/ChangeLog	2011-11-29 17:36:35 UTC (rev 101393)
@@ -1,3 +1,17 @@
+2011-11-29  Sergio Villar Senin  <svil...@igalia.com>
+
+        [GTK] SIGSEV when a WebKitDownload fails
+        https://bugs.webkit.org/show_bug.cgi?id=72883
+
+        Reviewed by Xan Lopez.
+
+        After r100769 http status codes >= 400 trigger download
+        failures. We must ensure that the download is properly cancelled
+        before clearing the ResourceHandle client to avoid crashes.
+
+        * webkit/webkitdownload.cpp:
+        (DownloadClient::didReceiveResponse):
+
 2011-11-29  Martin Robinson  <mrobin...@igalia.com>
 
         [GTK] Custom fonts on surlybikes.com and boingboing.net do not load

Modified: trunk/Source/WebKit/gtk/webkit/webkitdownload.cpp (101392 => 101393)


--- trunk/Source/WebKit/gtk/webkit/webkitdownload.cpp	2011-11-29 17:34:50 UTC (rev 101392)
+++ trunk/Source/WebKit/gtk/webkit/webkitdownload.cpp	2011-11-29 17:36:35 UTC (rev 101393)
@@ -941,6 +941,7 @@
 {
     webkit_download_set_response(m_download, response);
     if (response.httpStatusCode() >= 400) {
+        m_download->priv->resourceHandle->cancel();
         webkit_download_error(m_download, ResourceError(errorDomainDownload, response.httpStatusCode(),
                                                         response.url().string(), response.httpStatusText()));
     }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to