Move IDBTransactionBackendLevelDB to generic IDBBackingStoreInterface
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Oct 2013 03:11:38 +0000 (03:11 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Oct 2013 03:11:38 +0000 (03:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=123483

Reviewed by Andreas Kling.

Source/WebCore:

* Modules/indexeddb/IDBCursorBackendInterface.h:
* Modules/indexeddb/IDBDatabaseBackendImpl.h:
* Modules/indexeddb/IDBDatabaseBackendInterface.h:
* Modules/indexeddb/IDBFactoryBackendInterface.h:
* Modules/indexeddb/IDBTransactionBackendInterface.h:

* Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
(WebCore::IDBCursorBackendLevelDB::IDBCursorBackendLevelDB):
* Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
(WebCore::IDBCursorBackendLevelDB::create):

* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
(WebCore::IDBFactoryBackendLevelDB::createCursorBackend):
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:

* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
(WebCore::IDBTransactionBackendLevelDB::registerOpenCursor):
(WebCore::IDBTransactionBackendLevelDB::unregisterOpenCursor):
(WebCore::IDBTransactionBackendLevelDB::closeOpenCursors):
(WebCore::IDBTransactionBackendLevelDB::createCursorBackend):
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:

* WebCore.xcodeproj/project.pbxproj: Export a required header.

Source/WebKit2:

* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
(WebKit::WebIDBFactoryBackend::createCursorBackend): Stubbed out.
* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:

* WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.cpp:
(WebKit::WebProcessIDBDatabaseBackend::factoryBackend): Stubbed out.
* WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.h:

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

18 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBCursorBackendInterface.h
Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.h
Source/WebCore/Modules/indexeddb/IDBDatabaseBackendInterface.h
Source/WebCore/Modules/indexeddb/IDBFactoryBackendInterface.h
Source/WebCore/Modules/indexeddb/IDBTransactionBackendInterface.h
Source/WebCore/Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp
Source/WebCore/Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h
Source/WebCore/Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp
Source/WebCore/Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h
Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp
Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp
Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h
Source/WebKit2/WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.cpp
Source/WebKit2/WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.h

index 214d0af..c15a904 100644 (file)
@@ -1,3 +1,34 @@
+2013-10-29  Brady Eidson  <beidson@apple.com>
+
+        Move IDBTransactionBackendLevelDB to generic IDBBackingStoreInterface
+        https://bugs.webkit.org/show_bug.cgi?id=123483
+
+        Reviewed by Andreas Kling.
+
+        * Modules/indexeddb/IDBCursorBackendInterface.h:
+        * Modules/indexeddb/IDBDatabaseBackendImpl.h:
+        * Modules/indexeddb/IDBDatabaseBackendInterface.h:
+        * Modules/indexeddb/IDBFactoryBackendInterface.h:
+        * Modules/indexeddb/IDBTransactionBackendInterface.h:
+
+        * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
+        (WebCore::IDBCursorBackendLevelDB::IDBCursorBackendLevelDB):
+        * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
+        (WebCore::IDBCursorBackendLevelDB::create):
+
+        * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
+        (WebCore::IDBFactoryBackendLevelDB::createCursorBackend):
+        * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
+
+        * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
+        (WebCore::IDBTransactionBackendLevelDB::registerOpenCursor):
+        (WebCore::IDBTransactionBackendLevelDB::unregisterOpenCursor):
+        (WebCore::IDBTransactionBackendLevelDB::closeOpenCursors):
+        (WebCore::IDBTransactionBackendLevelDB::createCursorBackend):
+        * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
+
+        * WebCore.xcodeproj/project.pbxproj: Export a required header.
+
 2013-10-29  Seokju Kwon  <seokju@webkit.org>
 
         Remove mutable keyword from member variables of XMLHttpRequest
index 7115b17..bbfc186 100644 (file)
@@ -53,6 +53,8 @@ public:
     virtual IDBKey* key() const = 0;
     virtual IDBKey* primaryKey() const = 0;
     virtual SharedBuffer* value() const = 0;
+
+    virtual void close() = 0;
 };
 
 } // namespace WebCore
