Commit c90968dc authored by alp@webkit.org's avatar alp@webkit.org
Browse files

2008-11-03 Holger Hans Peter Freyther <zecke@selfish.org>

        Reviewed by Alp Toker.

        https://bugs.webkit.org/show_bug.cgi?id=22041
        Fix CURL crashes on the test suite

        Fix segfault with setDefersLoading(). Do not call into curl when we
        don't have a CURL handle.

        It is attempted to defer the loading before the load has been
        started (no curl handle was allocated yet). If that happens then
        just remember that. ResourceHandleManager::startJob is already taking
        care of this and in initResourceHandle the the downloading will
        be paused if needed.

        Fixes fast/loader/simultaneous-reloads-assert.html

        * platform/network/curl/ResourceHandleCurl.cpp:
        (WebCore::ResourceHandle::setDefersLoading):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@38071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1ad9e72d
2008-11-03 Holger Hans Peter Freyther <zecke@selfish.org>
Reviewed by Alp Toker.
https://bugs.webkit.org/show_bug.cgi?id=22041
Fix CURL crashes on the test suite
Fix segfault with setDefersLoading(). Do not call into curl when we
don't have a CURL handle.
It is attempted to defer the loading before the load has been
started (no curl handle was allocated yet). If that happens then
just remember that. ResourceHandleManager::startJob is already taking
care of this and in initResourceHandle the the downloading will
be paused if needed.
Fixes fast/loader/simultaneous-reloads-assert.html
* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::setDefersLoading):
2008-11-03 Holger Hans Peter Freyther <zecke@selfish.org>
 
Reviewed by Alp Toker.
......
......@@ -152,7 +152,9 @@ void ResourceHandle::setDefersLoading(bool defers)
return;
#if LIBCURL_VERSION_NUM > 0x071200
if (defers) {
if (!d->m_handle)
d->m_defersLoading = defers;
else if (defers) {
CURLcode error = curl_easy_pause(d->m_handle, CURLPAUSE_ALL);
// If we could not defer the handle, so don't do it.
if (error != CURLE_OK)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment