Remove IDBBackingStoreTemporaryFileHandler
authorsihui_liu@apple.com <sihui_liu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Oct 2019 00:53:20 +0000 (00:53 +0000)
committersihui_liu@apple.com <sihui_liu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Oct 2019 00:53:20 +0000 (00:53 +0000)
commit7511d70361be687fdb81dc417dec7f081cdc6a7f
tree9c757d513dd65c84586780feaacc69f5b282caeb
parentc76a70cddbe4aa7b831acb94f854e83a6358c453
Remove IDBBackingStoreTemporaryFileHandler
https://bugs.webkit.org/show_bug.cgi?id=203128

Reviewed by Alex Christensen.

Source/WebCore:

IDBBackingStoreTemporaryFileHandler has only one member function, and implementation of that is to delete
files. To keep the same behavior, we can remove this class and delete the temporary files at the places where
objects of this class were used.

By doing this, we no longer need to pass the NetworkProcess/InProcessIDBServer all the way down to
SQLiteIDBBackingStore that is used only on background thread.

* Modules/indexeddb/server/IDBBackingStore.h:
* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::create):
(WebCore::IDBServer::IDBServer::IDBServer):
(WebCore::IDBServer::IDBServer::createBackingStore):
* Modules/indexeddb/server/IDBServer.h:
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::SQLiteIDBBackingStore):
* Modules/indexeddb/server/SQLiteIDBBackingStore.h:
(WebCore::IDBServer::SQLiteIDBBackingStore::temporaryFileHandler const): Deleted.
* Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
(WebCore::IDBServer::SQLiteIDBTransaction::moveBlobFilesIfNecessary):
(WebCore::IDBServer::SQLiteIDBTransaction::deleteBlobFilesIfNecessary):
(WebCore::IDBServer::SQLiteIDBTransaction::abort):
* Modules/indexeddb/shared/InProcessIDBServer.cpp:
(WebCore::InProcessIDBServer::InProcessIDBServer):
(WebCore::InProcessIDBServer::accessToTemporaryFileComplete): Deleted.
* Modules/indexeddb/shared/InProcessIDBServer.h:

Source/WebKit:

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::createIDBServer):
(WebKit::NetworkProcess::accessToTemporaryFileComplete): Deleted.
* NetworkProcess/NetworkProcess.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251404 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h
Source/WebCore/Modules/indexeddb/server/IDBServer.cpp
Source/WebCore/Modules/indexeddb/server/IDBServer.h
Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp
Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.h
Source/WebCore/Modules/indexeddb/server/SQLiteIDBTransaction.cpp
Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp
Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/NetworkProcess.cpp
Source/WebKit/NetworkProcess/NetworkProcess.h