[Curl] Deadlock when downloading.
authorpeavo@outlook.com <peavo@outlook.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Aug 2015 19:01:44 +0000 (19:01 +0000)
committerpeavo@outlook.com <peavo@outlook.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Aug 2015 19:01:44 +0000 (19:01 +0000)
commit3abdde1ec73ebbef5779253e45937f67e860a47c
treeff933676992ea63e59b4374c6ace6bacb6065f5a
parent74f40974276c0d710e8bec761b41fbf5e70200e5
[Curl] Deadlock when downloading.
https://bugs.webkit.org/show_bug.cgi?id=148438

Reviewed by Alex Christensen.

A thread should not try locking when it already has got the lock,
this will create a deadlock.

* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownloadManager::startThreadIfNeeded):
(WebCore::CurlDownloadManager::stopThread):
(WebCore::CurlDownloadManager::stopThreadIfIdle):
(WebCore::CurlDownload::~CurlDownload):
(WebCore::CurlDownload::moveFileToDestination):
(WebCore::CurlDownload::didFail):
* platform/network/curl/CurlDownload.h:
(WebCore::CurlDownloadManager::getMultiHandle):
(WebCore::CurlDownloadManager::runThread):
(WebCore::CurlDownloadManager::setRunThread):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188977 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/network/curl/CurlDownload.cpp
Source/WebCore/platform/network/curl/CurlDownload.h