Changeset 117978 in webkit


Ignore:
Timestamp:
May 22, 2012 8:55:15 AM (12 years ago)
Author:
dgrogan@chromium.org
Message:

IndexedDB: Fire error when there are problems opening a DB
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):

Location:
trunk/Source
Files:
1 added
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r117977 r117978  
     12012-05-22  David Grogan  <dgrogan@chromium.org>
     2
     3        IndexedDB: Fire error when there are problems opening a DB
     4        https://bugs.webkit.org/show_bug.cgi?id=85579
     5
     6        We used to either fire success or get into an infinite loop.
     7
     8        Reviewed by Tony Chang.
     9
     10        New unit test in
     11        Source/WebKit/chromium/tests/IDBAbortOnCorruptTest.cpp
     12
     13        * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
     14        (WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl):
     15        (WebCore::IDBDatabaseBackendImpl::openInternal):
     16        (WebCore::IDBDatabaseBackendImpl::openConnection):
     17        * Modules/indexeddb/IDBDatabaseBackendImpl.h:
     18        (WebCore::IDBDatabaseBackendImpl::create):
     19        (IDBDatabaseBackendImpl):
     20        * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
     21        (WebCore::IDBFactoryBackendImpl::deleteDatabase):
     22        (WebCore::IDBFactoryBackendImpl::openInternal):
     23        * Modules/indexeddb/IDBFactoryBackendImpl.h:
     24        (IDBFactoryBackendImpl):
     25        * Modules/indexeddb/IDBLevelDBBackingStore.h:
     26        (IDBLevelDBBackingStore):
     27
    1282012-05-22  Nikolas Zimmermann  <nzimmermann@rim.com>
    229
  • trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp

    r117817 r117978  
    9494};
    9595
     96PassRefPtr<IDBDatabaseBackendImpl> IDBDatabaseBackendImpl::create(const String& name, IDBBackingStore* database, IDBTransactionCoordinator* coordinator, IDBFactoryBackendImpl* factory, const String& uniqueIdentifier)
     97{
     98    RefPtr<IDBDatabaseBackendImpl> backend = adoptRef(new IDBDatabaseBackendImpl(name, database, coordinator, factory, uniqueIdentifier));
     99    if (!backend->openInternal())
     100        return 0;
     101    return backend.release();
     102}
     103
    96104IDBDatabaseBackendImpl::IDBDatabaseBackendImpl(const String& name, IDBBackingStore* backingStore, IDBTransactionCoordinator* coordinator, IDBFactoryBackendImpl* factory, const String& uniqueIdentifier)
    97105    : m_backingStore(backingStore)
     
    104112{
    105113    ASSERT(!m_name.isNull());
    106     openInternal();
    107 }
    108 
    109 void IDBDatabaseBackendImpl::openInternal()
     114}
     115
     116bool IDBDatabaseBackendImpl::openInternal()
    110117{
    111118    bool success = m_backingStore->getIDBDatabaseMetaData(m_name, m_version, m_id);
     
    113120    if (success) {
    114121        loadObjectStores();
    115         return;
    116     }
    117     if (!m_backingStore->createIDBDatabaseMetaData(m_name, m_version, m_id))
    118         ASSERT_NOT_REACHED(); // FIXME: Need better error handling.
     122        return true;
     123    }
     124    return m_backingStore->createIDBDatabaseMetaData(m_name, m_version, m_id);
    119125}
    120126
     
    326332        m_pendingOpenCalls.append(PendingOpenCall::create(callbacks));
    327333    else {
    328         if (m_id == InvalidId)
    329             openInternal();
    330         callbacks->onSuccess(this);
     334        if (m_id == InvalidId && !openInternal())
     335            callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::UNKNOWN_ERR, "Internal error."));
     336        else
     337            callbacks->onSuccess(this);
    331338    }
    332339}
  • trunk/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.h

    r117817 r117978  
    4646class IDBDatabaseBackendImpl : public IDBDatabaseBackendInterface {
    4747public:
    48     static PassRefPtr<IDBDatabaseBackendImpl> create(const String& name, IDBBackingStore* database, IDBTransactionCoordinator* coordinator, IDBFactoryBackendImpl* factory, const String& uniqueIdentifier)
    49     {
    50         return adoptRef(new IDBDatabaseBackendImpl(name, database, coordinator, factory, uniqueIdentifier));
    51     }
     48    static PassRefPtr<IDBDatabaseBackendImpl> create(const String& name, IDBBackingStore* database, IDBTransactionCoordinator*, IDBFactoryBackendImpl*, const String& uniqueIdentifier);
    5249    virtual ~IDBDatabaseBackendImpl();
    5350
     
    8077    IDBDatabaseBackendImpl(const String& name, IDBBackingStore* database, IDBTransactionCoordinator*, IDBFactoryBackendImpl*, const String& uniqueIdentifier);
    8178
    82     void openInternal();
     79    bool openInternal();
    8380    void loadObjectStores();
    8481    void processPendingCalls();
  • trunk/Source/WebCore/Modules/indexeddb/IDBFactoryBackendImpl.cpp

    r110539 r117978  
    130130
    131131    RefPtr<IDBDatabaseBackendImpl> databaseBackend = IDBDatabaseBackendImpl::create(name, backingStore.get(), m_transactionCoordinator.get(), this, uniqueIdentifier);
    132     m_databaseBackendMap.set(uniqueIdentifier, databaseBackend.get());
    133     databaseBackend->deleteDatabase(callbacks);
     132    if (databaseBackend) {
     133        m_databaseBackendMap.set(uniqueIdentifier, databaseBackend.get());
     134        databaseBackend->deleteDatabase(callbacks);
     135    } else
     136        callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::UNKNOWN_ERR, "Internal error."));
    134137}
    135138
     
    178181
    179182    RefPtr<IDBDatabaseBackendImpl> databaseBackend = IDBDatabaseBackendImpl::create(name, backingStore.get(), m_transactionCoordinator.get(), this, uniqueIdentifier);
    180     callbacks->onSuccess(RefPtr<IDBDatabaseBackendInterface>(databaseBackend.get()).release());
    181     m_databaseBackendMap.set(uniqueIdentifier, databaseBackend.get());
     183    if (databaseBackend) {
     184        callbacks->onSuccess(RefPtr<IDBDatabaseBackendInterface>(databaseBackend.get()).release());
     185        m_databaseBackendMap.set(uniqueIdentifier, databaseBackend.get());
     186    } else
     187        callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::UNKNOWN_ERR, "Internal error."));
    182188}
    183189
  • trunk/Source/WebCore/Modules/indexeddb/IDBFactoryBackendImpl.h

    r109493 r117978  
    5252
    5353    // Notifications from weak pointers.
    54     void removeIDBDatabaseBackend(const String& uniqueIdentifier);
     54    virtual void removeIDBDatabaseBackend(const String& uniqueIdentifier);
    5555    void addIDBBackingStore(const String& fileIdentifier, IDBBackingStore*);
    56     void removeIDBBackingStore(const String& fileIdentifier);
     56    virtual void removeIDBBackingStore(const String& fileIdentifier);
    5757
    5858    virtual void getDatabaseNames(PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*, const String& dataDir);
     
    6262    virtual void deleteDatabase(const String& name, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*, const String& dataDir);
    6363
     64protected:
     65    IDBFactoryBackendImpl();
     66    virtual PassRefPtr<IDBBackingStore> openBackingStore(PassRefPtr<SecurityOrigin>, const String& dataDir);
     67
    6468private:
    65     IDBFactoryBackendImpl();
    66     PassRefPtr<IDBBackingStore> openBackingStore(PassRefPtr<SecurityOrigin>, const String& dataDir);
    6769    void openInternal(const String& name, IDBCallbacks*, PassRefPtr<SecurityOrigin>, const String& dataDir);
    6870
  • trunk/Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.h

    r117817 r117978  
    8181    static bool backingStoreExists(SecurityOrigin*, const String& name, const String& pathBase);
    8282
    83 private:
     83protected:
    8484    IDBLevelDBBackingStore(const String& identifier, IDBFactoryBackendImpl*, PassOwnPtr<LevelDBDatabase>);
    8585
     86private:
    8687    String m_identifier;
    8788    RefPtr<IDBFactoryBackendImpl> m_factory;
  • trunk/Source/WebKit/chromium/ChangeLog

    r117970 r117978  
     12012-05-22  David Grogan  <dgrogan@chromium.org>
     2
     3        IndexedDB: Fire error when there are problems opening a DB
     4        https://bugs.webkit.org/show_bug.cgi?id=85579
     5
     6        Reviewed by Tony Chang.
     7
     8        * WebKit.gypi:
     9        * tests/IDBAbortOnCorruptTest.cpp: Added.
     10        (WebCore):
     11        (MockIDBCallbacks):
     12        (WebCore::MockIDBCallbacks::MockIDBCallbacks):
     13        (WebCore::MockIDBCallbacks::~MockIDBCallbacks):
     14        (WebCore::MockIDBCallbacks::onError):
     15        (WebCore::MockIDBCallbacks::onSuccess):
     16        (WebCore::MockIDBCallbacks::onSuccessWithContinuation):
     17        (WebCore::MockIDBCallbacks::onSuccessWithPrefetch):
     18        (WebCore::MockIDBCallbacks::onBlocked):
     19        (FailingBackingStore):
     20        (WebCore::FailingBackingStore::~FailingBackingStore):
     21        (WebCore::FailingBackingStore::open):
     22        (WebCore::FailingBackingStore::createIDBDatabaseMetaData):
     23        (FailingIDBFactoryBackendImpl):
     24        (WebCore::FailingIDBFactoryBackendImpl::~FailingIDBFactoryBackendImpl):
     25        (WebCore::FailingIDBFactoryBackendImpl::create):
     26        (WebCore::FailingIDBFactoryBackendImpl::removeIDBDatabaseBackend):
     27        (WebCore::FailingIDBFactoryBackendImpl::openBackingStore):
     28        (WebCore::TEST):
     29        * tests/IDBFakeBackingStore.h: Copied from Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.h.
     30        (WebCore):
     31        (IDBFakeBackingStore):
     32
    1332012-05-22  Alexander Pavlov  <apavlov@chromium.org>
    234
  • trunk/Source/WebKit/chromium/WebKit.gypi

    r117864 r117978  
    108108            'tests/FrameTestHelpers.h',
    109109            'tests/GraphicsLayerChromiumTest.cpp',
     110            'tests/IDBAbortOnCorruptTest.cpp',
    110111            'tests/IDBBindingUtilitiesTest.cpp',
     112            'tests/IDBFakeBackingStore.h',
    111113            'tests/IDBKeyPathTest.cpp',
    112114            'tests/IDBLevelDBCodingTest.cpp',
  • trunk/Source/WebKit/chromium/tests/IDBFakeBackingStore.h

    r117977 r117978  
    11/*
    2  * Copyright (C) 2011 Google Inc. All rights reserved.
     2 * Copyright (C) 2012 Google Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2424 */
    2525
    26 #ifndef IDBLevelDBBackingStore_h
    27 #define IDBLevelDBBackingStore_h
    28 
    29 #if ENABLE(INDEXED_DATABASE)
    30 #if USE(LEVELDB)
     26#ifndef IDBFakeBackingStore_h
     27#define IDBFakeBackingStore_h
    3128
    3229#include "IDBBackingStore.h"
    33 #include <wtf/OwnPtr.h>
    3430
    3531namespace WebCore {
    3632
    37 class LevelDBComparator;
    38 class LevelDBDatabase;
    39 class LevelDBTransaction;
    40 class IDBFactoryBackendImpl;
     33class IDBFakeBackingStore : public IDBBackingStore {
     34public:
     35    virtual void getDatabaseNames(Vector<String>& foundNames) OVERRIDE { }
     36    virtual bool getIDBDatabaseMetaData(const String& name, String& foundVersion, int64_t& foundId) OVERRIDE { return false; }
     37    virtual bool createIDBDatabaseMetaData(const String& name, const String& version, int64_t& rowId) OVERRIDE { return true; }
     38    virtual bool updateIDBDatabaseMetaData(int64_t rowId, const String& version) OVERRIDE { return false; }
     39    virtual bool deleteDatabase(const String& name) OVERRIDE { return false; }
    4140
    42 class IDBLevelDBBackingStore : public IDBBackingStore {
    43 public:
    44     static PassRefPtr<IDBBackingStore> open(SecurityOrigin*, const String& pathBase, const String& fileIdentifier, IDBFactoryBackendImpl*);
    45     virtual ~IDBLevelDBBackingStore();
     41    virtual void getObjectStores(int64_t databaseId, Vector<int64_t>& foundIds, Vector<String>& foundNames, Vector<IDBKeyPath>& foundKeyPaths, Vector<bool>& foundAutoIncrementFlags) OVERRIDE { }
     42    virtual bool createObjectStore(int64_t databaseId, const String& name, const IDBKeyPath& keyPath, bool autoIncrement, int64_t& assignedObjectStoreId) OVERRIDE { return false; }
     43    virtual void deleteObjectStore(int64_t databaseId, int64_t objectStoreId) OVERRIDE { }
    4644
    47     virtual void getDatabaseNames(Vector<String>& foundNames);
    48     virtual bool getIDBDatabaseMetaData(const String& name, String& foundVersion, int64_t& foundId);
    49     virtual bool createIDBDatabaseMetaData(const String& name, const String& version, int64_t& rowId);
    50     virtual bool updateIDBDatabaseMetaData(int64_t rowId, const String& version);
    51     virtual bool deleteDatabase(const String& name);
     45    virtual PassRefPtr<ObjectStoreRecordIdentifier> createInvalidRecordIdentifier() OVERRIDE { return PassRefPtr<ObjectStoreRecordIdentifier>(); }
    5246
    53     virtual void getObjectStores(int64_t databaseId, Vector<int64_t>& foundIds, Vector<String>& foundNames, Vector<IDBKeyPath>& foundKeyPaths, Vector<bool>& foundAutoIncrementFlags);
    54     virtual bool createObjectStore(int64_t databaseId, const String& name, const IDBKeyPath&, bool autoIncrement, int64_t& assignedObjectStoreId);
    55     virtual void deleteObjectStore(int64_t databaseId, int64_t objectStoreId);
    56     virtual PassRefPtr<ObjectStoreRecordIdentifier> createInvalidRecordIdentifier();
    57     virtual String getObjectStoreRecord(int64_t databaseId, int64_t objectStoreId, const IDBKey&);
    58     virtual bool putObjectStoreRecord(int64_t databaseId, int64_t objectStoreId, const IDBKey&, const String& value, ObjectStoreRecordIdentifier*);
    59     virtual void clearObjectStore(int64_t databaseId, int64_t objectStoreId);
    60     virtual void deleteObjectStoreRecord(int64_t databaseId, int64_t objectStoreId, const ObjectStoreRecordIdentifier*);
    61     virtual int64_t nextAutoIncrementNumber(int64_t databaseId, int64_t objectStoreId);
    62     virtual bool keyExistsInObjectStore(int64_t databaseId, int64_t objectStoreId, const IDBKey&, ObjectStoreRecordIdentifier* foundRecordIdentifier);
     47    virtual String getObjectStoreRecord(int64_t databaseId, int64_t objectStoreId, const IDBKey&) OVERRIDE { return String(); }
     48    virtual bool putObjectStoreRecord(int64_t databaseId, int64_t objectStoreId, const IDBKey&, const String& value, ObjectStoreRecordIdentifier*) OVERRIDE { return false; }
     49    virtual void clearObjectStore(int64_t databaseId, int64_t objectStoreId) OVERRIDE { }
     50    virtual void deleteObjectStoreRecord(int64_t databaseId, int64_t objectStoreId, const ObjectStoreRecordIdentifier*) OVERRIDE { }
     51    virtual int64_t nextAutoIncrementNumber(int64_t databaseId, int64_t objectStoreId) OVERRIDE { return 0.0; }
     52    virtual bool keyExistsInObjectStore(int64_t databaseId, int64_t objectStoreId, const IDBKey&, ObjectStoreRecordIdentifier* foundRecordIdentifier) OVERRIDE { return false; }
    6353
    64     virtual bool forEachObjectStoreRecord(int64_t databaseId, int64_t objectStoreId, ObjectStoreRecordCallback&);
     54    virtual bool forEachObjectStoreRecord(int64_t databaseId, int64_t objectStoreId, ObjectStoreRecordCallback&) OVERRIDE { return false; }
    6555
    66     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);
    67     virtual bool createIndex(int64_t databaseId, int64_t objectStoreId, const String& name, const IDBKeyPath&, bool isUnique, bool isMultiEntry, int64_t& indexId);
    68     virtual void deleteIndex(int64_t databaseId, int64_t objectStoreId, int64_t indexId);
    69     virtual bool putIndexDataForRecord(int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey&, const ObjectStoreRecordIdentifier*);
    70     virtual bool deleteIndexDataForRecord(int64_t databaseId, int64_t objectStoreId, int64_t indexId, const ObjectStoreRecordIdentifier*);
    71     virtual String getObjectViaIndex(int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey&);
    72     virtual PassRefPtr<IDBKey> getPrimaryKeyViaIndex(int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey&);
    73     virtual bool keyExistsInIndex(int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey& indexKey, RefPtr<IDBKey>& foundPrimaryKey);
     56    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 { }
     57    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; }
     58    virtual void deleteIndex(int64_t databaseId, int64_t objectStoreId, int64_t indexId) OVERRIDE { }
     59    virtual bool putIndexDataForRecord(int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey&, const ObjectStoreRecordIdentifier*) OVERRIDE { return false; }
     60    virtual bool deleteIndexDataForRecord(int64_t databaseId, int64_t objectStoreId, int64_t indexId, const ObjectStoreRecordIdentifier*) OVERRIDE { return false; }
     61    virtual String getObjectViaIndex(int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey&) OVERRIDE { return String(); }
     62    virtual PassRefPtr<IDBKey> getPrimaryKeyViaIndex(int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey&) OVERRIDE { return PassRefPtr<IDBKey>(); }
     63    virtual bool keyExistsInIndex(int64_t databaseid, int64_t objectStoreId, int64_t indexId, const IDBKey& indexKey, RefPtr<IDBKey>& foundPrimaryKey) OVERRIDE { return false; }
    7464
    75     virtual PassRefPtr<Cursor> openObjectStoreCursor(int64_t databaseId, int64_t objectStoreId, const IDBKeyRange*, IDBCursor::Direction);
    76     virtual PassRefPtr<Cursor> openIndexKeyCursor(int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKeyRange*, IDBCursor::Direction);
    77     virtual PassRefPtr<Cursor> openIndexCursor(int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKeyRange*, IDBCursor::Direction);
     65    virtual PassRefPtr<Cursor> openObjectStoreCursor(int64_t databaseId, int64_t objectStoreId, const IDBKeyRange*, IDBCursor::Direction) OVERRIDE { return PassRefPtr<Cursor>(); }
     66    virtual PassRefPtr<Cursor> openIndexKeyCursor(int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKeyRange*, IDBCursor::Direction) OVERRIDE { return PassRefPtr<Cursor>(); }
     67    virtual PassRefPtr<Cursor> openIndexCursor(int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKeyRange*, IDBCursor::Direction) OVERRIDE { return PassRefPtr<Cursor>(); }
    7868
    79     virtual PassRefPtr<Transaction> createTransaction();
    80 
    81     static bool backingStoreExists(SecurityOrigin*, const String& name, const String& pathBase);
    82 
    83 private:
    84     IDBLevelDBBackingStore(const String& identifier, IDBFactoryBackendImpl*, PassOwnPtr<LevelDBDatabase>);
    85 
    86     String m_identifier;
    87     RefPtr<IDBFactoryBackendImpl> m_factory;
    88     OwnPtr<LevelDBDatabase> m_db;
    89     OwnPtr<LevelDBComparator> m_comparator;
    90     RefPtr<LevelDBTransaction> m_currentTransaction;
    91 
    92     class Transaction : public IDBBackingStore::Transaction {
    93     public:
    94         static PassRefPtr<Transaction> create(IDBLevelDBBackingStore*);
    95         virtual void begin();
    96         virtual bool commit();
    97         virtual void rollback();
    98 
    99     private:
    100         Transaction(IDBLevelDBBackingStore*);
    101         IDBLevelDBBackingStore* m_backingStore;
    102     };
     69    virtual PassRefPtr<Transaction> createTransaction() OVERRIDE { return PassRefPtr<Transaction>(); }
    10370};
    10471
    10572} // namespace WebCore
    10673
    107 
    108 #endif // USE(LEVELDB)
    109 #endif // ENABLE(INDEXED_DATABASE)
    110 
    111 #endif // IDBLevelDBBackingStore_h
     74#endif // IDBFakeBackingStore_h
Note: See TracChangeset for help on using the changeset viewer.