Removing IndexedDatabases that have stored blobs doesn't remove the blob files.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jul 2016 22:32:01 +0000 (22:32 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jul 2016 22:32:01 +0000 (22:32 +0000)
commitc068761bbb84599769d432eebf36aaed2ffaf2b5
treeef5cbc78e7a7b59b9c107d4fa6e064c171e054e3
parentfb699e65c51cc018d2b04f495e89139bf1420678
Removing IndexedDatabases that have stored blobs doesn't remove the blob files.
https://bugs.webkit.org/show_bug.cgi?id=160089

Reviewed by Darin Adler.

Source/WebCore:

Tested by API test IndexedDB.StoreBlobThenDelete.

Blob filenames exist in the IDB directory with the name "[0-9]+.blob".

That is, one or more digits, followed by ".blob".

So when we delete an IndexedDB.sqlite3 and related files, we should delete those blob files as well.

* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::removeAllDatabasesForOriginPath):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/StoreBlobThenDelete.mm: Added.
* TestWebKitAPI/Tests/WebKit2Cocoa/StoreBlobToBeDeleted.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@203622 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/server/IDBServer.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/WebKit2Cocoa/StoreBlobThenDelete.mm [new file with mode: 0644]
Tools/TestWebKitAPI/Tests/WebKit2Cocoa/StoreBlobToBeDeleted.html [new file with mode: 0644]