Modules/indexeddb/IDBCursor.cpp
Modules/indexeddb/IDBCursorWithValue.cpp
Modules/indexeddb/IDBDatabase.cpp
+ Modules/indexeddb/IDBDatabaseBackendImpl.cpp
Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp
Modules/indexeddb/IDBDatabaseException.cpp
Modules/indexeddb/IDBEventDispatcher.cpp
Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp
Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp
Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp
- Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp
Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp
Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp
Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp
+2013-10-23 Brady Eidson <beidson@apple.com>
+
+ Make IDBDatabaseBackendLevelDB.cpp be cross platform
+ https://bugs.webkit.org/show_bug.cgi?id=123027
+
+ Attentively reviewed by Dean Jackson.
+
+ Move it out of the indexeddb/leveldb directory, and rename it to IDBDatabaseBackendImpl.
+
+ Project files:
+ * CMakeLists.txt:
+ * GNUmakefile.list.am:
+ * WebCore.vcxproj/WebCore.vcxproj:
+ * WebCore.vcxproj/WebCore.vcxproj.filters:
+ * WebCore.xcodeproj/project.pbxproj:
+
+ * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp.
+ * Modules/indexeddb/IDBDatabaseBackendImpl.h: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h.
+
+ * Modules/indexeddb/IDBDatabaseBackendInterface.h:
+ (WebCore::IDBDatabaseBackendInterface::isIDBDatabaseBackendImpl): Add to support a required cast in LevelDB code.
+
+ * Modules/indexeddb/IDBFactoryBackendInterface.h:
+
+ * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
+ * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
+
+ * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
+ (WebCore::IDBFactoryBackendLevelDB::deleteDatabase):
+ (WebCore::IDBFactoryBackendLevelDB::open):
+ (WebCore::IDBFactoryBackendLevelDB::maybeCreateTransactionBackend):
+ * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
+
+ * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
+ * Modules/indexeddb/leveldb/IDBLevelDBCoding.h:
+
+ * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
+ (WebCore::IDBTransactionBackendLevelDB::create):
+ (WebCore::IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB):
+ (WebCore::IDBTransactionBackendLevelDB::scheduleVersionChangeOperation):
+ * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
+
+ * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
+ (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
+ (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform):
+ * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h:
+
2013-10-23 Daniel Bates <dabates@apple.com>
[iOS] Upstream more ARMv7s bits
Source/WebCore/Modules/indexeddb/IDBCursor.h \
Source/WebCore/Modules/indexeddb/IDBCursorWithValue.cpp \
Source/WebCore/Modules/indexeddb/IDBCursorWithValue.h \
- Source/WebCore/Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp \
- Source/WebCore/Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h \
+ Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp \
+ Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.h \
Source/WebCore/Modules/indexeddb/IDBDatabaseBackendInterface.h \
Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacks.h \
Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp \
*/
#include "config.h"
-#include "IDBDatabaseBackendLevelDB.h"
+#include "IDBDatabaseBackendImpl.h"
#if ENABLE(INDEXED_DATABASE)
namespace WebCore {
-PassRefPtr<IDBDatabaseBackendLevelDB> IDBDatabaseBackendLevelDB::create(const String& name, IDBBackingStoreInterface* backingStore, IDBFactoryBackendInterface* factory, const String& uniqueIdentifier)
+PassRefPtr<IDBDatabaseBackendImpl> IDBDatabaseBackendImpl::create(const String& name, IDBBackingStoreInterface* backingStore, IDBFactoryBackendInterface* factory, const String& uniqueIdentifier)
{
- RefPtr<IDBDatabaseBackendLevelDB> backend = adoptRef(new IDBDatabaseBackendLevelDB(name, backingStore, factory, uniqueIdentifier));
+ RefPtr<IDBDatabaseBackendImpl> backend = adoptRef(new IDBDatabaseBackendImpl(name, backingStore, factory, uniqueIdentifier));
if (!backend->openInternal())
return 0;
return backend.release();
}
-IDBDatabaseBackendLevelDB::IDBDatabaseBackendLevelDB(const String& name, IDBBackingStoreInterface* backingStore, IDBFactoryBackendInterface* factory, const String& uniqueIdentifier)
+IDBDatabaseBackendImpl::IDBDatabaseBackendImpl(const String& name, IDBBackingStoreInterface* backingStore, IDBFactoryBackendInterface* factory, const String& uniqueIdentifier)
: m_backingStore(backingStore)
, m_metadata(name, InvalidId, 0, InvalidId)
, m_identifier(uniqueIdentifier)
ASSERT(!m_metadata.name.isNull());
}
-void IDBDatabaseBackendLevelDB::addObjectStore(const IDBObjectStoreMetadata& objectStore, int64_t newMaxObjectStoreId)
+void IDBDatabaseBackendImpl::addObjectStore(const IDBObjectStoreMetadata& objectStore, int64_t newMaxObjectStoreId)
{
ASSERT(!m_metadata.objectStores.contains(objectStore.id));
if (newMaxObjectStoreId != IDBObjectStoreMetadata::InvalidId) {
m_metadata.objectStores.set(objectStore.id, objectStore);
}
-void IDBDatabaseBackendLevelDB::removeObjectStore(int64_t objectStoreId)
+void IDBDatabaseBackendImpl::removeObjectStore(int64_t objectStoreId)
{
ASSERT(m_metadata.objectStores.contains(objectStoreId));
m_metadata.objectStores.remove(objectStoreId);
}
-void IDBDatabaseBackendLevelDB::addIndex(int64_t objectStoreId, const IDBIndexMetadata& index, int64_t newMaxIndexId)
+void IDBDatabaseBackendImpl::addIndex(int64_t objectStoreId, const IDBIndexMetadata& index, int64_t newMaxIndexId)
{
ASSERT(m_metadata.objectStores.contains(objectStoreId));
IDBObjectStoreMetadata objectStore = m_metadata.objectStores.get(objectStoreId);
m_metadata.objectStores.set(objectStoreId, objectStore);
}
-void IDBDatabaseBackendLevelDB::removeIndex(int64_t objectStoreId, int64_t indexId)
+void IDBDatabaseBackendImpl::removeIndex(int64_t objectStoreId, int64_t indexId)
{
ASSERT(m_metadata.objectStores.contains(objectStoreId));
IDBObjectStoreMetadata objectStore = m_metadata.objectStores.get(objectStoreId);
m_metadata.objectStores.set(objectStoreId, objectStore);
}
-bool IDBDatabaseBackendLevelDB::openInternal()
+bool IDBDatabaseBackendImpl::openInternal()
{
bool success = false;
bool ok = m_backingStore->getIDBDatabaseMetaData(m_metadata.name, &m_metadata, success);
return m_backingStore->createIDBDatabaseMetaData(m_metadata.name, String::number(m_metadata.version), m_metadata.version, m_metadata.id);
}
-IDBDatabaseBackendLevelDB::~IDBDatabaseBackendLevelDB()
+IDBDatabaseBackendImpl::~IDBDatabaseBackendImpl()
{
}
-IDBBackingStoreInterface* IDBDatabaseBackendLevelDB::backingStore() const
+IDBBackingStoreInterface* IDBDatabaseBackendImpl::backingStore() const
{
return m_backingStore.get();
}
-void IDBDatabaseBackendLevelDB::createObjectStore(int64_t transactionId, int64_t objectStoreId, const String& name, const IDBKeyPath& keyPath, bool autoIncrement)
+void IDBDatabaseBackendImpl::createObjectStore(int64_t transactionId, int64_t objectStoreId, const String& name, const IDBKeyPath& keyPath, bool autoIncrement)
{
- LOG(StorageAPI, "IDBDatabaseBackendLevelDB::createObjectStore");
+ LOG(StorageAPI, "IDBDatabaseBackendImpl::createObjectStore");
IDBTransactionBackendInterface* transaction = m_transactions.get(transactionId);
if (!transaction)
return;
addObjectStore(objectStoreMetadata, objectStoreId);
}
-void IDBDatabaseBackendLevelDB::deleteObjectStore(int64_t transactionId, int64_t objectStoreId)
+void IDBDatabaseBackendImpl::deleteObjectStore(int64_t transactionId, int64_t objectStoreId)
{
- LOG(StorageAPI, "IDBDatabaseBackendLevelDB::deleteObjectStore");
+ LOG(StorageAPI, "IDBDatabaseBackendImpl::deleteObjectStore");
IDBTransactionBackendInterface* transaction = m_transactions.get(transactionId);
if (!transaction)
return;
removeObjectStore(objectStoreId);
}
-void IDBDatabaseBackendLevelDB::createIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId, const String& name, const IDBKeyPath& keyPath, bool unique, bool multiEntry)
+void IDBDatabaseBackendImpl::createIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId, const String& name, const IDBKeyPath& keyPath, bool unique, bool multiEntry)
{
- LOG(StorageAPI, "IDBDatabaseBackendLevelDB::createIndex");
+ LOG(StorageAPI, "IDBDatabaseBackendImpl::createIndex");
IDBTransactionBackendInterface* transaction = m_transactions.get(transactionId);
if (!transaction)
return;
addIndex(objectStoreId, indexMetadata, indexId);
}
-void IDBDatabaseBackendLevelDB::deleteIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId)
+void IDBDatabaseBackendImpl::deleteIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId)
{
- LOG(StorageAPI, "IDBDatabaseBackendLevelDB::deleteIndex");
+ LOG(StorageAPI, "IDBDatabaseBackendImpl::deleteIndex");
IDBTransactionBackendInterface* transaction = m_transactions.get(transactionId);
if (!transaction)
return;
removeIndex(objectStoreId, indexId);
}
-void IDBDatabaseBackendLevelDB::commit(int64_t transactionId)
+void IDBDatabaseBackendImpl::commit(int64_t transactionId)
{
// The frontend suggests that we commit, but we may have previously initiated an abort, and so have disposed of the transaction. onAbort has already been dispatched to the frontend, so it will find out about that asynchronously.
if (m_transactions.contains(transactionId))
m_transactions.get(transactionId)->commit();
}
-void IDBDatabaseBackendLevelDB::abort(int64_t transactionId)
+void IDBDatabaseBackendImpl::abort(int64_t transactionId)
{
// If the transaction is unknown, then it has already been aborted by the backend before this call so it is safe to ignore it.
if (m_transactions.contains(transactionId))
m_transactions.get(transactionId)->abort();
}
-void IDBDatabaseBackendLevelDB::abort(int64_t transactionId, PassRefPtr<IDBDatabaseError> error)
+void IDBDatabaseBackendImpl::abort(int64_t transactionId, PassRefPtr<IDBDatabaseError> error)
{
// If the transaction is unknown, then it has already been aborted by the backend before this call so it is safe to ignore it.
if (m_transactions.contains(transactionId))
m_transactions.get(transactionId)->abort(error);
}
-void IDBDatabaseBackendLevelDB::get(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange> keyRange, bool keyOnly, PassRefPtr<IDBCallbacks> callbacks)
+void IDBDatabaseBackendImpl::get(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange> keyRange, bool keyOnly, PassRefPtr<IDBCallbacks> callbacks)
{
- LOG(StorageAPI, "IDBDatabaseBackendLevelDB::get");
+ LOG(StorageAPI, "IDBDatabaseBackendImpl::get");
IDBTransactionBackendInterface* transaction = m_transactions.get(transactionId);
if (!transaction)
return;
transaction->scheduleGetOperation(m_metadata, objectStoreId, indexId, keyRange, keyOnly ? IndexedDB::CursorKeyOnly : IndexedDB::CursorKeyAndValue, callbacks);
}
-void IDBDatabaseBackendLevelDB::put(int64_t transactionId, int64_t objectStoreId, PassRefPtr<SharedBuffer> value, PassRefPtr<IDBKey> key, PutMode putMode, PassRefPtr<IDBCallbacks> callbacks, const Vector<int64_t>& indexIds, const Vector<IndexKeys>& indexKeys)
+void IDBDatabaseBackendImpl::put(int64_t transactionId, int64_t objectStoreId, PassRefPtr<SharedBuffer> value, PassRefPtr<IDBKey> key, PutMode putMode, PassRefPtr<IDBCallbacks> callbacks, const Vector<int64_t>& indexIds, const Vector<IndexKeys>& indexKeys)
{
- LOG(StorageAPI, "IDBDatabaseBackendLevelDB::put");
+ LOG(StorageAPI, "IDBDatabaseBackendImpl::put");
IDBTransactionBackendInterface* transaction = m_transactions.get(transactionId);
if (!transaction)
return;
transaction->schedulePutOperation(objectStoreMetadata, value, key, putMode, callbacks, indexIds, indexKeys);
}
-void IDBDatabaseBackendLevelDB::setIndexKeys(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBKey> prpPrimaryKey, const Vector<int64_t>& indexIds, const Vector<IndexKeys>& indexKeys)
+void IDBDatabaseBackendImpl::setIndexKeys(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBKey> prpPrimaryKey, const Vector<int64_t>& indexIds, const Vector<IndexKeys>& indexKeys)
{
- LOG(StorageAPI, "IDBDatabaseBackendLevelDB::setIndexKeys");
+ LOG(StorageAPI, "IDBDatabaseBackendImpl::setIndexKeys");
ASSERT(prpPrimaryKey);
IDBTransactionBackendInterface* transaction = m_transactions.get(transactionId);
}
}
-void IDBDatabaseBackendLevelDB::setIndexesReady(int64_t transactionId, int64_t, const Vector<int64_t>& indexIds)
+void IDBDatabaseBackendImpl::setIndexesReady(int64_t transactionId, int64_t, const Vector<int64_t>& indexIds)
{
- LOG(StorageAPI, "IDBDatabaseBackendLevelDB::setIndexesReady");
+ LOG(StorageAPI, "IDBDatabaseBackendImpl::setIndexesReady");
IDBTransactionBackendInterface* transaction = m_transactions.get(transactionId);
if (!transaction)
transaction->scheduleSetIndexesReadyOperation(indexIds.size());
}
-void IDBDatabaseBackendLevelDB::openCursor(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange> keyRange, IndexedDB::CursorDirection direction, bool keyOnly, TaskType taskType, PassRefPtr<IDBCallbacks> callbacks)
+void IDBDatabaseBackendImpl::openCursor(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange> keyRange, IndexedDB::CursorDirection direction, bool keyOnly, TaskType taskType, PassRefPtr<IDBCallbacks> callbacks)
{
- LOG(StorageAPI, "IDBDatabaseBackendLevelDB::openCursor");
+ LOG(StorageAPI, "IDBDatabaseBackendImpl::openCursor");
IDBTransactionBackendInterface* transaction = m_transactions.get(transactionId);
if (!transaction)
return;
transaction->scheduleOpenCursorOperation(objectStoreId, indexId, keyRange, direction, keyOnly ? IndexedDB::CursorKeyOnly : IndexedDB::CursorKeyAndValue, taskType, callbacks);
}
-void IDBDatabaseBackendLevelDB::count(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange> keyRange, PassRefPtr<IDBCallbacks> callbacks)
+void IDBDatabaseBackendImpl::count(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange> keyRange, PassRefPtr<IDBCallbacks> callbacks)
{
- LOG(StorageAPI, "IDBDatabaseBackendLevelDB::count");
+ LOG(StorageAPI, "IDBDatabaseBackendImpl::count");
IDBTransactionBackendInterface* transaction = m_transactions.get(transactionId);
if (!transaction)
return;
}
-void IDBDatabaseBackendLevelDB::deleteRange(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBKeyRange> keyRange, PassRefPtr<IDBCallbacks> callbacks)
+void IDBDatabaseBackendImpl::deleteRange(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBKeyRange> keyRange, PassRefPtr<IDBCallbacks> callbacks)
{
- LOG(StorageAPI, "IDBDatabaseBackendLevelDB::deleteRange");
+ LOG(StorageAPI, "IDBDatabaseBackendImpl::deleteRange");
IDBTransactionBackendInterface* transaction = m_transactions.get(transactionId);
if (!transaction)
return;
transaction->scheduleDeleteRangeOperation(objectStoreId, keyRange, callbacks);
}
-void IDBDatabaseBackendLevelDB::clear(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBCallbacks> callbacks)
+void IDBDatabaseBackendImpl::clear(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBCallbacks> callbacks)
{
- LOG(StorageAPI, "IDBDatabaseBackendLevelDB::clear");
+ LOG(StorageAPI, "IDBDatabaseBackendImpl::clear");
IDBTransactionBackendInterface* transaction = m_transactions.get(transactionId);
if (!transaction)
return;
transaction->scheduleClearOperation(objectStoreId, callbacks);
}
-void IDBDatabaseBackendLevelDB::transactionStarted(IDBTransactionBackendInterface* transaction)
+void IDBDatabaseBackendImpl::transactionStarted(IDBTransactionBackendInterface* transaction)
{
if (transaction->mode() == IndexedDB::TransactionVersionChange) {
ASSERT(!m_runningVersionChangeTransaction);
}
}
-void IDBDatabaseBackendLevelDB::transactionFinished(IDBTransactionBackendInterface* rawTransaction)
+void IDBDatabaseBackendImpl::transactionFinished(IDBTransactionBackendInterface* rawTransaction)
{
RefPtr<IDBTransactionBackendInterface> transaction = rawTransaction;
ASSERT(m_transactions.contains(transaction->id()));
}
}
-void IDBDatabaseBackendLevelDB::transactionFinishedAndAbortFired(IDBTransactionBackendInterface* rawTransaction)
+void IDBDatabaseBackendImpl::transactionFinishedAndAbortFired(IDBTransactionBackendInterface* rawTransaction)
{
RefPtr<IDBTransactionBackendInterface> transaction = rawTransaction;
if (transaction->mode() == IndexedDB::TransactionVersionChange) {
}
}
-void IDBDatabaseBackendLevelDB::transactionFinishedAndCompleteFired(IDBTransactionBackendInterface* rawTransaction)
+void IDBDatabaseBackendImpl::transactionFinishedAndCompleteFired(IDBTransactionBackendInterface* rawTransaction)
{
RefPtr<IDBTransactionBackendInterface> transaction = rawTransaction;
if (transaction->mode() == IndexedDB::TransactionVersionChange)
processPendingCalls();
}
-size_t IDBDatabaseBackendLevelDB::connectionCount()
+size_t IDBDatabaseBackendImpl::connectionCount()
{
// This does not include pending open calls, as those should not block version changes and deletes.
return m_databaseCallbacksSet.size();
}
-void IDBDatabaseBackendLevelDB::processPendingCalls()
+void IDBDatabaseBackendImpl::processPendingCalls()
{
if (m_pendingSecondHalfOpen) {
// FIXME: Database versions are now of type uint64_t, but this code expected int64_t.
}
}
-void IDBDatabaseBackendLevelDB::createTransaction(int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks> callbacks, const Vector<int64_t>& objectStoreIds, unsigned short mode)
+void IDBDatabaseBackendImpl::createTransaction(int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks> callbacks, const Vector<int64_t>& objectStoreIds, unsigned short mode)
{
- RefPtr<IDBTransactionBackendInterface> transaction = m_factory->createTransactionBackend(this, transactionId, callbacks, objectStoreIds, static_cast<IndexedDB::TransactionMode>(mode));
+ RefPtr<IDBTransactionBackendInterface> transaction = m_factory->maybeCreateTransactionBackend(this, transactionId, callbacks, objectStoreIds, static_cast<IndexedDB::TransactionMode>(mode));
+
+ if (!transaction)
+ return;
ASSERT(!m_transactions.contains(transactionId));
m_transactions.add(transactionId, transaction.get());
}
-void IDBDatabaseBackendLevelDB::openConnection(PassRefPtr<IDBCallbacks> prpCallbacks, PassRefPtr<IDBDatabaseCallbacks> prpDatabaseCallbacks, int64_t transactionId, int64_t version)
+void IDBDatabaseBackendImpl::openConnection(PassRefPtr<IDBCallbacks> prpCallbacks, PassRefPtr<IDBDatabaseCallbacks> prpDatabaseCallbacks, int64_t transactionId, int64_t version)
{
ASSERT(m_backingStore.get());
RefPtr<IDBCallbacks> callbacks = prpCallbacks;
callbacks->onSuccess(this, this->metadata());
}
-void IDBDatabaseBackendLevelDB::runIntVersionChangeTransaction(PassRefPtr<IDBCallbacks> prpCallbacks, PassRefPtr<IDBDatabaseCallbacks> prpDatabaseCallbacks, int64_t transactionId, int64_t requestedVersion)
+void IDBDatabaseBackendImpl::runIntVersionChangeTransaction(PassRefPtr<IDBCallbacks> prpCallbacks, PassRefPtr<IDBDatabaseCallbacks> prpDatabaseCallbacks, int64_t transactionId, int64_t requestedVersion)
{
RefPtr<IDBCallbacks> callbacks = prpCallbacks;
RefPtr<IDBDatabaseCallbacks> databaseCallbacks = prpDatabaseCallbacks;
m_databaseCallbacksSet.add(databaseCallbacks);
}
-void IDBDatabaseBackendLevelDB::deleteDatabase(PassRefPtr<IDBCallbacks> prpCallbacks)
+void IDBDatabaseBackendImpl::deleteDatabase(PassRefPtr<IDBCallbacks> prpCallbacks)
{
RefPtr<IDBCallbacks> callbacks = prpCallbacks;
if (isDeleteDatabaseBlocked()) {
deleteDatabaseFinal(callbacks.release());
}
-bool IDBDatabaseBackendLevelDB::isDeleteDatabaseBlocked()
+bool IDBDatabaseBackendImpl::isDeleteDatabaseBlocked()
{
return connectionCount();
}
-void IDBDatabaseBackendLevelDB::deleteDatabaseFinal(PassRefPtr<IDBCallbacks> callbacks)
+void IDBDatabaseBackendImpl::deleteDatabaseFinal(PassRefPtr<IDBCallbacks> callbacks)
{
ASSERT(!isDeleteDatabaseBlocked());
ASSERT(m_backingStore);
callbacks->onSuccess();
}
-void IDBDatabaseBackendLevelDB::close(PassRefPtr<IDBDatabaseCallbacks> prpCallbacks)
+void IDBDatabaseBackendImpl::close(PassRefPtr<IDBDatabaseCallbacks> prpCallbacks)
{
RefPtr<IDBDatabaseCallbacks> callbacks = prpCallbacks;
ASSERT(m_databaseCallbacksSet.contains(callbacks));
return;
// processPendingCalls allows the inspector to process a pending open call
- // and call close, reentering IDBDatabaseBackendLevelDB::close. Then the
+ // and call close, reentering IDBDatabaseBackendImpl::close. Then the
// backend would be removed both by the inspector closing its connection, and
// by the connection that first called close.
// To avoid that situation, don't proceed in case of reentrancy.
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef IDBDatabaseBackendLevelDB_h
-#define IDBDatabaseBackendLevelDB_h
+#ifndef IDBDatabaseBackendImpl_h
+#define IDBDatabaseBackendImpl_h
#include "IDBCallbacks.h"
#include "IDBDatabaseCallbacks.h"
class IDBTransactionBackendInterface;
class IDBTransactionCoordinator;
-class IDBDatabaseBackendLevelDB : public IDBDatabaseBackendInterface {
+class IDBDatabaseBackendImpl FINAL : public IDBDatabaseBackendInterface {
public:
- static PassRefPtr<IDBDatabaseBackendLevelDB> create(const String& name, IDBBackingStoreInterface*, IDBFactoryBackendInterface*, const String& uniqueIdentifier);
- virtual ~IDBDatabaseBackendLevelDB();
+ static PassRefPtr<IDBDatabaseBackendImpl> create(const String& name, IDBBackingStoreInterface*, IDBFactoryBackendInterface*, const String& uniqueIdentifier);
+ virtual ~IDBDatabaseBackendImpl();
IDBBackingStoreInterface* backingStore() const;
virtual void deleteRange(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBKeyRange>, PassRefPtr<IDBCallbacks>) OVERRIDE;
virtual void clear(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBCallbacks>) OVERRIDE;
+ virtual bool isIDBDatabaseBackendImpl() OVERRIDE { return true; }
+
class VersionChangeOperation;
class VersionChangeAbortOperation;
private:
- IDBDatabaseBackendLevelDB(const String& name, IDBBackingStoreInterface*, IDBFactoryBackendInterface*, const String& uniqueIdentifier);
+ IDBDatabaseBackendImpl(const String& name, IDBBackingStoreInterface*, IDBFactoryBackendInterface*, const String& uniqueIdentifier);
bool openInternal();
void runIntVersionChangeTransaction(PassRefPtr<IDBCallbacks>, PassRefPtr<IDBDatabaseCallbacks>, int64_t transactionId, int64_t requestedVersion);
#endif // ENABLE(INDEXED_DATABASE)
-#endif // IDBDatabaseBackendLevelDB_h
+#endif // IDBDatabaseBackendImpl_h
namespace WebCore {
+class IDBBackingStoreInterface;
class IDBCallbacks;
class IDBDatabaseCallbacks;
class IDBKey;
virtual void count(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange>, PassRefPtr<IDBCallbacks>) = 0;
virtual void deleteRange(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBKeyRange>, PassRefPtr<IDBCallbacks>) = 0;
virtual void clear(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBCallbacks>) = 0;
+
+ virtual bool isIDBDatabaseBackendImpl() { return false; }
};
} // namespace WebCore
class IDBBackingStoreInterface;
class IDBCallbacks;
class IDBDatabase;
-class IDBDatabaseBackendLevelDB; // FIXME: This is a LevelDB specific type for now. http://webkit.org/b/123027 will fix that.
+class IDBDatabaseBackendInterface;
class IDBDatabaseCallbacks;
class IDBTransactionBackendInterface;
class SecurityOrigin;
virtual void removeIDBDatabaseBackend(const String& uniqueIdentifier) = 0;
- virtual PassRefPtr<IDBTransactionBackendInterface> createTransactionBackend(IDBDatabaseBackendLevelDB*, int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks>, const Vector<int64_t>& objectStoreIds, IndexedDB::TransactionMode) = 0;
+ virtual PassRefPtr<IDBTransactionBackendInterface> maybeCreateTransactionBackend(IDBDatabaseBackendInterface*, int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks>, const Vector<int64_t>& objectStoreIds, IndexedDB::TransactionMode) = 0;
};
} // namespace WebCore
#include "IDBBackingStoreLevelDB.h"
#include "IDBCallbacks.h"
-#include "IDBDatabaseBackendLevelDB.h"
+#include "IDBDatabaseBackendImpl.h"
#include "IDBDatabaseCallbacks.h"
#include "IDBDatabaseError.h"
#include "IDBDatabaseException.h"
#include "IDBBackingStoreLevelDB.h"
#include "IDBCursorBackendInterface.h"
-#include "IDBDatabaseBackendLevelDB.h"
+#include "IDBDatabaseBackendImpl.h"
#include "IDBTransactionBackendLevelDB.h"
#include "SharedBuffer.h"
#include <wtf/OwnPtr.h>
IDBDatabaseBackendInterface::TaskType m_taskType;
IndexedDB::CursorType m_cursorType;
- const RefPtr<IDBDatabaseBackendLevelDB> m_database;
+ const RefPtr<IDBDatabaseBackendImpl> m_database;
RefPtr<IDBTransactionBackendLevelDB> m_transaction;
const int64_t m_objectStoreId;
#include "DOMStringList.h"
#include "IDBBackingStoreLevelDB.h"
-#include "IDBDatabaseBackendLevelDB.h"
+#include "IDBDatabaseBackendImpl.h"
#include "IDBDatabaseException.h"
#include "IDBTransactionBackendLevelDB.h"
#include "IDBTransactionCoordinator.h"
return;
}
- RefPtr<IDBDatabaseBackendLevelDB> databaseBackend = IDBDatabaseBackendLevelDB::create(name, backingStore.get(), this, uniqueIdentifier);
+ RefPtr<IDBDatabaseBackendImpl> databaseBackend = IDBDatabaseBackendImpl::create(name, backingStore.get(), this, uniqueIdentifier);
if (databaseBackend) {
m_databaseBackendMap.set(uniqueIdentifier, databaseBackend.get());
databaseBackend->deleteDatabase(callbacks);
RefPtr<SecurityOrigin> securityOrigin = prpSecurityOrigin;
const String uniqueIdentifier = computeUniqueIdentifier(name, securityOrigin.get());
- RefPtr<IDBDatabaseBackendLevelDB> databaseBackend;
+ RefPtr<IDBDatabaseBackendImpl> databaseBackend;
IDBDatabaseBackendMap::iterator it = m_databaseBackendMap.find(uniqueIdentifier);
if (it == m_databaseBackendMap.end()) {
RefPtr<IDBBackingStoreLevelDB> backingStore = openBackingStore(securityOrigin, dataDirectory);
return;
}
- databaseBackend = IDBDatabaseBackendLevelDB::create(name, backingStore.get(), this, uniqueIdentifier);
+ databaseBackend = IDBDatabaseBackendImpl::create(name, backingStore.get(), this, uniqueIdentifier);
if (databaseBackend)
m_databaseBackendMap.set(uniqueIdentifier, databaseBackend.get());
else {
databaseBackend->openConnection(callbacks, databaseCallbacks, transactionId, version);
}
-PassRefPtr<IDBTransactionBackendInterface> IDBFactoryBackendLevelDB::createTransactionBackend(IDBDatabaseBackendLevelDB* backend, int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks> databaseCallbacks, const Vector<int64_t>& objectStoreIds, IndexedDB::TransactionMode mode)
+PassRefPtr<IDBTransactionBackendInterface> IDBFactoryBackendLevelDB::maybeCreateTransactionBackend(IDBDatabaseBackendInterface* backend, int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks> databaseCallbacks, const Vector<int64_t>& objectStoreIds, IndexedDB::TransactionMode mode)
{
- return IDBTransactionBackendLevelDB::create(backend, transactionId, databaseCallbacks, objectStoreIds, mode);
+ if (!backend->isIDBDatabaseBackendImpl())
+ return 0;
+
+ return IDBTransactionBackendLevelDB::create(static_cast<IDBDatabaseBackendImpl*>(backend), transactionId, databaseCallbacks, objectStoreIds, mode);
}
} // namespace WebCore
class DOMStringList;
class IDBBackingStoreLevelDB;
-class IDBDatabaseBackendLevelDB;
+class IDBDatabaseBackendImpl;
class IDBFactoryBackendLevelDB : public IDBFactoryBackendInterface {
public:
virtual void deleteDatabase(const String& name, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, ScriptExecutionContext*, const String& dataDir) OVERRIDE FINAL;
- virtual PassRefPtr<IDBTransactionBackendInterface> createTransactionBackend(IDBDatabaseBackendLevelDB*, int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks>, const Vector<int64_t>&, IndexedDB::TransactionMode) OVERRIDE FINAL;
+ virtual PassRefPtr<IDBTransactionBackendInterface> maybeCreateTransactionBackend(IDBDatabaseBackendInterface*, int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks>, const Vector<int64_t>&, IndexedDB::TransactionMode) OVERRIDE FINAL;
protected:
virtual PassRefPtr<IDBBackingStoreLevelDB> openBackingStore(PassRefPtr<SecurityOrigin>, const String& dataDir);
private:
- typedef HashMap<String, RefPtr<IDBDatabaseBackendLevelDB> > IDBDatabaseBackendMap;
+ typedef HashMap<String, RefPtr<IDBDatabaseBackendImpl> > IDBDatabaseBackendMap;
IDBDatabaseBackendMap m_databaseBackendMap;
typedef HashMap<String, WeakPtr<IDBBackingStoreLevelDB> > IDBBackingStoreLevelDBMap;
}
// FIXME: We never use this to look up object store ids, because a mapping
-// is kept in the IDBDatabaseBackendLevelDB. Can the mapping become unreliable?
+// is kept in the IDBDatabaseBackendImpl. Can the mapping become unreliable?
// Can we remove this?
const char* ObjectStoreNamesKey::decode(const char* start, const char* limit, ObjectStoreNamesKey* result)
{
class ObjectStoreNamesKey {
public:
// FIXME: We never use this to look up object store ids, because a mapping
- // is kept in the IDBDatabaseBackendLevelDB. Can the mapping become unreliable?
+ // is kept in the IDBDatabaseBackendImpl. Can the mapping become unreliable?
// Can we remove this?
static const char* decode(const char* start, const char* limit, ObjectStoreNamesKey* result);
static Vector<char> encode(int64_t databaseId, const String& objectStoreName);
#include "IDBBackingStoreLevelDB.h"
#include "IDBCursorBackendLevelDB.h"
-#include "IDBDatabaseBackendLevelDB.h"
+#include "IDBDatabaseBackendImpl.h"
#include "IDBDatabaseCallbacks.h"
#include "IDBDatabaseException.h"
#include "IDBKeyRange.h"
namespace WebCore {
-PassRefPtr<IDBTransactionBackendLevelDB> IDBTransactionBackendLevelDB::create(IDBDatabaseBackendLevelDB* databaseBackend, int64_t id, PassRefPtr<IDBDatabaseCallbacks> callbacks, const Vector<int64_t>& objectStoreIds, IndexedDB::TransactionMode mode)
+PassRefPtr<IDBTransactionBackendLevelDB> IDBTransactionBackendLevelDB::create(IDBDatabaseBackendImpl* databaseBackend, int64_t id, PassRefPtr<IDBDatabaseCallbacks> callbacks, const Vector<int64_t>& objectStoreIds, IndexedDB::TransactionMode mode)
{
HashSet<int64_t> objectStoreHashSet;
for (size_t i = 0; i < objectStoreIds.size(); ++i)
return adoptRef(new IDBTransactionBackendLevelDB(databaseBackend, id, callbacks, objectStoreHashSet, mode));
}
-IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB(IDBDatabaseBackendLevelDB* databaseBackend, int64_t id, PassRefPtr<IDBDatabaseCallbacks> callbacks, const HashSet<int64_t>& objectStoreIds, IndexedDB::TransactionMode mode)
+IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB(IDBDatabaseBackendImpl* databaseBackend, int64_t id, PassRefPtr<IDBDatabaseCallbacks> callbacks, const HashSet<int64_t>& objectStoreIds, IndexedDB::TransactionMode mode)
: IDBTransactionBackendInterface(id)
, m_objectStoreIds(objectStoreIds)
, m_mode(mode)
void IDBTransactionBackendLevelDB::scheduleVersionChangeOperation(int64_t transactionId, int64_t requestedVersion, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<IDBDatabaseCallbacks> databaseCallbacks, const IDBDatabaseMetadata& metadata)
{
- scheduleTask(IDBDatabaseBackendLevelDB::VersionChangeOperation::create(this, transactionId, requestedVersion, callbacks, databaseCallbacks), IDBDatabaseBackendLevelDB::VersionChangeAbortOperation::create(this, String::number(metadata.version), metadata.version));
+ scheduleTask(IDBDatabaseBackendImpl::VersionChangeOperation::create(this, transactionId, requestedVersion, callbacks, databaseCallbacks), IDBDatabaseBackendImpl::VersionChangeAbortOperation::create(this, String::number(metadata.version), metadata.version));
}
void IDBTransactionBackendLevelDB::scheduleCreateIndexOperation(int64_t objectStoreId, const IDBIndexMetadata& indexMetadata)
#if ENABLE(INDEXED_DATABASE) && USE(LEVELDB)
#include "IDBBackingStoreLevelDB.h"
+#include "IDBDatabaseBackendImpl.h"
#include "IDBDatabaseBackendInterface.h"
-#include "IDBDatabaseBackendLevelDB.h"
#include "IDBDatabaseError.h"
#include "IDBTransactionBackendInterface.h"
#include "Timer.h"
class IDBTransactionBackendLevelDB FINAL : public IDBTransactionBackendInterface {
public:
- static PassRefPtr<IDBTransactionBackendLevelDB> create(IDBDatabaseBackendLevelDB*, int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks>, const Vector<int64_t>& objectStoreIds, IndexedDB::TransactionMode);
+ static PassRefPtr<IDBTransactionBackendLevelDB> create(IDBDatabaseBackendImpl*, int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks>, const Vector<int64_t>& objectStoreIds, IndexedDB::TransactionMode);
virtual ~IDBTransactionBackendLevelDB();
virtual void commit() OVERRIDE FINAL;
void didCompletePreemptiveEvent() { m_pendingPreemptiveEvents--; ASSERT(m_pendingPreemptiveEvents >= 0); }
virtual IDBBackingStoreInterface::Transaction* backingStoreTransaction() { return &m_transaction; }
- IDBDatabaseBackendLevelDB* database() const { return m_database.get(); }
+ IDBDatabaseBackendImpl* database() const { return m_database.get(); }
virtual void scheduleCreateObjectStoreOperation(const IDBObjectStoreMetadata&) OVERRIDE FINAL;
virtual void scheduleDeleteObjectStoreOperation(const IDBObjectStoreMetadata&) OVERRIDE FINAL;
virtual void scheduleClearOperation(int64_t objectStoreId, PassRefPtr<IDBCallbacks>) OVERRIDE FINAL;
private:
- IDBTransactionBackendLevelDB(IDBDatabaseBackendLevelDB*, int64_t id, PassRefPtr<IDBDatabaseCallbacks>, const HashSet<int64_t>& objectStoreIds, IndexedDB::TransactionMode);
+ IDBTransactionBackendLevelDB(IDBDatabaseBackendImpl*, int64_t id, PassRefPtr<IDBDatabaseCallbacks>, const HashSet<int64_t>& objectStoreIds, IndexedDB::TransactionMode);
enum State {
Unused, // Created, but no tasks yet.
State m_state;
bool m_commitPending;
RefPtr<IDBDatabaseCallbacks> m_callbacks;
- RefPtr<IDBDatabaseBackendLevelDB> m_database;
+ RefPtr<IDBDatabaseBackendImpl> m_database;
typedef Deque<OwnPtr<Operation>> TaskQueue;
TaskQueue m_taskQueue;
}
}
-void IDBDatabaseBackendLevelDB::VersionChangeOperation::perform()
+void IDBDatabaseBackendImpl::VersionChangeOperation::perform()
{
LOG(StorageAPI, "VersionChangeOperation");
- IDBDatabaseBackendLevelDB* database = m_transaction->database();
+ IDBDatabaseBackendImpl* database = m_transaction->database();
int64_t databaseId = database->id();
uint64_t oldVersion = database->m_metadata.version;
m_transaction->database()->addObjectStore(m_objectStoreMetadata, IDBObjectStoreMetadata::InvalidId);
}
-void IDBDatabaseBackendLevelDB::VersionChangeAbortOperation::perform()
+void IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform()
{
LOG(StorageAPI, "VersionChangeAbortOperation");
m_transaction->database()->m_metadata.version = m_previousIntVersion;
const IDBObjectStoreMetadata m_objectStoreMetadata;
};
-class IDBDatabaseBackendLevelDB::VersionChangeOperation : public IDBTransactionBackendLevelDB::Operation {
+class IDBDatabaseBackendImpl::VersionChangeOperation : public IDBTransactionBackendLevelDB::Operation {
public:
static PassOwnPtr<IDBTransactionBackendLevelDB::Operation> create(IDBTransactionBackendLevelDB* transaction, int64_t transactionId, int64_t version, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<IDBDatabaseCallbacks> databaseCallbacks)
{
IDBObjectStoreMetadata m_objectStoreMetadata;
};
-class IDBDatabaseBackendLevelDB::VersionChangeAbortOperation : public IDBTransactionBackendLevelDB::Operation {
+class IDBDatabaseBackendImpl::VersionChangeAbortOperation : public IDBTransactionBackendLevelDB::Operation {
public:
static PassOwnPtr<IDBTransactionBackendLevelDB::Operation> create(IDBTransactionBackendLevelDB* transaction, const String& previousVersion, int64_t previousIntVersion)
{
<ClCompile Include="..\Modules\indexeddb\IDBCursor.cpp" />
<ClCompile Include="..\Modules\indexeddb\leveldb\IDBCursorBackendLevelDB.cpp" />
<ClCompile Include="..\Modules\indexeddb\IDBDatabase.cpp" />
- <ClCompile Include="..\Modules\indexeddb\leveldb\IDBDatabaseBackendLevelDB.cpp" />
<ClCompile Include="..\Modules\indexeddb\IDBFactory.cpp" />
<ClCompile Include="..\Modules\indexeddb\leveldb\IDBFactoryBackendLevelDB.cpp" />
<ClCompile Include="..\Modules\indexeddb\IDBFactoryBackendInterface.cpp" />
<ClCompile Include="..\Modules\indexeddb\leveldb\IDBCursorBackendLevelDB.cpp">
<Filter>Modules\indexeddb\leveldb</Filter>
</ClCompile>
- <ClCompile Include="..\Modules\indexeddb\leveldb\IDBDatabaseBackendLevelDB.cpp">
- <Filter>Modules\indexeddb\leveldb</Filter>
- </ClCompile>
<ClCompile Include="..\Modules\indexeddb\leveldb\IDBFactoryBackendLevelDB.cpp">
<Filter>Modules\indexeddb\leveldb</Filter>
</ClCompile>
510D4A38103165EE0049EA54 /* SocketStreamHandleClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 510D4A32103165EE0049EA54 /* SocketStreamHandleClient.h */; };
510EC42A18170C7500C897D6 /* IDBIndexWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510EC42818170C7500C897D6 /* IDBIndexWriter.cpp */; };
510EC42B18170C7500C897D6 /* IDBIndexWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 510EC42918170C7500C897D6 /* IDBIndexWriter.h */; };
+ 510EC44F181779D500C897D6 /* IDBDatabaseBackendImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510EC44D181779D500C897D6 /* IDBDatabaseBackendImpl.cpp */; };
+ 510EC450181779D500C897D6 /* IDBDatabaseBackendImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 510EC44E181779D500C897D6 /* IDBDatabaseBackendImpl.h */; settings = {ATTRIBUTES = (Private, ); }; };
5112935F3D54B4B52FAF973F /* InspectorHeapProfilerAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 511293613D6DB4B52FAF973F /* InspectorHeapProfilerAgent.cpp */; };
511293603D60B4B52FAF973F /* InspectorHeapProfilerAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 511293623D85B4B52FAF973F /* InspectorHeapProfilerAgent.h */; };
511EF2C017F0FD3500E4FA16 /* JSIDBAny.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 511EF2A817F0FC4800E4FA16 /* JSIDBAny.cpp */; };
510D4A32103165EE0049EA54 /* SocketStreamHandleClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SocketStreamHandleClient.h; sourceTree = "<group>"; };
510EC42818170C7500C897D6 /* IDBIndexWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBIndexWriter.cpp; sourceTree = "<group>"; };
510EC42918170C7500C897D6 /* IDBIndexWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBIndexWriter.h; sourceTree = "<group>"; };
+ 510EC44D181779D500C897D6 /* IDBDatabaseBackendImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBDatabaseBackendImpl.cpp; sourceTree = "<group>"; };
+ 510EC44E181779D500C897D6 /* IDBDatabaseBackendImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBDatabaseBackendImpl.h; sourceTree = "<group>"; };
511293613D6DB4B52FAF973F /* InspectorHeapProfilerAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorHeapProfilerAgent.cpp; sourceTree = "<group>"; };
511293623D85B4B52FAF973F /* InspectorHeapProfilerAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorHeapProfilerAgent.h; sourceTree = "<group>"; };
511EF2A817F0FC4800E4FA16 /* JSIDBAny.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSIDBAny.cpp; sourceTree = "<group>"; };
51D7197C181106DF0016DC51 /* IDBDatabase.cpp */,
51D7197D181106DF0016DC51 /* IDBDatabase.h */,
51D7197E181106DF0016DC51 /* IDBDatabase.idl */,
+ 510EC44D181779D500C897D6 /* IDBDatabaseBackendImpl.cpp */,
+ 510EC44E181779D500C897D6 /* IDBDatabaseBackendImpl.h */,
51D7197F181106DF0016DC51 /* IDBDatabaseBackendInterface.h */,
51D71980181106DF0016DC51 /* IDBDatabaseCallbacks.h */,
51D71981181106DF0016DC51 /* IDBDatabaseCallbacksImpl.cpp */,
935C476309AC4CE600A6AAB4 /* MouseEventWithHitTestResults.h in Headers */,
85031B480A44EFC700F992E0 /* MouseRelatedEvent.h in Headers */,
93309DFC099E64920056E581 /* MoveSelectionCommand.h in Headers */,
+ 510EC450181779D500C897D6 /* IDBDatabaseBackendImpl.h in Headers */,
FDB1700614A2BAB200A2B5D9 /* MultiChannelResampler.h in Headers */,
C6F0900A14327B6100685849 /* MutationCallback.h in Headers */,
85031B4A0A44EFC700F992E0 /* MutationEvent.h in Headers */,
078E091117D14CEE00420AA1 /* RTCVoidRequestImpl.cpp in Sources */,
498391580F1E776900C23782 /* WebKitCSSMatrix.cpp in Sources */,
A24BF77C15CC3BAF003191F2 /* WebKitCSSMixFunctionValue.cpp in Sources */,
+ 510EC44F181779D500C897D6 /* IDBDatabaseBackendImpl.cpp in Sources */,
8AA61CFF144D595B00F37350 /* WebKitCSSRegionRule.cpp in Sources */,
5038BC0714711CDB0095E0D1 /* WebKitCSSShaderValue.cpp in Sources */,
0562F9461573ECEB0031CA16 /* WebKitCSSSVGDocumentValue.cpp in Sources */,
+2013-10-23 Brady Eidson <beidson@apple.com>
+
+ Make IDBDatabaseBackendLevelDB.cpp be cross platform
+ https://bugs.webkit.org/show_bug.cgi?id=123027
+
+ Attentively reviewed by Dean Jackson.
+
+ * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
+ (WebKit::WebIDBFactoryBackend::maybeCreateTransactionBackend):
+ * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
+
2013-10-23 Dan Bernstein <mitz@apple.com>
Fixed a typo.
notImplemented();
}
-PassRefPtr<IDBTransactionBackendInterface> WebIDBFactoryBackend::createTransactionBackend(IDBDatabaseBackendLevelDB*, int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks>, const Vector<int64_t>&, IndexedDB::TransactionMode)
+PassRefPtr<IDBTransactionBackendInterface> WebIDBFactoryBackend::maybeCreateTransactionBackend(IDBDatabaseBackendInterface*, int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks>, const Vector<int64_t>&, IndexedDB::TransactionMode)
{
notImplemented();
return 0;
virtual void removeIDBDatabaseBackend(const String& uniqueIdentifier) OVERRIDE FINAL;
- virtual PassRefPtr<WebCore::IDBTransactionBackendInterface> createTransactionBackend(WebCore::IDBDatabaseBackendLevelDB*, int64_t transactionId, PassRefPtr<WebCore::IDBDatabaseCallbacks>, const Vector<int64_t>&, WebCore::IndexedDB::TransactionMode);
+ virtual PassRefPtr<WebCore::IDBTransactionBackendInterface> maybeCreateTransactionBackend(WebCore::IDBDatabaseBackendInterface*, int64_t transactionId, PassRefPtr<WebCore::IDBDatabaseCallbacks>, const Vector<int64_t>&, WebCore::IndexedDB::TransactionMode);
private:
WebIDBFactoryBackend();