IndexedDB: Fire error when there are problems opening a DB
authordgrogan@chromium.org <dgrogan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 May 2012 15:55:15 +0000 (15:55 +0000)
committerdgrogan@chromium.org <dgrogan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 May 2012 15:55:15 +0000 (15:55 +0000)
https://bugs.webkit.org/show_bug.cgi?id=85579

Source/WebCore:

We used to either fire success or get into an infinite loop.

Reviewed by Tony Chang.

New unit test in
Source/WebKit/chromium/tests/IDBAbortOnCorruptTest.cpp

* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl):
(WebCore::IDBDatabaseBackendImpl::openInternal):
(WebCore::IDBDatabaseBackendImpl::openConnection):
* Modules/indexeddb/IDBDatabaseBackendImpl.h:
(WebCore::IDBDatabaseBackendImpl::create):
(IDBDatabaseBackendImpl):
* Modules/indexeddb/IDBFactoryBackendImpl.cpp:
(WebCore::IDBFactoryBackendImpl::deleteDatabase):
(WebCore::IDBFactoryBackendImpl::openInternal):
* Modules/indexeddb/IDBFactoryBackendImpl.h:
(IDBFactoryBackendImpl):
* Modules/indexeddb/IDBLevelDBBackingStore.h:
(IDBLevelDBBackingStore):

Source/WebKit/chromium:

Reviewed by Tony Chang.

* WebKit.gypi:
* tests/IDBAbortOnCorruptTest.cpp: Added.
(WebCore):
(MockIDBCallbacks):
(WebCore::MockIDBCallbacks::MockIDBCallbacks):
(WebCore::MockIDBCallbacks::~MockIDBCallbacks):
(WebCore::MockIDBCallbacks::onError):
(WebCore::MockIDBCallbacks::onSuccess):
(WebCore::MockIDBCallbacks::onSuccessWithContinuation):
(WebCore::MockIDBCallbacks::onSuccessWithPrefetch):
(WebCore::MockIDBCallbacks::onBlocked):
(FailingBackingStore):
(WebCore::FailingBackingStore::~FailingBackingStore):
(WebCore::FailingBackingStore::open):
(WebCore::FailingBackingStore::createIDBDatabaseMetaData):
(FailingIDBFactoryBackendImpl):
(WebCore::FailingIDBFactoryBackendImpl::~FailingIDBFactoryBackendImpl):
(WebCore::FailingIDBFactoryBackendImpl::create):
(WebCore::FailingIDBFactoryBackendImpl::removeIDBDatabaseBackend):
(WebCore::FailingIDBFactoryBackendImpl::openBackingStore):
(WebCore::TEST):
* tests/IDBFakeBackingStore.h: Copied from Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.h.
(WebCore):
(IDBFakeBackingStore):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117978 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp
Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.h
Source/WebCore/Modules/indexeddb/IDBFactoryBackendImpl.cpp
Source/WebCore/Modules/indexeddb/IDBFactoryBackendImpl.h
Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/WebKit.gypi
Source/WebKit/chromium/tests/IDBAbortOnCorruptTest.cpp [new file with mode: 0644]
Source/WebKit/chromium/tests/IDBFakeBackingStore.h [new file with mode: 0644]

index 7c12c47..203e69a 100644 (file)
@@ -1,3 +1,30 @@
+2012-05-22  David Grogan  <dgrogan@chromium.org>
+
+        IndexedDB: Fire error when there are problems opening a DB
+        https://bugs.webkit.org/show_bug.cgi?id=85579
+
+        We used to either fire success or get into an infinite loop.
+
+        Reviewed by Tony Chang.
+
+        New unit test in
+        Source/WebKit/chromium/tests/IDBAbortOnCorruptTest.cpp
+
+        * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
+        (WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl):
+        (WebCore::IDBDatabaseBackendImpl::openInternal):
+        (WebCore::IDBDatabaseBackendImpl::openConnection):
+        * Modules/indexeddb/IDBDatabaseBackendImpl.h:
+        (WebCore::IDBDatabaseBackendImpl::create):
+        (IDBDatabaseBackendImpl):
+        * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
+        (WebCore::IDBFactoryBackendImpl::deleteDatabase):
+        (WebCore::IDBFactoryBackendImpl::openInternal):
+        * Modules/indexeddb/IDBFactoryBackendImpl.h:
+        (IDBFactoryBackendImpl):
+        * Modules/indexeddb/IDBLevelDBBackingStore.h:
+        (IDBLevelDBBackingStore):
+
 2012-05-22  Nikolas Zimmermann  <nzimmermann@rim.com>
 
         Not reviewed.
