Remove AbstractSQLTransactionBackend
https://bugs.webkit.org/show_bug.cgi?id=140227
Reviewed by Darin Adler.
* Modules/webdatabase/AbstractSQLTransaction.h:
* Modules/webdatabase/AbstractSQLTransactionBackend.h: Removed.
* Modules/webdatabase/SQLStatementBackend.cpp:
* Modules/webdatabase/SQLTransaction.cpp:
(WebCore::SQLTransaction::setBackend):
* Modules/webdatabase/SQLTransaction.h:
* Modules/webdatabase/SQLTransactionBackend.h:
* WebCore.xcodeproj/project.pbxproj:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@178129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/Modules/webdatabase/SQLTransactionBackend.h b/Source/WebCore/Modules/webdatabase/SQLTransactionBackend.h
index fee2a7a..82419f6 100644
--- a/Source/WebCore/Modules/webdatabase/SQLTransactionBackend.h
+++ b/Source/WebCore/Modules/webdatabase/SQLTransactionBackend.h
@@ -30,12 +30,12 @@
#if ENABLE(SQL_DATABASE)
-#include "AbstractSQLTransactionBackend.h"
#include "DatabaseBasicTypes.h"
#include "SQLTransactionStateMachine.h"
#include <memory>
#include <wtf/Deque.h>
#include <wtf/Forward.h>
+#include <wtf/ThreadingPrimitives.h>
#include <wtf/text/WTFString.h>
namespace WebCore {
@@ -45,6 +45,7 @@
class OriginLock;
class SQLError;
class SQLiteTransaction;
+class SQLStatement;
class SQLStatementBackend;
class SQLTransactionBackend;
class SQLValue;
@@ -58,7 +59,7 @@
virtual void handleCommitFailedAfterPostflight(SQLTransactionBackend*) = 0;
};
-class SQLTransactionBackend : public SQLTransactionStateMachine<SQLTransactionBackend>, public AbstractSQLTransactionBackend {
+class SQLTransactionBackend : public ThreadSafeRefCounted<SQLTransactionBackend>, public SQLTransactionStateMachine<SQLTransactionBackend> {
public:
static PassRefPtr<SQLTransactionBackend> create(DatabaseBackend*,
PassRefPtr<AbstractSQLTransaction>, PassRefPtr<SQLTransactionWrapper>, bool readOnly);
@@ -76,18 +77,17 @@
bool isReadOnly() { return m_readOnly; }
void notifyDatabaseThreadIsShuttingDown();
+ // APIs called from the frontend published via SQLTransactionBackend:
+ void requestTransitToState(SQLTransactionState);
+ PassRefPtr<SQLError> transactionError();
+ SQLStatement* currentStatement();
+ void setShouldRetryCurrentStatement(bool);
+ void executeSQL(std::unique_ptr<SQLStatement>, const String& statement, const Vector<SQLValue>& arguments, int permissions);
+
private:
SQLTransactionBackend(DatabaseBackend*, PassRefPtr<AbstractSQLTransaction>,
PassRefPtr<SQLTransactionWrapper>, bool readOnly);
- // APIs called from the frontend published via AbstractSQLTransactionBackend:
- virtual void requestTransitToState(SQLTransactionState) override;
- virtual PassRefPtr<SQLError> transactionError() override;
- virtual SQLStatement* currentStatement() override;
- virtual void setShouldRetryCurrentStatement(bool) override;
- virtual void executeSQL(std::unique_ptr<SQLStatement>, const String& statement,
- const Vector<SQLValue>& arguments, int permissions) override;
-
void doCleanup();
void enqueueStatementBackend(PassRefPtr<SQLStatementBackend>);