Some tests are crashing from time to time
https://bugs.webkit.org/show_bug.cgi?id=31866
Make sure we do not notify the client of a finished load, if the
load has been cancelled, or the client is gone.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@51380
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2009-11-25 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Xan Lopez.
+
+ Some tests are crashing from time to time
+ https://bugs.webkit.org/show_bug.cgi?id=31866
+
+ Make sure we do not notify the client of a finished load, if the
+ load has been cancelled, or the client is gone.
+
+ * platform/network/soup/ResourceHandleSoup.cpp:
+ (WebCore::):
+
2009-11-24 Ben Murdoch <benm@google.com>
Reviewed by Eric Seidel.
g_input_stream_close_finish(d->m_inputStream, res, 0);
cleanupGioOperation(handle.get());
+
+ // The load may have been cancelled, the client may have been
+ // destroyed already. In such cases calling didFinishLoading is a
+ // bad idea.
+ if (d->m_cancelled || !client)
+ return;
+
client->didFinishLoading(handle.get());
}