index 59199fc..010a120 100644 (file)
@@ -93,6 +93,14 @@ private:
     RefPtr<IDBDatabaseCallbacks> m_databaseCallbacks;
 };
 
+PassRefPtr<IDBDatabaseBackendImpl> IDBDatabaseBackendImpl::create(const String& name, IDBBackingStore* database, IDBTransactionCoordinator* coordinator, IDBFactoryBackendImpl* factory, const String& uniqueIdentifier)
+{
+    RefPtr<IDBDatabaseBackendImpl> backend = adoptRef(new IDBDatabaseBackendImpl(name, database, coordinator, factory, uniqueIdentifier));
+    if (!backend->openInternal())
+        return 0;
+    return backend.release();
+}
+
 IDBDatabaseBackendImpl::IDBDatabaseBackendImpl(const String& name, IDBBackingStore* backingStore, IDBTransactionCoordinator* coordinator, IDBFactoryBackendImpl* factory, const String& uniqueIdentifier)
     : m_backingStore(backingStore)
     , m_id(InvalidId)
@@ -103,19 +111,17 @@ IDBDatabaseBackendImpl::IDBDatabaseBackendImpl(const String& name, IDBBackingSto
     , m_transactionCoordinator(coordinator)
 {
     ASSERT(!m_name.isNull());
-    openInternal();
 }
 
-void IDBDatabaseBackendImpl::openInternal()
+bool IDBDatabaseBackendImpl::openInternal()
 {
     bool success = m_backingStore->getIDBDatabaseMetaData(m_name, m_version, m_id);
     ASSERT(success == (m_id != InvalidId));
     if (success) {
         loadObjectStores();
-        return;
+        return true;
     }
-    if (!m_backingStore->createIDBDatabaseMetaData(m_name, m_version, m_id))
-        ASSERT_NOT_REACHED(); // FIXME: Need better error handling.
+    return m_backingStore->createIDBDatabaseMetaData(m_name, m_version, m_id);
 }
 
 IDBDatabaseBackendImpl::~IDBDatabaseBackendImpl()
@@ -325,9 +331,10 @@ void IDBDatabaseBackendImpl::openConnection(PassRefPtr<IDBCallbacks> callbacks)
     if (!m_pendingDeleteCalls.isEmpty() || m_runningVersionChangeTransaction || !m_pendingSetVersionCalls.isEmpty())
         m_pendingOpenCalls.append(PendingOpenCall::create(callbacks));
     else {
-        if (m_id == InvalidId)
-            openInternal();
-        callbacks->onSuccess(this);
+        if (m_id == InvalidId && !openInternal())
+            callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::UNKNOWN_ERR, "Internal error."));
+        else
+            callbacks->onSuccess(this);
     }
 }
 