index d6e68d1..f407585 100644 (file)
@@ -96,6 +96,8 @@ public:
     virtual bool hasPendingSecondHalfOpen() OVERRIDE { return m_pendingSecondHalfOpen; }
     virtual void setPendingSecondHalfOpen(PassOwnPtr<IDBPendingOpenCall> pendingOpenCall) OVERRIDE { m_pendingSecondHalfOpen = pendingOpenCall; }
 
+    virtual IDBFactoryBackendInterface& factoryBackend() OVERRIDE { return *m_factory; }
+
     class VersionChangeOperation;
     class VersionChangeAbortOperation;
 
index 7f2ecf8..19add78 100644 (file)
@@ -41,6 +41,7 @@
 namespace WebCore {
 
 class IDBBackingStoreInterface;
+class IDBFactoryBackendInterface;
 class IDBKey;
 class IDBKeyPath;
 class IDBKeyRange;
@@ -111,6 +112,8 @@ public:
     virtual void setPendingSecondHalfOpen(PassOwnPtr<IDBPendingOpenCall>) = 0;
 
     virtual bool isIDBDatabaseBackendImpl() { return false; }
+
+    virtual IDBFactoryBackendInterface& factoryBackend() = 0;
 };
 
 } // namespace WebCore
index 9346663..639a6a7 100644 (file)
@@ -28,6 +28,7 @@
 #ifndef IDBFactoryBackendInterface_h
 #define IDBFactoryBackendInterface_h
 
+#include "IDBBackingStoreInterface.h"
 #include "IndexedDB.h"
 
 #include <wtf/PassRefPtr.h>
@@ -38,7 +39,6 @@
 
 namespace WebCore {
 
-class IDBBackingStoreInterface;
 class IDBCallbacks;
 class IDBDatabase;
 class IDBDatabaseBackendInterface;
@@ -65,10 +65,12 @@ public:
     virtual void removeIDBDatabaseBackend(const String& uniqueIdentifier) = 0;
 
     virtual PassRefPtr<IDBTransactionBackendInterface> maybeCreateTransactionBackend(IDBDatabaseBackendInterface*, int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks>, const Vector<int64_t>& objectStoreIds, IndexedDB::TransactionMode) = 0;
+
+    virtual PassRefPtr<IDBCursorBackendInterface> createCursorBackend(IDBTransactionBackendInterface&, IDBBackingStoreInterface::Cursor&, IndexedDB::CursorType, IDBDatabaseBackendInterface::TaskType, int64_t objectStoreId) = 0;
 };
 
 } // namespace WebCore
 
-#endif
+#endif // IDBFactoryBackendInterface_h
 
 #endif // IDBFactoryBackendInterface_h
index 52466ed..122368b 100644 (file)
@@ -42,6 +42,7 @@ class IDBDatabaseCallbacks;
 class IDBDatabaseError;
 class IDBKey;
 class IDBKeyRange;
+class IDBOperation;
 
 struct IDBDatabaseMetadata;
 struct IDBIndexMetadata;
@@ -59,6 +60,12 @@ public:
     virtual void abort(PassRefPtr<IDBDatabaseError>) = 0;
     virtual const HashSet<int64_t>& scope() const = 0;
 
+    virtual void scheduleTask(PassOwnPtr<IDBOperation>, PassOwnPtr<IDBOperation> abortTask = nullptr) = 0;
+    virtual void scheduleTask(IDBDatabaseBackendInterface::TaskType, PassOwnPtr<IDBOperation>, PassOwnPtr<IDBOperation> abortTask = nullptr) = 0;
+
+    virtual void registerOpenCursor(IDBCursorBackendInterface*) = 0;
+    virtual void unregisterOpenCursor(IDBCursorBackendInterface*) = 0;
+
     virtual void scheduleCreateObjectStoreOperation(const IDBObjectStoreMetadata&) = 0;
     virtual void scheduleDeleteObjectStoreOperation(const IDBObjectStoreMetadata&) = 0;
     virtual void scheduleVersionChangeOperation(int64_t transactionId, int64_t requestedVersion, PassRefPtr<IDBCallbacks>, PassRefPtr<IDBDatabaseCallbacks>, const IDBDatabaseMetadata&) = 0;
