Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(892)

Unified Diff: third_party/WebKit/Source/modules/webdatabase/SQLStatementBackend.cpp

Issue 2229213002: Web SQL: Replace WTF_LOG() with STORAGE_DVLOG() or SQL_DVLOG(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Using LAZY_STREAM Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webdatabase/SQLStatementBackend.cpp
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLStatementBackend.cpp b/third_party/WebKit/Source/modules/webdatabase/SQLStatementBackend.cpp
index 84eb962fe1d927da12e6302c919bf6abaa1853f0..66cb18eb5a0e0dd2b0efad56f735537c28be1309 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLStatementBackend.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLStatementBackend.cpp
@@ -31,9 +31,9 @@
#include "modules/webdatabase/Database.h"
#include "modules/webdatabase/SQLError.h"
#include "modules/webdatabase/SQLStatement.h"
+#include "modules/webdatabase/StorageLog.h"
#include "modules/webdatabase/sqlite/SQLiteDatabase.h"
#include "modules/webdatabase/sqlite/SQLiteStatement.h"
-#include "platform/Logging.h"
#include "wtf/text/CString.h"
@@ -133,7 +133,7 @@ bool SQLStatementBackend::execute(Database* db)
int result = statement.prepare();
if (result != SQLResultOk) {
- WTF_LOG(StorageAPI, "Unable to verify correctness of statement %s - error %i (%s)", m_statement.ascii().data(), result, database->lastErrorMsg());
+ STORAGE_DVLOG(1) << "Unable to verify correctness of statement " << m_statement << " - error " << result << " (" << database->lastErrorMsg() << ")";
if (result == SQLResultInterrupt)
m_error = SQLErrorData::create(SQLError::kDatabaseErr, "could not prepare statement", result, "interrupted");
else
@@ -145,7 +145,7 @@ bool SQLStatementBackend::execute(Database* db)
// FIXME: If the statement uses the ?### syntax supported by sqlite, the bind parameter count is very likely off from the number of question marks.
// 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");
+ STORAGE_DVLOG(1) << "Bind parameter count doesn't match number of question marks";
m_error = SQLErrorData::create(SQLError::kSyntaxErr, "number of '?'s in statement string does not match argument count");
db->reportExecuteStatementResult(2, m_error->code(), 0);
return false;
@@ -159,7 +159,7 @@ bool SQLStatementBackend::execute(Database* db)
}
if (result != SQLResultOk) {
- WTF_LOG(StorageAPI, "Failed to bind value index %i to statement for query '%s'", i + 1, m_statement.ascii().data());
+ STORAGE_DVLOG(1) << "Failed to bind value index " << (i + 1) << " to statement for query " << m_statement;
db->reportExecuteStatementResult(3, SQLError::kDatabaseErr, result);
m_error = SQLErrorData::create(SQLError::kDatabaseErr, "could not bind value", result, database->lastErrorMsg());
return false;

Powered by Google App Engine
This is Rietveld 408576698