index 3318e2b..2a6fb3b 100644 (file)
@@ -45,10 +45,7 @@ class IDBTransactionCoordinator;
 
 class IDBDatabaseBackendImpl : public IDBDatabaseBackendInterface {
 public:
-    static PassRefPtr<IDBDatabaseBackendImpl> create(const String& name, IDBBackingStore* database, IDBTransactionCoordinator* coordinator, IDBFactoryBackendImpl* factory, const String& uniqueIdentifier)
-    {
-        return adoptRef(new IDBDatabaseBackendImpl(name, database, coordinator, factory, uniqueIdentifier));
-    }
+    static PassRefPtr<IDBDatabaseBackendImpl> create(const String& name, IDBBackingStore* database, IDBTransactionCoordinator*, IDBFactoryBackendImpl*, const String& uniqueIdentifier);
     virtual ~IDBDatabaseBackendImpl();
 
     PassRefPtr<IDBBackingStore> backingStore() const;
@@ -79,7 +76,7 @@ public:
 private:
     IDBDatabaseBackendImpl(const String& name, IDBBackingStore* database, IDBTransactionCoordinator*, IDBFactoryBackendImpl*, const String& uniqueIdentifier);
 
-    void openInternal();
+    bool openInternal();
     void loadObjectStores();
     void processPendingCalls();
 
index f5b9c87..9eb1167 100644 (file)
@@ -129,8 +129,11 @@ void IDBFactoryBackendImpl::deleteDatabase(const String& name, PassRefPtr<IDBCal
     }
 
     RefPtr<IDBDatabaseBackendImpl> databaseBackend = IDBDatabaseBackendImpl::create(name, backingStore.get(), m_transactionCoordinator.get(), this, uniqueIdentifier);
-    m_databaseBackendMap.set(uniqueIdentifier, databaseBackend.get());
-    databaseBackend->deleteDatabase(callbacks);
+    if (databaseBackend) {
+        m_databaseBackendMap.set(uniqueIdentifier, databaseBackend.get());
+        databaseBackend->deleteDatabase(callbacks);
+    } else
+        callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::UNKNOWN_ERR, "Internal error."));
 }
 
 PassRefPtr<IDBBackingStore> IDBFactoryBackendImpl::openBackingStore(PassRefPtr<SecurityOrigin> securityOrigin, const String& dataDirectory)
@@ -177,8 +180,11 @@ void IDBFactoryBackendImpl::openInternal(const String& name, IDBCallbacks* callb
     }
 
     RefPtr<IDBDatabaseBackendImpl> databaseBackend = IDBDatabaseBackendImpl::create(name, backingStore.get(), m_transactionCoordinator.get(), this, uniqueIdentifier);
-    callbacks->onSuccess(RefPtr<IDBDatabaseBackendInterface>(databaseBackend.get()).release());
-    m_databaseBackendMap.set(uniqueIdentifier, databaseBackend.get());
+    if (databaseBackend) {
+        callbacks->onSuccess(RefPtr<IDBDatabaseBackendInterface>(databaseBackend.get()).release());
+        m_databaseBackendMap.set(uniqueIdentifier, databaseBackend.get());
+    } else
+        callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::UNKNOWN_ERR, "Internal error."));
 }
 
 } // namespace WebCore
index 7982168..a3989e2 100644 (file)
@@ -51,9 +51,9 @@ public:
     virtual ~IDBFactoryBackendImpl();
 
     // Notifications from weak pointers.
-    void removeIDBDatabaseBackend(const String& uniqueIdentifier);
+    virtual void removeIDBDatabaseBackend(const String& uniqueIdentifier);
     void addIDBBackingStore(const String& fileIdentifier, IDBBackingStore*);
-    void removeIDBBackingStore(const String& fileIdentifier);
+    virtual void removeIDBBackingStore(const String& fileIdentifier);
 
     virtual void getDatabaseNames(PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*, const String& dataDir);
 
@@ -61,9 +61,11 @@ public:
     virtual void openFromWorker(const String& name, IDBCallbacks*, PassRefPtr<SecurityOrigin>, WorkerContext*, const String& dataDir);
     virtual void deleteDatabase(const String& name, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*, const String& dataDir);
 
-private:
+protected:
     IDBFactoryBackendImpl();
-    PassRefPtr<IDBBackingStore> openBackingStore(PassRefPtr<SecurityOrigin>, const String& dataDir);
+    virtual PassRefPtr<IDBBackingStore> openBackingStore(PassRefPtr<SecurityOrigin>, const String& dataDir);
+
+private:
     void openInternal(const String& name, IDBCallbacks*, PassRefPtr<SecurityOrigin>, const String& dataDir);
 
     typedef HashMap<String, IDBDatabaseBackendImpl*> IDBDatabaseBackendMap;