index 8e31a76..8502612 100644 (file)
@@ -102,7 +102,7 @@ private:
     RefPtr<IDBCallbacks> m_callbacks;
 };
 
-IDBCursorBackendLevelDB::IDBCursorBackendLevelDB(PassRefPtr<IDBBackingStoreInterface::Cursor> cursor, IndexedDB::CursorType cursorType, IDBDatabaseBackendInterface::TaskType taskType, IDBTransactionBackendLevelDB* transaction, int64_t objectStoreId)
+IDBCursorBackendLevelDB::IDBCursorBackendLevelDB(PassRefPtr<IDBBackingStoreInterface::Cursor> cursor, IndexedDB::CursorType cursorType, IDBDatabaseBackendInterface::TaskType taskType, IDBTransactionBackendInterface* transaction, int64_t objectStoreId)
     : m_taskType(taskType)
     , m_cursorType(cursorType)
     , m_database(&(transaction->database()))
index 56fa9f5..ed1f738 100644 (file)
@@ -44,11 +44,11 @@ class IDBKeyRange;
 
 class IDBCursorBackendLevelDB : public IDBCursorBackendInterface {
 public:
-    static PassRefPtr<IDBCursorBackendLevelDB> create(PassRefPtr<IDBBackingStoreInterface::Cursor> cursor, IndexedDB::CursorType cursorType, IDBTransactionBackendLevelDB* transaction, int64_t objectStoreId)
+    static PassRefPtr<IDBCursorBackendLevelDB> create(PassRefPtr<IDBBackingStoreInterface::Cursor> cursor, IndexedDB::CursorType cursorType, IDBTransactionBackendInterface* transaction, int64_t objectStoreId)
     {
         return adoptRef(new IDBCursorBackendLevelDB(cursor, cursorType, IDBDatabaseBackendInterface::NormalTask, transaction, objectStoreId));
     }
-    static PassRefPtr<IDBCursorBackendLevelDB> create(PassRefPtr<IDBBackingStoreInterface::Cursor> cursor, IndexedDB::CursorType cursorType, IDBDatabaseBackendInterface::TaskType taskType, IDBTransactionBackendLevelDB* transaction, int64_t objectStoreId)
+    static PassRefPtr<IDBCursorBackendLevelDB> create(PassRefPtr<IDBBackingStoreInterface::Cursor> cursor, IndexedDB::CursorType cursorType, IDBDatabaseBackendInterface::TaskType taskType, IDBTransactionBackendInterface* transaction, int64_t objectStoreId)
     {
         return adoptRef(new IDBCursorBackendLevelDB(cursor, cursorType, taskType, transaction, objectStoreId));
     }
@@ -66,10 +66,10 @@ public:
     virtual IDBKey* primaryKey() const OVERRIDE { return m_cursor->primaryKey().get(); }
     virtual SharedBuffer* value() const OVERRIDE { return (m_cursorType == IndexedDB::CursorKeyOnly) ? 0 : m_cursor->value().get(); }
 
-    void close();
+    virtual void close() OVERRIDE;
 
 private:
-    IDBCursorBackendLevelDB(PassRefPtr<IDBBackingStoreInterface::Cursor>, IndexedDB::CursorType, IDBDatabaseBackendInterface::TaskType, IDBTransactionBackendLevelDB*, int64_t objectStoreId);
+    IDBCursorBackendLevelDB(PassRefPtr<IDBBackingStoreInterface::Cursor>, IndexedDB::CursorType, IDBDatabaseBackendInterface::TaskType, IDBTransactionBackendInterface*, int64_t objectStoreId);
 
     class CursorIterationOperation;
     class CursorAdvanceOperation;
@@ -78,7 +78,7 @@ private:
     IDBDatabaseBackendInterface::TaskType m_taskType;
     IndexedDB::CursorType m_cursorType;
     const RefPtr<IDBDatabaseBackendInterface> m_database;
-    RefPtr<IDBTransactionBackendLevelDB> m_transaction;
+    RefPtr<IDBTransactionBackendInterface> m_transaction;
     const int64_t m_objectStoreId;
 
     RefPtr<IDBBackingStoreInterface::Cursor> m_cursor; // Must be destroyed before m_transaction.
index 25e498c..d541aca 100644 (file)
@@ -31,6 +31,7 @@
 
 #include "DOMStringList.h"
 #include "IDBBackingStoreLevelDB.h"
+#include "IDBCursorBackendLevelDB.h"
 #include "IDBDatabaseBackendImpl.h"
 #include "IDBDatabaseException.h"
 #include "IDBTransactionBackendLevelDB.h"
@@ -196,6 +197,12 @@ PassRefPtr<IDBTransactionBackendInterface> IDBFactoryBackendLevelDB::maybeCreate
     return IDBTransactionBackendLevelDB::create(static_cast<IDBDatabaseBackendImpl*>(backend), transactionId, databaseCallbacks, objectStoreIds, mode);
 }
 
