[WKWebsiteDataStore removeDataOfTypes:...] doesn't work for IndexedDB if the data...
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 May 2017 00:49:33 +0000 (00:49 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 May 2017 00:49:33 +0000 (00:49 +0000)
commite81412775f1c032785ba80925a2faf284b498b2a
tree256d8ae4f083e893c3e53d42c181ebe739373b7b
parent13723d82bdce290d984aed8162250268401a4813
[WKWebsiteDataStore removeDataOfTypes:...] doesn't work for IndexedDB if the data store has a custom IDB path.
<rdar://problem/30612463> and https://bugs.webkit.org/show_bug.cgi?id=171994

Reviewed by Andy Estes.
Informal review by Maureen Daum.

Source/WebKit2:

* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::deleteWebsiteData): Instead of accessing the m_idbServers set directly, make
  the method call that creates the server on demand.
(WebKit::DatabaseProcess::deleteWebsiteDataForOrigins): Ditto.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureDatabaseProcessAndWebsiteDataStore): Not only create the DatabaseProcess if necessary,
  but also notify it about the passed-in WebsiteDataStore.
(WebKit::WebProcessPool::getDatabaseProcessConnection):
(WebKit::WebProcessPool::ensureDatabaseProcess): Deleted.
* UIProcess/WebProcessPool.h:
(WebKit::WebProcessPool::sendToDatabaseProcessRelaunchingIfNecessary):

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchData):
(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::databaseProcessParameters):

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/WebsiteDataStoreCustomPaths.mm:
(TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216711 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp
Source/WebKit2/UIProcess/WebProcessPool.cpp
Source/WebKit2/UIProcess/WebProcessPool.h
Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WebsiteDataStoreCustomPaths.mm