Remove unnecessary boolean result of start() functions
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Dec 2017 17:54:39 +0000 (17:54 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Dec 2017 17:54:39 +0000 (17:54 +0000)
commit10480db6b857e314618e57b6330ac68d60bbf692
tree3654b66e6eae0ad5e35ca53cc0923631ffbc274e
parentb0f52fb9b1bb6a2c6fcc1a360f002d8a4755187f
Remove unnecessary boolean result of start() functions
https://bugs.webkit.org/show_bug.cgi?id=180856

Reviewed by Darin Adler.

Source/WebCore:

No behavior change.

* Modules/webaudio/AsyncAudioDecoder.cpp:
(WebCore::AsyncAudioDecoder::~AsyncAudioDecoder):
* Modules/webdatabase/DatabaseContext.cpp:
(WebCore::DatabaseContext::databaseThread):
* Modules/webdatabase/DatabaseThread.cpp:
(WebCore::DatabaseThread::start):
Now `Thread::create` always succeeds (if it fails, WebKit crashes).
DatabaseThread::start() now always returns true. So, we do not need
to return bool.

* Modules/webdatabase/DatabaseThread.h:
* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownload::start):
* platform/network/curl/CurlDownload.h:
* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::start):
* platform/network/curl/ResourceHandleCurlDelegate.cpp:
(WebCore::ResourceHandleCurlDelegate::start):
* platform/network/curl/ResourceHandleCurlDelegate.h:

Source/WebKitLegacy/win:

It always returns true.

* WebDownloadCurl.cpp:
(WebDownload::start):

Source/WTF:

CrossThreadTaskHandler's Thread is just released without calling
either `waitForCompletion` or `detach`. It means that this resource
of the thread is not released.

* benchmarks/ConditionSpeedTest.cpp:
* wtf/CrossThreadTaskHandler.cpp:
(WTF::CrossThreadTaskHandler::CrossThreadTaskHandler):
* wtf/CrossThreadTaskHandler.h:

Tools:

* TestWebKitAPI/Tests/WTF/ParkingLot.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225998 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
Source/WTF/ChangeLog
Source/WTF/benchmarks/ConditionSpeedTest.cpp
Source/WTF/wtf/CrossThreadTaskHandler.cpp
Source/WTF/wtf/CrossThreadTaskHandler.h
Source/WebCore/ChangeLog
Source/WebCore/Modules/webaudio/AsyncAudioDecoder.cpp
Source/WebCore/Modules/webdatabase/DatabaseContext.cpp
Source/WebCore/Modules/webdatabase/DatabaseThread.cpp
Source/WebCore/Modules/webdatabase/DatabaseThread.h
Source/WebCore/platform/network/curl/CurlDownload.cpp
Source/WebCore/platform/network/curl/CurlDownload.h
Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp
Source/WebCore/platform/network/curl/ResourceHandleCurlDelegate.cpp
Source/WebCore/platform/network/curl/ResourceHandleCurlDelegate.h
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/WebDownloadCurl.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WTF/ParkingLot.cpp