+PassRefPtr<IDBCursorBackendInterface> IDBFactoryBackendLevelDB::createCursorBackend(IDBTransactionBackendInterface& transactionBackend, IDBBackingStoreInterface::Cursor& backingStoreCursor, IndexedDB::CursorType cursorType, IDBDatabaseBackendInterface::TaskType taskType, int64_t objectStoreId)
+{
+    return IDBCursorBackendLevelDB::create(&backingStoreCursor, cursorType, taskType, &transactionBackend, objectStoreId);
+}
+
+
 } // namespace WebCore
 
 #endif // ENABLE(INDEXED_DATABASE) && USE(LEVELDB)
index 7dc8beb..b7194ba 100644 (file)
@@ -65,6 +65,8 @@ public:
 
     virtual PassRefPtr<IDBTransactionBackendInterface> maybeCreateTransactionBackend(IDBDatabaseBackendInterface*, int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks>, const Vector<int64_t>&, IndexedDB::TransactionMode) OVERRIDE FINAL;
 
+    virtual PassRefPtr<IDBCursorBackendInterface> createCursorBackend(IDBTransactionBackendInterface&, IDBBackingStoreInterface::Cursor&, IndexedDB::CursorType, IDBDatabaseBackendInterface::TaskType, int64_t objectStoreId);
+
 protected:
     virtual PassRefPtr<IDBBackingStoreLevelDB> openBackingStore(const SecurityOrigin&, const String& dataDir);
 
index d61adc2..a3bf542 100644 (file)
 
 #if ENABLE(INDEXED_DATABASE) && USE(LEVELDB)
 
-#include "IDBBackingStoreLevelDB.h"
-#include "IDBCursorBackendLevelDB.h"
+#include "IDBCursorBackendInterface.h"
 #include "IDBDatabaseBackendImpl.h"
 #include "IDBDatabaseCallbacks.h"
 #include "IDBDatabaseException.h"
+#include "IDBFactoryBackendInterface.h"
 #include "IDBKeyRange.h"
 #include "IDBTransactionBackendLevelDBOperations.h"
 #include "IDBTransactionCoordinator.h"
@@ -153,12 +153,12 @@ bool IDBTransactionBackendLevelDB::hasPendingTasks() const
     return m_pendingPreemptiveEvents || !isTaskQueueEmpty();
 }
 
-void IDBTransactionBackendLevelDB::registerOpenCursor(IDBCursorBackendLevelDB* cursor)
+void IDBTransactionBackendLevelDB::registerOpenCursor(IDBCursorBackendInterface* cursor)
 {
     m_openCursors.add(cursor);
 }
 
-void IDBTransactionBackendLevelDB::unregisterOpenCursor(IDBCursorBackendLevelDB* cursor)
+void IDBTransactionBackendLevelDB::unregisterOpenCursor(IDBCursorBackendInterface* cursor)
 {
     m_openCursors.remove(cursor);
 }
