diff options
Diffstat (limited to 'Source/WebCore/storage/SQLStatement.h')
-rw-r--r-- | Source/WebCore/storage/SQLStatement.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Source/WebCore/storage/SQLStatement.h b/Source/WebCore/storage/SQLStatement.h index afd605a..1d81eb2 100644 --- a/Source/WebCore/storage/SQLStatement.h +++ b/Source/WebCore/storage/SQLStatement.h @@ -31,6 +31,7 @@ #if ENABLE(DATABASE) #include "PlatformString.h" +#include "SQLCallbackWrapper.h" #include "SQLResultSet.h" #include "SQLValue.h" #include <wtf/Forward.h> @@ -44,15 +45,15 @@ class SQLStatementCallback; class SQLStatementErrorCallback; class SQLTransaction; -class SQLStatement : public ThreadSafeShared<SQLStatement> { +class SQLStatement : public ThreadSafeRefCounted<SQLStatement> { public: - static PassRefPtr<SQLStatement> create(const String&, const Vector<SQLValue>&, PassRefPtr<SQLStatementCallback>, PassRefPtr<SQLStatementErrorCallback>, int permissions); + static PassRefPtr<SQLStatement> create(Database*, const String&, const Vector<SQLValue>&, PassRefPtr<SQLStatementCallback>, PassRefPtr<SQLStatementErrorCallback>, int permissions); bool execute(Database*); bool lastExecutionFailedDueToQuota() const; - bool hasStatementCallback() const { return m_statementCallback; } - bool hasStatementErrorCallback() const { return m_statementErrorCallback; } + bool hasStatementCallback() const { return m_statementCallbackWrapper.hasCallback(); } + bool hasStatementErrorCallback() const { return m_statementErrorCallbackWrapper.hasCallback(); } void setDatabaseDeletedError(); void setVersionMismatchedError(); @@ -61,15 +62,15 @@ public: SQLError* sqlError() const { return m_error.get(); } private: - SQLStatement(const String& statement, const Vector<SQLValue>& arguments, PassRefPtr<SQLStatementCallback>, PassRefPtr<SQLStatementErrorCallback>, int permissions); + SQLStatement(Database*, const String& statement, const Vector<SQLValue>& arguments, PassRefPtr<SQLStatementCallback>, PassRefPtr<SQLStatementErrorCallback>, int permissions); void setFailureDueToQuota(); void clearFailureDueToQuota(); String m_statement; Vector<SQLValue> m_arguments; - RefPtr<SQLStatementCallback> m_statementCallback; - RefPtr<SQLStatementErrorCallback> m_statementErrorCallback; + SQLCallbackWrapper<SQLStatementCallback> m_statementCallbackWrapper; + SQLCallbackWrapper<SQLStatementErrorCallback> m_statementErrorCallbackWrapper; RefPtr<SQLError> m_error; RefPtr<SQLResultSet> m_resultSet; |