IndexedDB: IO error when checking schema should destroy LevelDB directory
authordgrogan@chromium.org <dgrogan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Feb 2013 18:11:23 +0000 (18:11 +0000)
committerdgrogan@chromium.org <dgrogan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Feb 2013 18:11:23 +0000 (18:11 +0000)
commit8d9ba27cdec19dbd36abbb2b87528f8172c0ae08
tree8cd0f466012191513a5dd8e3e3fb045e01e9ef0f
parentd3b961719b6f2d63b5c7508381ac1735d57e20d1
IndexedDB: IO error when checking schema should destroy LevelDB directory
https://bugs.webkit.org/show_bug.cgi?id=110675

Reviewed by Adam Barth.

Source/WebCore:

Also some refactoring to remove IDBBackingStore's dependence on
static LevelDBDatabase methods. This facilitated the unit test.

New unit test - IDBIOErrorTest.CleanUpTest

* Modules/indexeddb/IDBBackingStore.cpp:
(DefaultLevelDBFactory):
Wraps the previous behavior.
(WebCore::IDBBackingStore::open):
The default parameter provides the previous behavior, which is what
non-tests want.
* Modules/indexeddb/IDBBackingStore.h:
* platform/leveldb/LevelDBDatabase.h:

Source/WebKit/chromium:

* WebKit.gyp:
This was cargo-culted. The component build wouldn't run otherwise.

* WebKit.gypi:
* tests/IDBCleanupOnIOErrorTest.cpp: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144323 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBBackingStore.cpp
Source/WebCore/Modules/indexeddb/IDBBackingStore.h
Source/WebCore/platform/leveldb/LevelDBDatabase.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/WebKit.gyp
Source/WebKit/chromium/WebKit.gypi
Source/WebKit/chromium/tests/IDBCleanupOnIOErrorTest.cpp [new file with mode: 0644]