IndexedDB: simplify RecordIdentifier
authoralecflett@chromium.org <alecflett@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Nov 2012 19:15:26 +0000 (19:15 +0000)
committeralecflett@chromium.org <alecflett@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Nov 2012 19:15:26 +0000 (19:15 +0000)
commitb46d52a92d1c996c1e6cacf4efb011def73c9339
treeedfcebd33bb1ea1ea67e77f65f566d9148d50fea
parent3906892860350aec8d92e27f8628bb8a753a6970
IndexedDB: simplify RecordIdentifier
https://bugs.webkit.org/show_bug.cgi?id=102018

Reviewed by Tony Chang.

Source/WebCore:

Make IDBBackingStore's RecordIdentifier be a simple
class, existing only as an inline or stack-based instance.
This makes much of the copy semantics more explicit, and
removes refcounting from an object that only ever had a refcount
of 1 or 2.

No new tests, just a refactor.

* Modules/indexeddb/IDBBackingStore.cpp:
(WebCore::IDBBackingStore::putRecord):
(WebCore::IDBBackingStore::deleteRecord):
(WebCore::IDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber):
(WebCore::IDBBackingStore::keyExistsInObjectStore):
(WebCore::IDBBackingStore::putIndexDataForRecord):
(WebCore::IDBBackingStore::deleteIndexDataForRecord):
(WebCore::ObjectStoreKeyCursorImpl::loadCurrentRow):
(ObjectStoreCursorImpl):
(WebCore::ObjectStoreCursorImpl::loadCurrentRow):
(WebCore::IndexKeyCursorImpl::recordIdentifier):
(WebCore::IndexCursorImpl::recordIdentifier):
* Modules/indexeddb/IDBBackingStore.h:
(WebCore::IDBBackingStore::RecordIdentifier::RecordIdentifier):
(WebCore::IDBBackingStore::RecordIdentifier::isValid):
(WebCore::IDBBackingStore::RecordIdentifier::reset):
(RecordIdentifier):
(IDBBackingStore):
(WebCore::IDBBackingStore::Cursor::recordIdentifier):
(WebCore::IDBBackingStore::Cursor::Cursor):
(Cursor):
* Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
(WebCore):
(WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
(WebCore::IDBObjectStoreBackendImpl::putInternal):
(WebCore::IDBObjectStoreBackendImpl::deleteInternal):

Source/WebKit/chromium:

Update IDBFakeBackingStore to match its parent class.

* tests/IDBFakeBackingStore.h:

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