[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 16:34:59 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 15dfcad45c843753ee0c28490b38a7506c356853
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Nov 26 15:52:39 2010 +0000
2010-11-26 Sergio Villar Senin <svillar at igalia.com>
Reviewed by Xan Lopez.
[Gtk] ASSERT(d->m_response.isNull()) in contentSniffedCallback
https://bugs.webkit.org/show_bug.cgi?id=50083
ResourceHandleSoup should not listen to content-sniffed signal
when content sniffing is not enabled. This will prevent us
reaching an assertion on content-sniffed callback
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::startHttp):
* platform/network/soup/cache/soup-request-http.c:
(conditional_get_ready_cb): added a comment with the
possible fix for a pure libsoup HTTP cache.
(send_async_cb): prevent an early object finalization adding a
reference.
(webkit_soup_request_http_send_async): Ditto.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index fd86969..f3007ed 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2010-11-26 Sergio Villar Senin <svillar at igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [Gtk] ASSERT(d->m_response.isNull()) in contentSniffedCallback
+ https://bugs.webkit.org/show_bug.cgi?id=50083
+
+ ResourceHandleSoup should not listen to content-sniffed signal
+ when content sniffing is not enabled. This will prevent us
+ reaching an assertion on content-sniffed callback
+
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::startHttp):
+ * platform/network/soup/cache/soup-request-http.c:
+ (conditional_get_ready_cb): added a comment with the
+ possible fix for a pure libsoup HTTP cache.
+ (send_async_cb): prevent an early object finalization adding a
+ reference.
+ (webkit_soup_request_http_send_async): Ditto.
+
2010-11-26 Renata Hodovan <reni at inf.u-szeged.hu>
Reviewed by Antonio Gomes.
diff --git a/WebCore/platform/network/soup/ResourceHandleSoup.cpp b/WebCore/platform/network/soup/ResourceHandleSoup.cpp
index e578a8d..c1933e3 100644
--- a/WebCore/platform/network/soup/ResourceHandleSoup.cpp
+++ b/WebCore/platform/network/soup/ResourceHandleSoup.cpp
@@ -586,10 +586,11 @@ static bool startHttp(ResourceHandle* handle)
if (!handle->shouldContentSniff())
soup_message_disable_feature(soupMessage, SOUP_TYPE_CONTENT_SNIFFER);
+ else
+ g_signal_connect(soupMessage, "content-sniffed", G_CALLBACK(contentSniffedCallback), handle);
g_signal_connect(soupMessage, "restarted", G_CALLBACK(restartedCallback), handle);
g_signal_connect(soupMessage, "got-headers", G_CALLBACK(gotHeadersCallback), handle);
- g_signal_connect(soupMessage, "content-sniffed", G_CALLBACK(contentSniffedCallback), handle);
d->m_gotChunkHandler = g_signal_connect(soupMessage, "got-chunk", G_CALLBACK(gotChunkCallback), handle);
#ifdef HAVE_LIBSOUP_2_29_90
diff --git a/WebCore/platform/network/soup/cache/soup-request-http.c b/WebCore/platform/network/soup/cache/soup-request-http.c
index f157cfc..f3fe2ec 100644
--- a/WebCore/platform/network/soup/cache/soup-request-http.c
+++ b/WebCore/platform/network/soup/cache/soup-request-http.c
@@ -151,6 +151,13 @@ conditional_get_ready_cb (SoupSession *session, SoupMessage *msg, gpointer user_
g_simple_async_result_set_op_res_gpointer (simple, httpstream, g_object_unref);
soup_message_got_headers (helper->original);
+
+ /* FIXME: Uncomment this when this becomes part of libsoup
+ * if (!soup_message_disables_feature(helper->original, SOUP_TYPE_CONTENT_SNIFFER)) {
+ * const gchar *content_type = soup_message_headers_get_content_type (msg->response_headers, NULL);
+ * soup_message_content_sniffed (helper->original, content_type, NULL);
+ * }
+ */
content_type = soup_message_headers_get_content_type (msg->response_headers, NULL);
soup_message_content_sniffed (helper->original, content_type, NULL);
@@ -215,6 +222,13 @@ send_async_cb (gpointer data)
/* Issue signals */
soup_message_got_headers (helper->http->priv->msg);
+
+ /* FIXME: Uncomment this when this becomes part of libsoup
+ * if (!soup_message_disables_feature(helper->http->priv->msg, SOUP_TYPE_CONTENT_SNIFFER)) {
+ * const gchar *content_type = soup_message_headers_get_content_type (helper->http->priv->msg->response_headers, NULL);
+ * soup_message_content_sniffed (helper->http->priv->msg, content_type, NULL);
+ * }
+ */
content_type = soup_message_headers_get_content_type (helper->http->priv->msg->response_headers, NULL);
soup_message_content_sniffed (helper->http->priv->msg, content_type, NULL);
@@ -225,6 +239,7 @@ send_async_cb (gpointer data)
g_object_unref (simple);
}
+ g_object_unref (helper->http);
g_slice_free (SendAsyncHelper, helper);
return FALSE;
@@ -256,7 +271,7 @@ webkit_soup_request_http_send_async (WebKitSoupRequest *request,
the signals must be also emitted
asynchronously */
SendAsyncHelper *helper = g_slice_new (SendAsyncHelper);
- helper->http = http;
+ helper->http = g_object_ref (http);
helper->callback = callback;
helper->user_data = user_data;
g_timeout_add (0, send_async_cb, helper);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list