index cc870fe..a65f963 100644 (file)
@@ -80,9 +80,10 @@ public:
 
     static bool backingStoreExists(SecurityOrigin*, const String& name, const String& pathBase);
 
-private:
+protected:
     IDBLevelDBBackingStore(const String& identifier, IDBFactoryBackendImpl*, PassOwnPtr<LevelDBDatabase>);
 
+private:
     String m_identifier;
     RefPtr<IDBFactoryBackendImpl> m_factory;
     OwnPtr<LevelDBDatabase> m_db;
index 85af83b..7819774 100644 (file)
@@ -1,3 +1,35 @@
+2012-05-22  David Grogan  <dgrogan@chromium.org>
+
+        IndexedDB: Fire error when there are problems opening a DB
+        https://bugs.webkit.org/show_bug.cgi?id=85579
+
+        Reviewed by Tony Chang.
+
+        * WebKit.gypi:
+        * tests/IDBAbortOnCorruptTest.cpp: Added.
+        (WebCore):
+        (MockIDBCallbacks):
+        (WebCore::MockIDBCallbacks::MockIDBCallbacks):
+        (WebCore::MockIDBCallbacks::~MockIDBCallbacks):
+        (WebCore::MockIDBCallbacks::onError):
+        (WebCore::MockIDBCallbacks::onSuccess):
+        (WebCore::MockIDBCallbacks::onSuccessWithContinuation):
+        (WebCore::MockIDBCallbacks::onSuccessWithPrefetch):
+        (WebCore::MockIDBCallbacks::onBlocked):
+        (FailingBackingStore):
+        (WebCore::FailingBackingStore::~FailingBackingStore):
+        (WebCore::FailingBackingStore::open):
+        (WebCore::FailingBackingStore::createIDBDatabaseMetaData):
+        (FailingIDBFactoryBackendImpl):
+        (WebCore::FailingIDBFactoryBackendImpl::~FailingIDBFactoryBackendImpl):
+        (WebCore::FailingIDBFactoryBackendImpl::create):
+        (WebCore::FailingIDBFactoryBackendImpl::removeIDBDatabaseBackend):
+        (WebCore::FailingIDBFactoryBackendImpl::openBackingStore):
+        (WebCore::TEST):
+        * tests/IDBFakeBackingStore.h: Copied from Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.h.
+        (WebCore):
+        (IDBFakeBackingStore):
+
 2012-05-22  Alexander Pavlov  <apavlov@chromium.org>
 
         [Chromium] Implement the ContextMenuItem SubMenu type
index fcc04a0..7854edf 100644 (file)
             'tests/FrameTestHelpers.cpp',
             'tests/FrameTestHelpers.h',
             'tests/GraphicsLayerChromiumTest.cpp',
+            'tests/IDBAbortOnCorruptTest.cpp',
             'tests/IDBBindingUtilitiesTest.cpp',
+            'tests/IDBFakeBackingStore.h',
             'tests/IDBKeyPathTest.cpp',
             'tests/IDBLevelDBCodingTest.cpp',
             'tests/ImageLayerChromiumTest.cpp',