@@ -265,7 +265,7 @@ void IDBTransactionBackendLevelDB::taskTimerFired(Timer<IDBTransactionBackendLev
 
 void IDBTransactionBackendLevelDB::closeOpenCursors()
 {
-    for (HashSet<IDBCursorBackendLevelDB*>::iterator i = m_openCursors.begin(); i != m_openCursors.end(); ++i)
+    for (HashSet<IDBCursorBackendInterface*>::iterator i = m_openCursors.begin(); i != m_openCursors.end(); ++i)
         (*i)->close();
     m_openCursors.clear();
 }
@@ -332,7 +332,7 @@ void IDBTransactionBackendLevelDB::scheduleClearOperation(int64_t objectStoreId,
 
 PassRefPtr<IDBCursorBackendInterface> IDBTransactionBackendLevelDB::createCursorBackend(IDBBackingStoreInterface::Cursor& cursor, IndexedDB::CursorType cursorType, IDBDatabaseBackendInterface::TaskType taskType, int64_t objectStoreId)
 {
-    return IDBCursorBackendLevelDB::create(&cursor, cursorType, taskType, this, objectStoreId);
+    return m_database->factoryBackend().createCursorBackend(*this, cursor, cursorType, taskType, objectStoreId);
 }
 
 };
index e742ece..0db9b34 100644 (file)
@@ -28,7 +28,7 @@
 
 #if ENABLE(INDEXED_DATABASE) && USE(LEVELDB)
 
-#include "IDBBackingStoreLevelDB.h"
+#include "IDBBackingStoreInterface.h"
 #include "IDBDatabaseBackendImpl.h"
 #include "IDBDatabaseBackendInterface.h"
 #include "IDBDatabaseError.h"
@@ -41,8 +41,6 @@
 
 namespace WebCore {
 
-class IDBBackingStoreLevelDB;
-class IDBCursorBackendLevelDB;
 class IDBDatabaseCallbacks;
 
 class IDBTransactionBackendLevelDB FINAL : public IDBTransactionBackendInterface {
@@ -57,10 +55,13 @@ public:
     virtual void run() OVERRIDE;
     virtual IndexedDB::TransactionMode mode() const OVERRIDE FINAL { return m_mode; }
     const HashSet<int64_t>& scope() const OVERRIDE { return m_objectStoreIds; }
-    void scheduleTask(PassOwnPtr<IDBOperation> task, PassOwnPtr<IDBOperation> abortTask = nullptr) { scheduleTask(IDBDatabaseBackendInterface::NormalTask, task, abortTask); }
-    void scheduleTask(IDBDatabaseBackendInterface::TaskType, PassOwnPtr<IDBOperation>, PassOwnPtr<IDBOperation> abortTask = nullptr);
-    void registerOpenCursor(IDBCursorBackendLevelDB*);
-    void unregisterOpenCursor(IDBCursorBackendLevelDB*);
+
+    virtual void scheduleTask(PassOwnPtr<IDBOperation> task, PassOwnPtr<IDBOperation> abortTask = nullptr) { scheduleTask(IDBDatabaseBackendInterface::NormalTask, task, abortTask); }
+    virtual void scheduleTask(IDBDatabaseBackendInterface::TaskType, PassOwnPtr<IDBOperation>, PassOwnPtr<IDBOperation> abortTask = nullptr) OVERRIDE;
+
+    virtual void registerOpenCursor(IDBCursorBackendInterface*) OVERRIDE;
+    virtual void unregisterOpenCursor(IDBCursorBackendInterface*) OVERRIDE;
+
     virtual void addPreemptiveEvent() OVERRIDE { m_pendingPreemptiveEvents++; }
     virtual void didCompletePreemptiveEvent() OVERRIDE { m_pendingPreemptiveEvents--; ASSERT(m_pendingPreemptiveEvents >= 0); }
     virtual IDBBackingStoreInterface::Transaction& backingStoreTransaction() { return *m_backingStoreTransaction; }
@@ -119,7 +120,7 @@ private:
     Timer<IDBTransactionBackendLevelDB> m_taskTimer;
     int m_pendingPreemptiveEvents;
 
-    HashSet<IDBCursorBackendLevelDB*> m_openCursors;
+    HashSet<IDBCursorBackendInterface*> m_openCursors;
     
     RefPtr<IDBBackingStoreInterface> m_backingStore;
 };
index 8265edb..34c29ed 100644 (file)
                51D719BE181106E00016DC51 /* IDBCallbacks.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D71974181106DF0016DC51 /* IDBCallbacks.h */; settings = {ATTRIBUTES = (Private, ); }; };
                51D719BF181106E00016DC51 /* IDBCursor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D71975181106DF0016DC51 /* IDBCursor.cpp */; };
                51D719C0181106E00016DC51 /* IDBCursor.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D71976181106DF0016DC51 /* IDBCursor.h */; };
