Index: Source/modules/webdatabase/SQLStatementBackend.cpp |
diff --git a/Source/modules/webdatabase/SQLStatementBackend.cpp b/Source/modules/webdatabase/SQLStatementBackend.cpp |
index de8bd583d7398bbd07977e0433a3f00754dacac3..d79c6ee8fa4d6401333317e02d05d1c131fb94c1 100644 |
--- a/Source/modules/webdatabase/SQLStatementBackend.cpp |
+++ b/Source/modules/webdatabase/SQLStatementBackend.cpp |
@@ -100,9 +100,9 @@ AbstractSQLStatement* SQLStatementBackend::frontend() |
return m_frontend.get(); |
} |
-PassRefPtr<SQLError> SQLStatementBackend::sqlError() const |
+SQLErrorData* SQLStatementBackend::sqlError() const |
{ |
- return m_error; |
+ return m_error.get(); |
} |
SQLResultSet* SQLStatementBackend::sqlResultSet() const |
@@ -132,9 +132,9 @@ bool SQLStatementBackend::execute(DatabaseBackend* db) |
if (result != SQLResultOk) { |
WTF_LOG(StorageAPI, "Unable to verify correctness of statement %s - error %i (%s)", m_statement.ascii().data(), result, database->lastErrorMsg()); |
if (result == SQLResultInterrupt) |
- m_error = SQLError::create(SQLError::DATABASE_ERR, "could not prepare statement", result, "interrupted"); |
+ m_error = SQLErrorData::create(SQLError::DATABASE_ERR, "could not prepare statement", result, "interrupted"); |
else |
- m_error = SQLError::create(SQLError::SYNTAX_ERR, "could not prepare statement", result, database->lastErrorMsg()); |
+ m_error = SQLErrorData::create(SQLError::SYNTAX_ERR, "could not prepare statement", result, database->lastErrorMsg()); |
db->reportExecuteStatementResult(1, m_error->code(), result); |
return false; |
} |
@@ -143,7 +143,7 @@ bool SQLStatementBackend::execute(DatabaseBackend* db) |
// If this is the case, they might be trying to do something fishy or malicious |
if (statement.bindParameterCount() != m_arguments.size()) { |
WTF_LOG(StorageAPI, "Bind parameter count doesn't match number of question marks"); |
- m_error = SQLError::create(db->isInterrupted() ? SQLError::DATABASE_ERR : SQLError::SYNTAX_ERR, "number of '?'s in statement string does not match argument count"); |
+ m_error = SQLErrorData::create(db->isInterrupted() ? SQLError::DATABASE_ERR : SQLError::SYNTAX_ERR, "number of '?'s in statement string does not match argument count"); |
db->reportExecuteStatementResult(2, m_error->code(), 0); |
return false; |
} |
@@ -158,7 +158,7 @@ bool SQLStatementBackend::execute(DatabaseBackend* db) |
if (result != SQLResultOk) { |
WTF_LOG(StorageAPI, "Failed to bind value index %i to statement for query '%s'", i + 1, m_statement.ascii().data()); |
db->reportExecuteStatementResult(3, SQLError::DATABASE_ERR, result); |
- m_error = SQLError::create(SQLError::DATABASE_ERR, "could not bind value", result, database->lastErrorMsg()); |
+ m_error = SQLErrorData::create(SQLError::DATABASE_ERR, "could not bind value", result, database->lastErrorMsg()); |
return false; |
} |
} |
@@ -181,7 +181,7 @@ bool SQLStatementBackend::execute(DatabaseBackend* db) |
if (result != SQLResultDone) { |
db->reportExecuteStatementResult(4, SQLError::DATABASE_ERR, result); |
- m_error = SQLError::create(SQLError::DATABASE_ERR, "could not iterate results", result, database->lastErrorMsg()); |
+ m_error = SQLErrorData::create(SQLError::DATABASE_ERR, "could not iterate results", result, database->lastErrorMsg()); |
return false; |
} |
} else if (result == SQLResultDone) { |
@@ -194,11 +194,11 @@ bool SQLStatementBackend::execute(DatabaseBackend* db) |
return false; |
} else if (result == SQLResultConstraint) { |
db->reportExecuteStatementResult(6, SQLError::CONSTRAINT_ERR, result); |
- m_error = SQLError::create(SQLError::CONSTRAINT_ERR, "could not execute statement due to a constaint failure", result, database->lastErrorMsg()); |
+ m_error = SQLErrorData::create(SQLError::CONSTRAINT_ERR, "could not execute statement due to a constaint failure", result, database->lastErrorMsg()); |
return false; |
} else { |
db->reportExecuteStatementResult(5, SQLError::DATABASE_ERR, result); |
- m_error = SQLError::create(SQLError::DATABASE_ERR, "could not execute statement", result, database->lastErrorMsg()); |
+ m_error = SQLErrorData::create(SQLError::DATABASE_ERR, "could not execute statement", result, database->lastErrorMsg()); |
return false; |
} |
@@ -215,14 +215,14 @@ void SQLStatementBackend::setVersionMismatchedError(DatabaseBackend* database) |
{ |
ASSERT(!m_error && !m_resultSet->isValid()); |
database->reportExecuteStatementResult(7, SQLError::VERSION_ERR, 0); |
- m_error = SQLError::create(SQLError::VERSION_ERR, "current version of the database and `oldVersion` argument do not match"); |
+ m_error = SQLErrorData::create(SQLError::VERSION_ERR, "current version of the database and `oldVersion` argument do not match"); |
} |
void SQLStatementBackend::setFailureDueToQuota(DatabaseBackend* database) |
{ |
ASSERT(!m_error && !m_resultSet->isValid()); |
database->reportExecuteStatementResult(8, SQLError::QUOTA_ERR, 0); |
- m_error = SQLError::create(SQLError::QUOTA_ERR, "there was not enough remaining storage space, or the storage quota was reached and the user declined to allow more space"); |
+ m_error = SQLErrorData::create(SQLError::QUOTA_ERR, "there was not enough remaining storage space, or the storage quota was reached and the user declined to allow more space"); |
} |
void SQLStatementBackend::clearFailureDueToQuota() |