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

Unified Diff: Source/modules/webdatabase/SQLStatementSync.cpp

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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
« no previous file with comments | « Source/modules/webdatabase/SQLStatementBackend.cpp ('k') | Source/modules/webdatabase/SQLTransaction.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webdatabase/SQLStatementSync.cpp
diff --git a/Source/modules/webdatabase/SQLStatementSync.cpp b/Source/modules/webdatabase/SQLStatementSync.cpp
index d5db05281ed7ee331316ebcfbbdc56b6e7b3bb29..17f1b700fa519b275f9c29055f78a4fb6318b75e 100644
--- a/Source/modules/webdatabase/SQLStatementSync.cpp
+++ b/Source/modules/webdatabase/SQLStatementSync.cpp
@@ -64,7 +64,7 @@ PassRefPtr<SQLResultSet> SQLStatementSync::execute(DatabaseSync* db, ExceptionSt
else
exceptionState.throwDOMException(SyntaxError, "Could not prepare statement.");
db->setLastErrorMessage("could not prepare statement", result, database->lastErrorMsg());
- return 0;
+ return nullptr;
}
if (statement.bindParameterCount() != m_arguments.size()) {
@@ -73,7 +73,7 @@ PassRefPtr<SQLResultSet> SQLStatementSync::execute(DatabaseSync* db, ExceptionSt
else
exceptionState.throwDOMException(SyntaxError, "Number of '?'s in statement string (" + String::number(statement.bindParameterCount()) + ") does not match the arguments provided (" + String::number(m_arguments.size()) + ").");
db->setLastErrorMessage("number of '?'s in statement string does not match argument count");
- return 0;
+ return nullptr;
}
for (unsigned i = 0; i < m_arguments.size(); ++i) {
@@ -81,13 +81,13 @@ PassRefPtr<SQLResultSet> SQLStatementSync::execute(DatabaseSync* db, ExceptionSt
if (result == SQLResultFull) {
exceptionState.throwDOMException(QuotaExceededError, SQLError::quotaExceededErrorMessage);
db->setLastErrorMessage("there was not enough remaining storage space");
- return 0;
+ return nullptr;
}
if (result != SQLResultOk) {
exceptionState.throwDOMException(SQLDatabaseError, "Could not bind value.");
db->setLastErrorMessage("could not bind value", result, database->lastErrorMsg());
- return 0;
+ return nullptr;
}
}
@@ -112,7 +112,7 @@ PassRefPtr<SQLResultSet> SQLStatementSync::execute(DatabaseSync* db, ExceptionSt
if (result != SQLResultDone) {
exceptionState.throwDOMException(SQLDatabaseError, "Could not iterate results.");
db->setLastErrorMessage("could not iterate results", result, database->lastErrorMsg());
- return 0;
+ return nullptr;
}
} else if (result == SQLResultDone) {
// Didn't find anything, or was an insert.
@@ -122,15 +122,15 @@ PassRefPtr<SQLResultSet> SQLStatementSync::execute(DatabaseSync* db, ExceptionSt
// Quota error, the delegate will be asked for more space and this statement might be re-run.
exceptionState.throwDOMException(QuotaExceededError, SQLError::quotaExceededErrorMessage);
db->setLastErrorMessage("there was not enough remaining storage space");
- return 0;
+ return nullptr;
} else if (result == SQLResultConstraint) {
exceptionState.throwDOMException(ConstraintError, "A constraint was violated.");
db->setLastErrorMessage("statement failed due to a constraint failure");
- return 0;
+ return nullptr;
} else {
exceptionState.throwDOMException(SQLDatabaseError, "Could not execute statement.");
db->setLastErrorMessage("could not execute statement", result, database->lastErrorMsg());
- return 0;
+ return nullptr;
}
resultSet->setRowsAffected(database->lastChanges());
« no previous file with comments | « Source/modules/webdatabase/SQLStatementBackend.cpp ('k') | Source/modules/webdatabase/SQLTransaction.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698