-               51D719C2181106E00016DC51 /* IDBCursorBackendInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D71978181106DF0016DC51 /* IDBCursorBackendInterface.h */; };
+               51D719C2181106E00016DC51 /* IDBCursorBackendInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D71978181106DF0016DC51 /* IDBCursorBackendInterface.h */; settings = {ATTRIBUTES = (Private, ); }; };
                51D719C3181106E00016DC51 /* IDBCursorWithValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D71979181106DF0016DC51 /* IDBCursorWithValue.cpp */; };
                51D719C4181106E00016DC51 /* IDBCursorWithValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D7197A181106DF0016DC51 /* IDBCursorWithValue.h */; };
                51D719C6181106E00016DC51 /* IDBDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D7197C181106DF0016DC51 /* IDBDatabase.cpp */; };
index 779f28a..272d6a1 100644 (file)
@@ -1,3 +1,18 @@
+2013-10-29  Brady Eidson  <beidson@apple.com>
+
+        Move IDBTransactionBackendLevelDB to generic IDBBackingStoreInterface
+        https://bugs.webkit.org/show_bug.cgi?id=123483
+
+        Reviewed by Andreas Kling.
+
+        * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
+        (WebKit::WebIDBFactoryBackend::createCursorBackend): Stubbed out.
+        * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
+
+        * WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.cpp:
+        (WebKit::WebProcessIDBDatabaseBackend::factoryBackend): Stubbed out.
+        * WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.h:
+
 2013-10-29  Jer Noble  <jer.noble@apple.com>
 
         [MSE] [Mac] Enable MediaSource on the Mac
index 52be1a1..dc35885 100644 (file)
@@ -33,6 +33,7 @@
 #include "WebProcessIDBDatabaseBackend.h"
 #include "WebToDatabaseProcessConnection.h"
 #include <WebCore/IDBCallbacks.h>
+#include <WebCore/IDBCursorBackendInterface.h>
 #include <WebCore/IDBDatabaseCallbacks.h>
 #include <WebCore/IDBTransactionBackendInterface.h>
 #include <WebCore/NotImplemented.h>
@@ -105,6 +106,12 @@ PassRefPtr<IDBTransactionBackendInterface> WebIDBFactoryBackend::maybeCreateTran
     return 0;
 }
 
+PassRefPtr<IDBCursorBackendInterface> WebIDBFactoryBackend::createCursorBackend(IDBTransactionBackendInterface&, IDBBackingStoreInterface::Cursor&, IndexedDB::CursorType, IDBDatabaseBackendInterface::TaskType, int64_t)
+{
+    notImplemented();
+    return 0;
+}
+
 } // namespace WebKit
 
 #endif // ENABLE(DATABASE_PROCESS)
