Factor out the "databaseTaskQueue" parts of IDBServer into something reusable.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 2 Dec 2017 18:00:19 +0000 (18:00 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 2 Dec 2017 18:00:19 +0000 (18:00 +0000)
commit3fd29ab475627cc153388b7fea9ac4401f8a6650
treeb4ee8c5aa5643d411cb0651c3d0d260aae4c1102
parentc8bd9e1a3a4dd510670f42bff5e338e0072fa86b
Factor out the "databaseTaskQueue" parts of IDBServer into something reusable.
https://bugs.webkit.org/show_bug.cgi?id=180298

Reviewed by Chris Dumez.

Source/WebCore:

No new tests (Refactor only).

* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::IDBServer):
(WebCore::IDBServer::IDBServer::postDatabaseTask):
(WebCore::IDBServer::IDBServer::postDatabaseTaskReply):
(WebCore::IDBServer::IDBServer::databaseRunLoop): Deleted.
(WebCore::IDBServer::IDBServer::handleTaskRepliesOnMainThread): Deleted.
* Modules/indexeddb/server/IDBServer.h:
(): Deleted.

Source/WTF:

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:

* wtf/CrossThreadTaskHandler.cpp: Added.
(WTF::CrossThreadTaskHandler::CrossThreadTaskHandler):
(WTF::CrossThreadTaskHandler::~CrossThreadTaskHandler):
(WTF::CrossThreadTaskHandler::postTask):
(WTF::CrossThreadTaskHandler::postTaskReply):
(WTF::CrossThreadTaskHandler::taskRunLoop):
(WTF::CrossThreadTaskHandler::handleTaskRepliesOnMainThread):
* wtf/CrossThreadTaskHandler.h: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225450 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WTF/ChangeLog
Source/WTF/WTF.xcodeproj/project.pbxproj
Source/WTF/wtf/CMakeLists.txt
Source/WTF/wtf/CrossThreadTaskHandler.cpp [new file with mode: 0644]
Source/WTF/wtf/CrossThreadTaskHandler.h [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/server/IDBServer.cpp
Source/WebCore/Modules/indexeddb/server/IDBServer.h