IndexedDB: Abort transactions because of leveldb errors part 4
authordgrogan@chromium.org <dgrogan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Dec 2012 22:56:26 +0000 (22:56 +0000)
committerdgrogan@chromium.org <dgrogan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Dec 2012 22:56:26 +0000 (22:56 +0000)
commitc2fb18292a9635a295bd5b81a3ef9ebfcb7810df
tree12219c2016452324ffccd5696356bd717db1c73b
parentddf86fe6c4156df1ac8e57d6713850f290ee5ce6
IndexedDB: Abort transactions because of leveldb errors part 4
https://bugs.webkit.org/show_bug.cgi?id=103964

Reviewed by Tony Chang.

Source/WebCore:

deleteDatabase, open, and deleteObjectStore will now fire more aborts
and errors in case of leveldb problems

* Modules/indexeddb/IDBBackingStore.cpp:
(WebCore::getVarInt): Make return value indicate leveldb error.
(WebCore::getString): ditto.
(WebCore::IDBBackingStore::getIDBDatabaseMetaData):
Change return value to indicate leveldb error.

(WebCore::IDBBackingStore::deleteDatabase):
Already had the desired return value semantics. As a consumer of
getIDBDatabaseMetadata, will return an error (causing an abort) more
often.

(WebCore::IDBBackingStore::deleteObjectStore):
Needed return value change. Will return error to DatabaseBackend to
indicate leveldb problems.

* Modules/indexeddb/IDBBackingStore.h:
(IDBBackingStore):
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::openInternal):
Pass leveldb errors up to callers, who already handle internal errors.

(WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::perform):
Abort transaction if there were leveldb problems deleting an object
store.

Source/WebKit/chromium:

* tests/IDBFakeBackingStore.h:
  Update one overridden method signature, delete another.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@136897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBBackingStore.cpp
Source/WebCore/Modules/indexeddb/IDBBackingStore.h
Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/tests/IDBFakeBackingStore.h