[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
jorlow at chromium.org
jorlow at chromium.org
Wed Dec 22 15:30:49 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit c18cced0d85a161ff3a4965960ea5d76dbd411c8
Author: jorlow at chromium.org <jorlow at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Nov 5 11:53:36 2010 +0000
2010-10-27 Jeremy Orlow <jorlow at chromium.org>
Reviewed by Steve Block.
IDBObjectStoreBackend and IDBIndexBackend should not depend on IDBDatabaseBackend
https://bugs.webkit.org/show_bug.cgi?id=48410
Break dependency cyles between IDBDatabaseBackend and the other classes listed.
This was causing memory leaks.
* storage/IDBCursorBackendImpl.cpp:
(WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
(WebCore::IDBCursorBackendImpl::updateInternal):
(WebCore::IDBCursorBackendImpl::removeInternal):
(WebCore::IDBCursorBackendImpl::database):
* storage/IDBCursorBackendImpl.h:
(WebCore::IDBCursorBackendImpl::create):
* storage/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::createObjectStore):
(WebCore::IDBDatabaseBackendImpl::loadObjectStores):
* storage/IDBIndexBackendImpl.cpp:
(WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl):
(WebCore::IDBIndexBackendImpl::openCursorInternal):
(WebCore::IDBIndexBackendImpl::sqliteDatabase):
* storage/IDBIndexBackendImpl.h:
(WebCore::IDBIndexBackendImpl::create):
(WebCore::IDBIndexBackendImpl::storeName):
* storage/IDBObjectStoreBackendImpl.cpp:
(WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl):
(WebCore::IDBObjectStoreBackendImpl::createIndex):
(WebCore::IDBObjectStoreBackendImpl::openCursorInternal):
(WebCore::IDBObjectStoreBackendImpl::loadIndexes):
(WebCore::IDBObjectStoreBackendImpl::sqliteDatabase):
* storage/IDBObjectStoreBackendImpl.h:
(WebCore::IDBObjectStoreBackendImpl::create):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71408 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6641903..b38590b 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,39 @@
+2010-10-27 Jeremy Orlow <jorlow at chromium.org>
+
+ Reviewed by Steve Block.
+
+ IDBObjectStoreBackend and IDBIndexBackend should not depend on IDBDatabaseBackend
+ https://bugs.webkit.org/show_bug.cgi?id=48410
+
+ Break dependency cyles between IDBDatabaseBackend and the other classes listed.
+ This was causing memory leaks.
+
+ * storage/IDBCursorBackendImpl.cpp:
+ (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
+ (WebCore::IDBCursorBackendImpl::updateInternal):
+ (WebCore::IDBCursorBackendImpl::removeInternal):
+ (WebCore::IDBCursorBackendImpl::database):
+ * storage/IDBCursorBackendImpl.h:
+ (WebCore::IDBCursorBackendImpl::create):
+ * storage/IDBDatabaseBackendImpl.cpp:
+ (WebCore::IDBDatabaseBackendImpl::createObjectStore):
+ (WebCore::IDBDatabaseBackendImpl::loadObjectStores):
+ * storage/IDBIndexBackendImpl.cpp:
+ (WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl):
+ (WebCore::IDBIndexBackendImpl::openCursorInternal):
+ (WebCore::IDBIndexBackendImpl::sqliteDatabase):
+ * storage/IDBIndexBackendImpl.h:
+ (WebCore::IDBIndexBackendImpl::create):
+ (WebCore::IDBIndexBackendImpl::storeName):
+ * storage/IDBObjectStoreBackendImpl.cpp:
+ (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl):
+ (WebCore::IDBObjectStoreBackendImpl::createIndex):
+ (WebCore::IDBObjectStoreBackendImpl::openCursorInternal):
+ (WebCore::IDBObjectStoreBackendImpl::loadIndexes):
+ (WebCore::IDBObjectStoreBackendImpl::sqliteDatabase):
+ * storage/IDBObjectStoreBackendImpl.h:
+ (WebCore::IDBObjectStoreBackendImpl::create):
+
2010-11-05 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Timothy Hatcher.
diff --git a/WebCore/storage/IDBCursorBackendImpl.cpp b/WebCore/storage/IDBCursorBackendImpl.cpp
index 40b46c6..8d5c8a1 100644
--- a/WebCore/storage/IDBCursorBackendImpl.cpp
+++ b/WebCore/storage/IDBCursorBackendImpl.cpp
@@ -37,6 +37,7 @@
#include "IDBKeyRange.h"
#include "IDBObjectStoreBackendImpl.h"
#include "IDBRequest.h"
+#include "IDBSQLiteDatabase.h"
#include "IDBTransactionBackendInterface.h"
#include "SQLiteDatabase.h"
#include "SQLiteStatement.h"
@@ -44,19 +45,8 @@
namespace WebCore {
-IDBCursorBackendImpl::IDBCursorBackendImpl(PassRefPtr<IDBObjectStoreBackendImpl> idbObjectStore, PassRefPtr<IDBKeyRange> keyRange, IDBCursor::Direction direction, PassOwnPtr<SQLiteStatement> query, IDBTransactionBackendInterface* transaction)
- : m_idbObjectStore(idbObjectStore)
- , m_keyRange(keyRange)
- , m_direction(direction)
- , m_query(query)
- , m_isSerializedScriptValueCursor(true)
- , m_transaction(transaction)
-{
- loadCurrentRow();
-}
-
-IDBCursorBackendImpl::IDBCursorBackendImpl(PassRefPtr<IDBIndexBackendImpl> idbIndex, PassRefPtr<IDBKeyRange> keyRange, IDBCursor::Direction direction, PassOwnPtr<SQLiteStatement> query, bool isSerializedScriptValueCursor, IDBTransactionBackendInterface* transaction)
- : m_idbIndex(idbIndex)
+IDBCursorBackendImpl::IDBCursorBackendImpl(IDBSQLiteDatabase* database, PassRefPtr<IDBKeyRange> keyRange, IDBCursor::Direction direction, PassOwnPtr<SQLiteStatement> query, bool isSerializedScriptValueCursor, IDBTransactionBackendInterface* transaction)
+ : m_database(database)
, m_keyRange(keyRange)
, m_direction(direction)
, m_query(query)
@@ -113,7 +103,7 @@ void IDBCursorBackendImpl::updateInternal(ScriptExecutionContext*, PassRefPtr<ID
}
String sql = "UPDATE ObjectStoreData SET value = ? WHERE id = ?";
- SQLiteStatement updateQuery(cursor->database()->sqliteDatabase(), sql);
+ SQLiteStatement updateQuery(cursor->database(), sql);
bool ok = updateQuery.prepare() == SQLResultOk;
ASSERT_UNUSED(ok, ok); // FIXME: Better error handling.
@@ -189,7 +179,7 @@ void IDBCursorBackendImpl::removeInternal(ScriptExecutionContext*, PassRefPtr<ID
}
String sql = "DELETE FROM ObjectStoreData WHERE id = ?";
- SQLiteStatement deleteQuery(cursor->database()->sqliteDatabase(), sql);
+ SQLiteStatement deleteQuery(cursor->database(), sql);
bool ok = deleteQuery.prepare() == SQLResultOk;
ASSERT_UNUSED(ok, ok); // FIXME: Better error handling.
@@ -214,11 +204,9 @@ void IDBCursorBackendImpl::loadCurrentRow()
m_currentIDBKeyValue = IDBKey::fromQuery(*m_query, 4);
}
-IDBDatabaseBackendImpl* IDBCursorBackendImpl::database() const
+SQLiteDatabase& IDBCursorBackendImpl::database() const
{
- if (m_idbObjectStore)
- return m_idbObjectStore->database();
- return m_idbIndex->objectStore()->database();
+ return m_database->db();
}
} // namespace WebCore
diff --git a/WebCore/storage/IDBCursorBackendImpl.h b/WebCore/storage/IDBCursorBackendImpl.h
index 5dd45f2..b646f1c 100644
--- a/WebCore/storage/IDBCursorBackendImpl.h
+++ b/WebCore/storage/IDBCursorBackendImpl.h
@@ -41,19 +41,17 @@ class IDBDatabaseBackendImpl;
class IDBIndexBackendImpl;
class IDBKeyRange;
class IDBObjectStoreBackendImpl;
+class IDBSQLiteDatabase;
class IDBTransactionBackendInterface;
+class SQLiteDatabase;
class SQLiteStatement;
class SerializedScriptValue;
class IDBCursorBackendImpl : public IDBCursorBackendInterface {
public:
- static PassRefPtr<IDBCursorBackendImpl> create(PassRefPtr<IDBObjectStoreBackendImpl> objectStore, PassRefPtr<IDBKeyRange> keyRange, IDBCursor::Direction direction, PassOwnPtr<SQLiteStatement> query, IDBTransactionBackendInterface* transaction)
+ static PassRefPtr<IDBCursorBackendImpl> create(IDBSQLiteDatabase* database, PassRefPtr<IDBKeyRange> keyRange, IDBCursor::Direction direction, PassOwnPtr<SQLiteStatement> query, bool isSerializedScriptValueCursor, IDBTransactionBackendInterface* transaction)
{
- return adoptRef(new IDBCursorBackendImpl(objectStore, keyRange, direction, query, transaction));
- }
- static PassRefPtr<IDBCursorBackendImpl> create(PassRefPtr<IDBIndexBackendImpl> index, PassRefPtr<IDBKeyRange> keyRange, IDBCursor::Direction direction, PassOwnPtr<SQLiteStatement> query, bool isSerializedScriptValueCursor, IDBTransactionBackendInterface* transaction)
- {
- return adoptRef(new IDBCursorBackendImpl(index, keyRange, direction, query, isSerializedScriptValueCursor, transaction));
+ return adoptRef(new IDBCursorBackendImpl(database, keyRange, direction, query, isSerializedScriptValueCursor, transaction));
}
virtual ~IDBCursorBackendImpl();
@@ -65,11 +63,10 @@ public:
virtual void remove(PassRefPtr<IDBCallbacks>, ExceptionCode&);
private:
- IDBCursorBackendImpl(PassRefPtr<IDBObjectStoreBackendImpl>, PassRefPtr<IDBKeyRange>, IDBCursor::Direction, PassOwnPtr<SQLiteStatement> query, IDBTransactionBackendInterface*);
- IDBCursorBackendImpl(PassRefPtr<IDBIndexBackendImpl>, PassRefPtr<IDBKeyRange>, IDBCursor::Direction, PassOwnPtr<SQLiteStatement> query, bool isSerializedScriptValueCursor, IDBTransactionBackendInterface*);
+ IDBCursorBackendImpl(IDBSQLiteDatabase*, PassRefPtr<IDBKeyRange>, IDBCursor::Direction, PassOwnPtr<SQLiteStatement> query, bool isSerializedScriptValueCursor, IDBTransactionBackendInterface*);
void loadCurrentRow();
- IDBDatabaseBackendImpl* database() const;
+ SQLiteDatabase& database() const;
static void updateInternal(ScriptExecutionContext*, PassRefPtr<IDBCursorBackendImpl>, PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBCallbacks>);
static void continueFunctionInternal(ScriptExecutionContext*, PassRefPtr<IDBCursorBackendImpl>, PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>);
@@ -77,9 +74,7 @@ private:
static const int64_t InvalidId = -1;
- // Only one or the other should be used.
- RefPtr<IDBObjectStoreBackendImpl> m_idbObjectStore;
- RefPtr<IDBIndexBackendImpl> m_idbIndex;
+ RefPtr<IDBSQLiteDatabase> m_database;
RefPtr<IDBKeyRange> m_keyRange;
IDBCursor::Direction m_direction;
diff --git a/WebCore/storage/IDBDatabaseBackendImpl.cpp b/WebCore/storage/IDBDatabaseBackendImpl.cpp
index 020ddb9..3bee8fe 100644
--- a/WebCore/storage/IDBDatabaseBackendImpl.cpp
+++ b/WebCore/storage/IDBDatabaseBackendImpl.cpp
@@ -139,7 +139,7 @@ PassRefPtr<IDBObjectStoreBackendInterface> IDBDatabaseBackendImpl::createObject
return 0;
}
- RefPtr<IDBObjectStoreBackendImpl> objectStore = IDBObjectStoreBackendImpl::create(this, name, keyPath, autoIncrement);
+ RefPtr<IDBObjectStoreBackendImpl> objectStore = IDBObjectStoreBackendImpl::create(m_sqliteDatabase.get(), name, keyPath, autoIncrement);
ASSERT(objectStore->name() == name);
RefPtr<IDBDatabaseBackendImpl> database = this;
@@ -265,7 +265,7 @@ void IDBDatabaseBackendImpl::loadObjectStores()
String keyPath = objectStoresQuery.getColumnText(2);
bool autoIncrement = !!objectStoresQuery.getColumnInt(3);
- m_objectStores.set(name, IDBObjectStoreBackendImpl::create(this, id, name, keyPath, autoIncrement));
+ m_objectStores.set(name, IDBObjectStoreBackendImpl::create(m_sqliteDatabase.get(), id, name, keyPath, autoIncrement));
}
}
diff --git a/WebCore/storage/IDBIndexBackendImpl.cpp b/WebCore/storage/IDBIndexBackendImpl.cpp
index 2a991fa..84af234 100644
--- a/WebCore/storage/IDBIndexBackendImpl.cpp
+++ b/WebCore/storage/IDBIndexBackendImpl.cpp
@@ -36,24 +36,27 @@
#include "IDBKey.h"
#include "IDBKeyRange.h"
#include "IDBObjectStoreBackendImpl.h"
+#include "IDBSQLiteDatabase.h"
#include "SQLiteDatabase.h"
#include "SQLiteStatement.h"
namespace WebCore {
-IDBIndexBackendImpl::IDBIndexBackendImpl(IDBObjectStoreBackendImpl* objectStore, int64_t id, const String& name, const String& keyPath, bool unique)
- : m_objectStore(objectStore)
+IDBIndexBackendImpl::IDBIndexBackendImpl(IDBSQLiteDatabase* database, int64_t id, const String& name, const String& storeName, const String& keyPath, bool unique)
+ : m_database(database)
, m_id(id)
, m_name(name)
+ , m_storeName(storeName)
, m_keyPath(keyPath)
, m_unique(unique)
{
}
-IDBIndexBackendImpl::IDBIndexBackendImpl(IDBObjectStoreBackendImpl* objectStore, const String& name, const String& keyPath, bool unique)
- : m_objectStore(objectStore)
+IDBIndexBackendImpl::IDBIndexBackendImpl(IDBSQLiteDatabase* database, const String& name, const String& storeName, const String& keyPath, bool unique)
+ : m_database(database)
, m_id(InvalidId)
, m_name(name)
+ , m_storeName(storeName)
, m_keyPath(keyPath)
, m_unique(unique)
{
@@ -63,11 +66,6 @@ IDBIndexBackendImpl::~IDBIndexBackendImpl()
{
}
-String IDBIndexBackendImpl::storeName()
-{
- return m_objectStore->name();
-}
-
void IDBIndexBackendImpl::openCursorInternal(ScriptExecutionContext*, PassRefPtr<IDBIndexBackendImpl> index, PassRefPtr<IDBKeyRange> range, unsigned short untypedDirection, bool objectCursor, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<IDBTransactionBackendInterface> transaction)
{
// Several files depend on this order of selects.
@@ -106,7 +104,7 @@ void IDBIndexBackendImpl::openCursorInternal(ScriptExecutionContext*, PassRefPtr
return;
}
- RefPtr<IDBCursorBackendInterface> cursor = IDBCursorBackendImpl::create(index, range, direction, query.release(), objectCursor, transaction.get());
+ RefPtr<IDBCursorBackendInterface> cursor = IDBCursorBackendImpl::create(index->m_database.get(), range, direction, query.release(), objectCursor, transaction.get());
callbacks->onSuccess(cursor.release());
}
@@ -200,7 +198,7 @@ bool IDBIndexBackendImpl::addingKeyAllowed(IDBKey* key)
SQLiteDatabase& IDBIndexBackendImpl::sqliteDatabase() const
{
- return m_objectStore->database()->sqliteDatabase();
+ return m_database->db();
}
} // namespace WebCore
diff --git a/WebCore/storage/IDBIndexBackendImpl.h b/WebCore/storage/IDBIndexBackendImpl.h
index d5e81ae..e640b5a 100644
--- a/WebCore/storage/IDBIndexBackendImpl.h
+++ b/WebCore/storage/IDBIndexBackendImpl.h
@@ -34,18 +34,19 @@ namespace WebCore {
class IDBKey;
class IDBObjectStoreBackendImpl;
+class IDBSQLiteDatabase;
class SQLiteDatabase;
class ScriptExecutionContext;
class IDBIndexBackendImpl : public IDBIndexBackendInterface {
public:
- static PassRefPtr<IDBIndexBackendImpl> create(IDBObjectStoreBackendImpl* objectStore, int64_t id, const String& name, const String& keyPath, bool unique)
+ static PassRefPtr<IDBIndexBackendImpl> create(IDBSQLiteDatabase* database, int64_t id, const String& name, const String& storeName, const String& keyPath, bool unique)
{
- return adoptRef(new IDBIndexBackendImpl(objectStore, id, name, keyPath, unique));
+ return adoptRef(new IDBIndexBackendImpl(database, id, name, storeName, keyPath, unique));
}
- static PassRefPtr<IDBIndexBackendImpl> create(IDBObjectStoreBackendImpl* objectStore, const String& name, const String& keyPath, bool unique)
+ static PassRefPtr<IDBIndexBackendImpl> create(IDBSQLiteDatabase* database, const String& name, const String& storeName, const String& keyPath, bool unique)
{
- return adoptRef(new IDBIndexBackendImpl(objectStore, name, keyPath, unique));
+ return adoptRef(new IDBIndexBackendImpl(database, name, storeName, keyPath, unique));
}
virtual ~IDBIndexBackendImpl();
@@ -60,7 +61,7 @@ public:
// Implements IDBIndexBackendInterface.
virtual String name() { return m_name; }
- virtual String storeName();
+ virtual String storeName() { return m_storeName; }
virtual String keyPath() { return m_keyPath; }
virtual bool unique() { return m_unique; }
@@ -69,11 +70,9 @@ public:
virtual void get(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&);
virtual void getKey(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&);
- IDBObjectStoreBackendImpl* objectStore() const { return m_objectStore.get(); }
-
private:
- IDBIndexBackendImpl(IDBObjectStoreBackendImpl*, int64_t id, const String& name, const String& keyPath, bool unique);
- IDBIndexBackendImpl(IDBObjectStoreBackendImpl*, const String& name, const String& keyPath, bool unique);
+ IDBIndexBackendImpl(IDBSQLiteDatabase*, int64_t id, const String& name, const String& storeName, const String& keyPath, bool unique);
+ IDBIndexBackendImpl(IDBSQLiteDatabase*, const String& name, const String& storeName, const String& keyPath, bool unique);
SQLiteDatabase& sqliteDatabase() const;
@@ -82,10 +81,11 @@ private:
static const int64_t InvalidId = 0;
- RefPtr<IDBObjectStoreBackendImpl> m_objectStore;
+ RefPtr<IDBSQLiteDatabase> m_database;
int64_t m_id;
String m_name;
+ String m_storeName;
String m_keyPath;
bool m_unique;
};
diff --git a/WebCore/storage/IDBObjectStoreBackendImpl.cpp b/WebCore/storage/IDBObjectStoreBackendImpl.cpp
index 4892556..653fb4e 100644
--- a/WebCore/storage/IDBObjectStoreBackendImpl.cpp
+++ b/WebCore/storage/IDBObjectStoreBackendImpl.cpp
@@ -40,6 +40,7 @@
#include "IDBKeyPath.h"
#include "IDBKeyPathBackendImpl.h"
#include "IDBKeyRange.h"
+#include "IDBSQLiteDatabase.h"
#include "IDBTransactionBackendInterface.h"
#include "ScriptExecutionContext.h"
#include "SQLiteDatabase.h"
@@ -52,7 +53,7 @@ IDBObjectStoreBackendImpl::~IDBObjectStoreBackendImpl()
{
}
-IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl(IDBDatabaseBackendImpl* database, int64_t id, const String& name, const String& keyPath, bool autoIncrement)
+IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl(IDBSQLiteDatabase* database, int64_t id, const String& name, const String& keyPath, bool autoIncrement)
: m_database(database)
, m_id(id)
, m_name(name)
@@ -62,7 +63,7 @@ IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl(IDBDatabaseBackendImpl* dat
loadIndexes();
}
-IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl(IDBDatabaseBackendImpl* database, const String& name, const String& keyPath, bool autoIncrement)
+IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl(IDBSQLiteDatabase* database, const String& name, const String& keyPath, bool autoIncrement)
: m_database(database)
, m_id(InvalidId)
, m_name(name)
@@ -301,7 +302,7 @@ PassRefPtr<IDBIndexBackendInterface> IDBObjectStoreBackendImpl::createIndex(cons
return 0;
}
- RefPtr<IDBIndexBackendImpl> index = IDBIndexBackendImpl::create(this, name, keyPath, unique);
+ RefPtr<IDBIndexBackendImpl> index = IDBIndexBackendImpl::create(m_database.get(), name, m_name, keyPath, unique);
ASSERT(index->name() == name);
RefPtr<IDBObjectStoreBackendImpl> objectStore = this;
@@ -427,7 +428,7 @@ void IDBObjectStoreBackendImpl::openCursorInternal(ScriptExecutionContext*, Pass
return;
}
- RefPtr<IDBCursorBackendInterface> cursor = IDBCursorBackendImpl::create(objectStore, range, direction, query.release(), transaction.get());
+ RefPtr<IDBCursorBackendInterface> cursor = IDBCursorBackendImpl::create(objectStore->m_database.get(), range, direction, query.release(), true, transaction.get());
callbacks->onSuccess(cursor.release());
}
@@ -445,13 +446,13 @@ void IDBObjectStoreBackendImpl::loadIndexes()
String keyPath = indexQuery.getColumnText(2);
bool unique = !!indexQuery.getColumnInt(3);
- m_indexes.set(name, IDBIndexBackendImpl::create(this, id, name, keyPath, unique));
+ m_indexes.set(name, IDBIndexBackendImpl::create(m_database.get(), id, name, m_name, keyPath, unique));
}
}
SQLiteDatabase& IDBObjectStoreBackendImpl::sqliteDatabase() const
{
- return m_database->sqliteDatabase();
+ return m_database->db();
}
void IDBObjectStoreBackendImpl::removeIndexFromMap(ScriptExecutionContext*, PassRefPtr<IDBObjectStoreBackendImpl> objectStore, PassRefPtr<IDBIndexBackendImpl> index)
diff --git a/WebCore/storage/IDBObjectStoreBackendImpl.h b/WebCore/storage/IDBObjectStoreBackendImpl.h
index 60e011f..add849b 100644
--- a/WebCore/storage/IDBObjectStoreBackendImpl.h
+++ b/WebCore/storage/IDBObjectStoreBackendImpl.h
@@ -36,17 +36,18 @@ namespace WebCore {
class IDBDatabaseBackendImpl;
class IDBIndexBackendImpl;
+class IDBSQLiteDatabase;
class IDBTransactionBackendInterface;
class SQLiteDatabase;
class ScriptExecutionContext;
class IDBObjectStoreBackendImpl : public IDBObjectStoreBackendInterface {
public:
- static PassRefPtr<IDBObjectStoreBackendImpl> create(IDBDatabaseBackendImpl* database, int64_t id, const String& name, const String& keyPath, bool autoIncrement)
+ static PassRefPtr<IDBObjectStoreBackendImpl> create(IDBSQLiteDatabase* database, int64_t id, const String& name, const String& keyPath, bool autoIncrement)
{
return adoptRef(new IDBObjectStoreBackendImpl(database, id, name, keyPath, autoIncrement));
}
- static PassRefPtr<IDBObjectStoreBackendImpl> create(IDBDatabaseBackendImpl* database, const String& name, const String& keyPath, bool autoIncrement)
+ static PassRefPtr<IDBObjectStoreBackendImpl> create(IDBSQLiteDatabase* database, const String& name, const String& keyPath, bool autoIncrement)
{
return adoptRef(new IDBObjectStoreBackendImpl(database, name, keyPath, autoIncrement));
}
@@ -75,11 +76,9 @@ public:
virtual void openCursor(PassRefPtr<IDBKeyRange> range, unsigned short direction, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&);
- IDBDatabaseBackendImpl* database() const { return m_database.get(); }
-
private:
- IDBObjectStoreBackendImpl(IDBDatabaseBackendImpl*, int64_t id, const String& name, const String& keyPath, bool autoIncrement);
- IDBObjectStoreBackendImpl(IDBDatabaseBackendImpl*, const String& name, const String& keyPath, bool autoIncrement);
+ IDBObjectStoreBackendImpl(IDBSQLiteDatabase*, int64_t id, const String& name, const String& keyPath, bool autoIncrement);
+ IDBObjectStoreBackendImpl(IDBSQLiteDatabase*, const String& name, const String& keyPath, bool autoIncrement);
void loadIndexes();
SQLiteDatabase& sqliteDatabase() const;
@@ -95,7 +94,7 @@ private:
static void removeIndexFromMap(ScriptExecutionContext*, PassRefPtr<IDBObjectStoreBackendImpl>, PassRefPtr<IDBIndexBackendImpl>);
static void addIndexToMap(ScriptExecutionContext*, PassRefPtr<IDBObjectStoreBackendImpl>, PassRefPtr<IDBIndexBackendImpl>);
- RefPtr<IDBDatabaseBackendImpl> m_database;
+ RefPtr<IDBSQLiteDatabase> m_database;
int64_t m_id;
String m_name;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list