| Index: Source/modules/webdatabase/SQLTransaction.cpp
|
| diff --git a/Source/modules/webdatabase/SQLTransaction.cpp b/Source/modules/webdatabase/SQLTransaction.cpp
|
| index 31a6605d36e5dd9e5d4f14ee97032f92a789056c..ee060529c00bb9bec3045aef869d1154ed5c5e1a 100644
|
| --- a/Source/modules/webdatabase/SQLTransaction.cpp
|
| +++ b/Source/modules/webdatabase/SQLTransaction.cpp
|
| @@ -269,7 +269,7 @@ void SQLTransaction::performPendingCallback()
|
| runStateMachine();
|
| }
|
|
|
| -void SQLTransaction::executeSQL(const String& sqlStatement, const Vector<SQLValue>& arguments, SQLStatementCallback* callback, SQLStatementErrorCallback* callbackError, ExceptionState& exceptionState)
|
| +void SQLTransaction::executeSql(const String& sqlStatement, const Vector<ScriptValue>& arguments, SQLStatementCallback* callback, SQLStatementErrorCallback* callbackError, ExceptionState& exceptionState)
|
| {
|
| if (!m_executeSqlAllowed) {
|
| exceptionState.throwDOMException(InvalidStateError, "SQL execution is disallowed.");
|
| @@ -287,8 +287,26 @@ void SQLTransaction::executeSQL(const String& sqlStatement, const Vector<SQLValu
|
| else if (m_readOnly)
|
| permissions |= DatabaseAuthorizer::ReadOnlyMask;
|
|
|
| + Vector<SQLValue> sqlArguments;
|
| + for (unsigned i = 0; i < arguments.size(); ++i) {
|
| + v8::Local<v8::Value> arg = arguments[i].v8Value();
|
| + if (arg.IsEmpty() || arg->IsNull()) {
|
| + sqlArguments.append(SQLValue());
|
| + } else if (arg->IsNumber()) {
|
| + sqlArguments.append(SQLValue(arg->NumberValue()));
|
| + } else {
|
| + String stringValue;
|
| + arguments[i].toString(stringValue);
|
| + sqlArguments.append(SQLValue(stringValue));
|
| + }
|
| + }
|
| SQLStatement* statement = SQLStatement::create(m_database.get(), callback, callbackError);
|
| - m_backend->executeSQL(statement, sqlStatement, arguments, permissions);
|
| + m_backend->executeSQL(statement, sqlStatement, sqlArguments, permissions);
|
| +}
|
| +
|
| +void SQLTransaction::executeSql(const String& sqlStatement, ExceptionState& exceptionState)
|
| +{
|
| + executeSql(sqlStatement, Vector<ScriptValue>(), nullptr, nullptr, exceptionState);
|
| }
|
|
|
| bool SQLTransaction::computeNextStateAndCleanupIfNeeded()
|
|
|