2009-03-05 Gustavo Noronha Silva <gns@gnome.org>
authorkov@webkit.org <kov@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Mar 2009 18:40:21 +0000 (18:40 +0000)
committerkov@webkit.org <kov@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Mar 2009 18:40:21 +0000 (18:40 +0000)
        Reviewed by Alexey Proskuryakov.

        https://bugs.webkit.org/show_bug.cgi?id=24389
        WebKitGTK+ crashes when cancelling plugin loads

        Remove bogus calls to the client's didFinishLoading method from
        our ResourceHandle::cancel implementation. Calling
        didFinishLoading here is mostly inoffensive for most loads, but
        causes crashes when plugin loads are cancelled.

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

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

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

index 9667c8f..731fd39 100644 (file)
@@ -1,3 +1,18 @@
+2009-03-05  Gustavo Noronha Silva  <gns@gnome.org>
+
+        Reviewed by Alexey Proskuryakov.
+
+        https://bugs.webkit.org/show_bug.cgi?id=24389
+        WebKitGTK+ crashes when cancelling plugin loads
+
+        Remove bogus calls to the client's didFinishLoading method from
+        our ResourceHandle::cancel implementation. Calling
+        didFinishLoading here is mostly inoffensive for most loads, but
+        causes crashes when plugin loads are cancelled.
+
+        * platform/network/soup/ResourceHandleSoup.cpp:
+        (WebCore::ResourceHandle::cancel):
+
 2009-03-05  Steve Falkenburg  <sfalken@apple.com>
 
         Windows build fix.
index c16495f..82ed142 100644 (file)
@@ -551,16 +551,10 @@ bool ResourceHandle::start(Frame* frame)
 void ResourceHandle::cancel()
 {
     d->m_cancelled = true;
-    if (d->m_msg) {
+    if (d->m_msg)
         soup_session_cancel_message(defaultSession(), d->m_msg, SOUP_STATUS_CANCELLED);
-        // For re-entrancy troubles we call didFinishLoading when the message hasn't been handled yet.
-        if (client())
-            client()->didFinishLoading(this);
-    } else if (d->m_cancellable) {
+    else if (d->m_cancellable)
         g_cancellable_cancel(d->m_cancellable);
-        if (client())
-            client()->didFinishLoading(this);
-    }
 }
 
 PassRefPtr<SharedBuffer> ResourceHandle::bufferedData()