index 0cdf9a3..b405821 100644 (file)
 
 namespace WebKit {
 
-class WebIDBFactoryBackend : public WebCore::IDBFactoryBackendInterface {
+class WebIDBFactoryBackend FINAL : public WebCore::IDBFactoryBackendInterface {
 public:
     static PassRefPtr<WebIDBFactoryBackend> create(const String& databaseDirectoryIdentifier) { return adoptRef(new WebIDBFactoryBackend(databaseDirectoryIdentifier)); }
 
     virtual ~WebIDBFactoryBackend();
 
-    virtual void getDatabaseNames(PassRefPtr<WebCore::IDBCallbacks>, PassRefPtr<WebCore::SecurityOrigin>, WebCore::ScriptExecutionContext*, const String& dataDir) OVERRIDE FINAL;
-    virtual void open(const String& name, int64_t version, int64_t transactionId, PassRefPtr<WebCore::IDBCallbacks>, PassRefPtr<WebCore::IDBDatabaseCallbacks>, const WebCore::SecurityOrigin& openingOrigin, const WebCore::SecurityOrigin& mainFrameOrigin) OVERRIDE FINAL;
-    virtual void deleteDatabase(const String& name, PassRefPtr<WebCore::IDBCallbacks>, PassRefPtr<WebCore::SecurityOrigin>, WebCore::ScriptExecutionContext*, const String& dataDir) OVERRIDE FINAL;
+    virtual void getDatabaseNames(PassRefPtr<WebCore::IDBCallbacks>, PassRefPtr<WebCore::SecurityOrigin>, WebCore::ScriptExecutionContext*, const String& dataDir) OVERRIDE;
+    virtual void open(const String& name, int64_t version, int64_t transactionId, PassRefPtr<WebCore::IDBCallbacks>, PassRefPtr<WebCore::IDBDatabaseCallbacks>, const WebCore::SecurityOrigin& openingOrigin, const WebCore::SecurityOrigin& mainFrameOrigin) OVERRIDE;
+    virtual void deleteDatabase(const String& name, PassRefPtr<WebCore::IDBCallbacks>, PassRefPtr<WebCore::SecurityOrigin>, WebCore::ScriptExecutionContext*, const String& dataDir) OVERRIDE;
 
-    virtual void removeIDBDatabaseBackend(const String& uniqueIdentifier) OVERRIDE FINAL;
+    virtual void removeIDBDatabaseBackend(const String& uniqueIdentifier) OVERRIDE;
 
-    virtual PassRefPtr<WebCore::IDBTransactionBackendInterface> maybeCreateTransactionBackend(WebCore::IDBDatabaseBackendInterface*, 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) OVERRIDE;
+
+    virtual PassRefPtr<WebCore::IDBCursorBackendInterface> createCursorBackend(WebCore::IDBTransactionBackendInterface&, WebCore::IDBBackingStoreInterface::Cursor&, WebCore::IndexedDB::CursorType, WebCore::IDBDatabaseBackendInterface::TaskType, int64_t objectStoreId) OVERRIDE;
 
 private:
     explicit WebIDBFactoryBackend(const String& databaseDirectoryIdentifier);
index feaad6f..7ce510b 100644 (file)
@@ -215,6 +215,12 @@ void WebProcessIDBDatabaseBackend::setPendingSecondHalfOpen(PassOwnPtr<IDBPendin
     ASSERT_NOT_REACHED();
 }
 
+IDBFactoryBackendInterface& WebProcessIDBDatabaseBackend::factoryBackend()
+{
+    ASSERT_NOT_REACHED();
+    return *((IDBFactoryBackendInterface*)0);
+}
+
 } // namespace WebKit
 
 #endif // ENABLE(DATABASE_PROCESS)
index 3f9bf09..a7ec9d5 100644 (file)
@@ -84,6 +84,8 @@ public:
     virtual bool hasPendingSecondHalfOpen() OVERRIDE;
     virtual void setPendingSecondHalfOpen(PassOwnPtr<WebCore::IDBPendingOpenCall>) OVERRIDE;
 
+    virtual WebCore::IDBFactoryBackendInterface& factoryBackend() OVERRIDE;
+
     void openConnection(PassRefPtr<WebCore::IDBCallbacks>, PassRefPtr<WebCore::IDBDatabaseCallbacks>, int64_t transactionId, int64_t version);
 
     void establishDatabaseProcessBackend();