diff --git a/Source/WebKit/chromium/tests/IDBAbortOnCorruptTest.cpp b/Source/WebKit/chromium/tests/IDBAbortOnCorruptTest.cpp
new file mode 100644 (file)
index 0000000..6c78aa5
--- /dev/null
@@ -0,0 +1,107 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "IDBFactoryBackendImpl.h"
+#include "IDBFakeBackingStore.h"
+#include "SecurityOrigin.h"
+#include <gtest/gtest.h>
+#include <wtf/Vector.h>
+
+#if ENABLE(INDEXED_DATABASE)
+
+using namespace WebCore;
+
+namespace {
+
+class MockIDBCallbacks : public IDBCallbacks {
+public:
+    MockIDBCallbacks() : m_wasErrorCalled(false) { }
+
+    virtual ~MockIDBCallbacks()
+    {
+        EXPECT_TRUE(m_wasErrorCalled);
+    }
+    virtual void onError(PassRefPtr<IDBDatabaseError>)
+    {
+        m_wasErrorCalled = true;
+    }
+    virtual void onSuccess(PassRefPtr<DOMStringList>) { }
+    virtual void onSuccess(PassRefPtr<IDBCursorBackendInterface>) { }
+    virtual void onSuccess(PassRefPtr<IDBDatabaseBackendInterface>)
+    {
+        EXPECT_TRUE(false);
+    }
+    virtual void onSuccess(PassRefPtr<IDBKey>) { }
+    virtual void onSuccess(PassRefPtr<IDBTransactionBackendInterface>) { }
+    virtual void onSuccess(PassRefPtr<SerializedScriptValue>) { }
+    virtual void onSuccessWithContinuation() { }
+    virtual void onSuccessWithPrefetch(const Vector<RefPtr<IDBKey> >&, const Vector<RefPtr<IDBKey> >&, const Vector<RefPtr<SerializedScriptValue> >&) { }
+    virtual void onBlocked() { }
+private:
+    bool m_wasErrorCalled;
+};
+
+class FailingBackingStore : public IDBFakeBackingStore {
+public:
+    virtual ~FailingBackingStore() { }
+    static PassRefPtr<IDBBackingStore> open()
+    {
+        return adoptRef(new FailingBackingStore);
+    }
+    virtual bool createIDBDatabaseMetaData(const String&, const String&, int64_t&)
+    {
+        return false;
+    }
+};
+
+class FailingIDBFactoryBackendImpl : public IDBFactoryBackendImpl {
+public:
+    virtual ~FailingIDBFactoryBackendImpl() { }
+    static PassRefPtr<FailingIDBFactoryBackendImpl> create()
+    {
+        return adoptRef(new FailingIDBFactoryBackendImpl);
+    }
+    virtual void removeIDBDatabaseBackend(const WTF::String &) { }
+
+protected:
+    virtual PassRefPtr<IDBBackingStore> openBackingStore(PassRefPtr<SecurityOrigin> prpOrigin, const String& dataDir)
+    {
+        return FailingBackingStore::open();
+    }
+};
+
+TEST(IDBAbortTest, TheTest)
+{
+    RefPtr<IDBFactoryBackendImpl> factory = FailingIDBFactoryBackendImpl::create();
+    const String& name = "db name";
+    MockIDBCallbacks callbacks;
+    RefPtr<SecurityOrigin> origin = SecurityOrigin::create("http", "localhost", 81);
+    factory->open(name, &callbacks, origin, 0 /*Frame*/, String() /*path*/);
+}
+
+} // namespace
+
+#endif // ENABLE(INDEXED_DATABASE)
diff --git a/Source/WebKit/chromium/tests/IDBFakeBackingStore.h b/Source/WebKit/chromium/tests/IDBFakeBackingStore.h
new file mode 100644 (file)
index 0000000..ed894cb
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef IDBFakeBackingStore_h
+#define IDBFakeBackingStore_h
+
+#include "IDBBackingStore.h"
+
+namespace WebCore {
+
+class IDBFakeBackingStore : public IDBBackingStore {
+public:
+    virtual void getDatabaseNames(Vector<String>& foundNames) OVERRIDE { }
+    virtual bool getIDBDatabaseMetaData(const String& name, String& foundVersion, int64_t& foundId) OVERRIDE { return false; }
+    virtual bool createIDBDatabaseMetaData(const String& name, const String& version, int64_t& rowId) OVERRIDE { return true; }
+    virtual bool updateIDBDatabaseMetaData(int64_t rowId, const String& version) OVERRIDE { return false; }
+    virtual bool deleteDatabase(const String& name) OVERRIDE { return false; }
+
+    virtual void getObjectStores(int64_t databaseId, Vector<int64_t>& foundIds, Vector<String>& foundNames, Vector<IDBKeyPath>& foundKeyPaths, Vector<bool>& foundAutoIncrementFlags) OVERRIDE { }
+    virtual bool createObjectStore(int64_t databaseId, const String& name, const IDBKeyPath& keyPath, bool autoIncrement, int64_t& assignedObjectStoreId) OVERRIDE { return false; }
+    virtual void deleteObjectStore(int64_t databaseId, int64_t objectStoreId) OVERRIDE { }
+
+    virtual PassRefPtr<ObjectStoreRecordIdentifier> createInvalidRecordIdentifier() OVERRIDE { return PassRefPtr<ObjectStoreRecordIdentifier>(); }
+
+    virtual String getObjectStoreRecord(int64_t databaseId, int64_t objectStoreId, const IDBKey&) OVERRIDE { return String(); }
+    virtual bool putObjectStoreRecord(int64_t databaseId, int64_t objectStoreId, const IDBKey&, const String& value, ObjectStoreRecordIdentifier*) OVERRIDE { return false; }
+    virtual void clearObjectStore(int64_t databaseId, int64_t objectStoreId) OVERRIDE { }
+    virtual void deleteObjectStoreRecord(int64_t databaseId, int64_t objectStoreId, const ObjectStoreRecordIdentifier*) OVERRIDE { }
+    virtual int64_t nextAutoIncrementNumber(int64_t databaseId, int64_t objectStoreId) OVERRIDE { return 0.0; }
+    virtual bool keyExistsInObjectStore(int64_t databaseId, int64_t objectStoreId, const IDBKey&, ObjectStoreRecordIdentifier* foundRecordIdentifier) OVERRIDE { return false; }
+
+    virtual bool forEachObjectStoreRecord(int64_t databaseId, int64_t objectStoreId, ObjectStoreRecordCallback&) OVERRIDE { return false; }
+
+    virtual void getIndexes(int64_t databaseId, int64_t objectStoreId, Vector<int64_t>& foundIds, Vector<String>& foundNames, Vector<IDBKeyPath>& foundKeyPaths, Vector<bool>& foundUniqueFlags, Vector<bool>& foundMultiEntryFlags) OVERRIDE { }
+    virtual bool createIndex(int64_t databaseId, int64_t objectStoreId, const String& name, const IDBKeyPath& keyPath, bool isUnique, bool isMultiEntry, int64_t& indexId) OVERRIDE { return false; }
+    virtual void deleteIndex(int64_t databaseId, int64_t objectStoreId, int64_t indexId) OVERRIDE { }
+    virtual bool putIndexDataForRecord(int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey&, const ObjectStoreRecordIdentifier*) OVERRIDE { return false; }
+    virtual bool deleteIndexDataForRecord(int64_t databaseId, int64_t objectStoreId, int64_t indexId, const ObjectStoreRecordIdentifier*) OVERRIDE { return false; }
+    virtual String getObjectViaIndex(int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey&) OVERRIDE { return String(); }
+    virtual PassRefPtr<IDBKey> getPrimaryKeyViaIndex(int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey&) OVERRIDE { return PassRefPtr<IDBKey>(); }
+    virtual bool keyExistsInIndex(int64_t databaseid, int64_t objectStoreId, int64_t indexId, const IDBKey& indexKey, RefPtr<IDBKey>& foundPrimaryKey) OVERRIDE { return false; }
+
+    virtual PassRefPtr<Cursor> openObjectStoreCursor(int64_t databaseId, int64_t objectStoreId, const IDBKeyRange*, IDBCursor::Direction) OVERRIDE { return PassRefPtr<Cursor>(); }
+    virtual PassRefPtr<Cursor> openIndexKeyCursor(int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKeyRange*, IDBCursor::Direction) OVERRIDE { return PassRefPtr<Cursor>(); }
+    virtual PassRefPtr<Cursor> openIndexCursor(int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKeyRange*, IDBCursor::Direction) OVERRIDE { return PassRefPtr<Cursor>(); }
+
+    virtual PassRefPtr<Transaction> createTransaction() OVERRIDE { return PassRefPtr<Transaction>(); }
+};
+
+} // namespace WebCore
+
+#endif // IDBFakeBackingStore_h