[Curl] Fix Curl Request Scheduler not to release wrong Curl handle when request is...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Apr 2019 09:52:49 +0000 (09:52 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Apr 2019 09:52:49 +0000 (09:52 +0000)
commite349eeeb0b1a09682b5b1d6c49c1805936604ae5
tree7f45e6f4c931d4f9634920344cb95fe71110ced7
parent8fd2ebeb5e78ad246c17c6d03b4906d15b8a9cd6
[Curl] Fix Curl Request Scheduler not to release wrong Curl handle when request is cancelled.
https://bugs.webkit.org/show_bug.cgi?id=191650

Patch by Takashi Komori <Takashi.Komori@sony.com> on 2019-04-26
Reviewed by Fujii Hironori.

Source/WebCore:

Test: http/tests/misc/repeat-open-cancel.html

* platform/network/curl/CurlRequest.cpp:
(WebCore::CurlRequest::cancel):
(WebCore::CurlRequest::isCancelled):
(WebCore::CurlRequest::isCompletedOrCancelled):
(WebCore::CurlRequest::didCompleteTransfer):
(WebCore::CurlRequest::completeDidReceiveResponse):
(WebCore::CurlRequest::pausedStatusChanged):
* platform/network/curl/CurlRequest.h:
(WebCore::CurlRequest::isCompleted const): Deleted.
(WebCore::CurlRequest::isCancelled const): Deleted.
(WebCore::CurlRequest::isCompletedOrCancelled const): Deleted.
* platform/network/curl/CurlRequestScheduler.cpp:
(WebCore::CurlRequestScheduler::cancel):
(WebCore::CurlRequestScheduler::callOnWorkerThread):
(WebCore::CurlRequestScheduler::startThreadIfNeeded):
(WebCore::CurlRequestScheduler::stopThreadIfNoMoreJobRunning):
(WebCore::CurlRequestScheduler::stopThread):
(WebCore::CurlRequestScheduler::executeTasks):
(WebCore::CurlRequestScheduler::workerThread):
(WebCore::CurlRequestScheduler::startTransfer):
(WebCore::CurlRequestScheduler::completeTransfer):
(WebCore::CurlRequestScheduler::cancelTransfer):
(WebCore::CurlRequestScheduler::finalizeTransfer):
* platform/network/curl/CurlRequestScheduler.h:

LayoutTests:

* http/tests/misc/repeat-open-cancel-expected.txt: Added.
* http/tests/misc/repeat-open-cancel.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244684 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/misc/repeat-open-cancel-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/misc/repeat-open-cancel.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/network/curl/CurlRequest.cpp
Source/WebCore/platform/network/curl/CurlRequest.h
Source/WebCore/platform/network/curl/CurlRequestScheduler.cpp
Source/WebCore/platform/network/curl/CurlRequestScheduler.h