2010-05-11 Xan Lopez <xlopez@igalia.com>
authorxan@webkit.org <xan@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 May 2010 17:37:47 +0000 (17:37 +0000)
committerxan@webkit.org <xan@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 May 2010 17:37:47 +0000 (17:37 +0000)
        Reviewed by Gustavo Noronha.

        [gtk] critical warning in soup_message_set_first_party() when cancelling a navigation
        https://bugs.webkit.org/show_bug.cgi?id=38653

        Check if willSendRequest cancelled the request before setting the
        first party for the cookies in the message, otherwise we'll get a
        critical warning.

        * platform/network/soup/ResourceHandleSoup.cpp:
        (WebCore::restartedCallback):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@59157 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/network/soup/ResourceHandleSoup.cpp

index acd9911..3187c4b 100644 (file)
@@ -1,3 +1,17 @@
+2010-05-11  Xan Lopez  <xlopez@igalia.com>
+
+        Reviewed by Gustavo Noronha.
+
+        [gtk] critical warning in soup_message_set_first_party() when cancelling a navigation
+        https://bugs.webkit.org/show_bug.cgi?id=38653
+
+        Check if willSendRequest cancelled the request before setting the
+        first party for the cookies in the message, otherwise we'll get a
+        critical warning.
+
+        * platform/network/soup/ResourceHandleSoup.cpp:
+        (WebCore::restartedCallback):
+
 2010-05-11  Jer Noble  <jer.noble@apple.com>
 
         Reviewed by Adele Peterson.
index 30a516a..90a842e 100644 (file)
@@ -205,6 +205,9 @@ static void restartedCallback(SoupMessage* msg, gpointer data)
     if (d->client())
         d->client()->willSendRequest(handle, request, response);
 
+    if (d->m_cancelled)
+        return;
+
 #ifdef HAVE_LIBSOUP_2_29_90
     // Update the first party in case the base URL changed with the redirect
     String firstPartyString = request.firstPartyForCookies().string();