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

Unified Diff: Source/modules/indexeddb/IDBCursor.cpp

Issue 1166553004: IndexedDB: Replace 0 with nullptr where appropriate (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: MOAR Created 5 years, 7 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/indexeddb/DOMWindowIndexedDatabase.cpp ('k') | Source/modules/indexeddb/IDBDatabase.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/indexeddb/IDBCursor.cpp
diff --git a/Source/modules/indexeddb/IDBCursor.cpp b/Source/modules/indexeddb/IDBCursor.cpp
index 2e2654fc19f0abf6ee4ec6616eb408ed939e885d..d26a7e11e2487b8f2f4ac399bed18a23735e29d1 100644
--- a/Source/modules/indexeddb/IDBCursor.cpp
+++ b/Source/modules/indexeddb/IDBCursor.cpp
@@ -89,27 +89,27 @@ IDBRequest* IDBCursor::update(ScriptState* scriptState, const ScriptValue& value
if (!m_gotValue) {
exceptionState.throwDOMException(InvalidStateError, IDBDatabase::noValueErrorMessage);
- return 0;
+ return nullptr;
}
if (isKeyCursor()) {
exceptionState.throwDOMException(InvalidStateError, IDBDatabase::isKeyCursorErrorMessage);
- return 0;
+ return nullptr;
}
if (isDeleted()) {
exceptionState.throwDOMException(InvalidStateError, IDBDatabase::sourceDeletedErrorMessage);
- return 0;
+ return nullptr;
}
if (m_transaction->isFinished() || m_transaction->isFinishing()) {
exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase::transactionFinishedErrorMessage);
- return 0;
+ return nullptr;
}
if (!m_transaction->isActive()) {
exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase::transactionInactiveErrorMessage);
- return 0;
+ return nullptr;
}
if (m_transaction->isReadOnly()) {
exceptionState.throwDOMException(ReadOnlyError, "The record may not be updated inside a read-only transaction.");
- return 0;
+ return nullptr;
}
IDBObjectStore* objectStore = effectiveObjectStore();
@@ -156,7 +156,7 @@ void IDBCursor::continueFunction(ScriptState* scriptState, const ScriptValue& ke
exceptionState.throwDOMException(DataError, IDBDatabase::notValidKeyErrorMessage);
return;
}
- continueFunction(key, 0, exceptionState);
+ continueFunction(key, nullptr, exceptionState);
}
void IDBCursor::continuePrimaryKey(ScriptState* scriptState, const ScriptValue& keyValue, const ScriptValue& primaryKeyValue, ExceptionState& exceptionState)
@@ -241,32 +241,32 @@ IDBRequest* IDBCursor::deleteFunction(ScriptState* scriptState, ExceptionState&
IDB_TRACE("IDBCursor::delete");
if (m_transaction->isFinished() || m_transaction->isFinishing()) {
exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase::transactionFinishedErrorMessage);
- return 0;
+ return nullptr;
}
if (!m_transaction->isActive()) {
exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase::transactionInactiveErrorMessage);
- return 0;
+ return nullptr;
}
if (m_transaction->isReadOnly()) {
exceptionState.throwDOMException(ReadOnlyError, "The record may not be deleted inside a read-only transaction.");
- return 0;
+ return nullptr;
}
if (!m_gotValue) {
exceptionState.throwDOMException(InvalidStateError, IDBDatabase::noValueErrorMessage);
- return 0;
+ return nullptr;
}
if (isKeyCursor()) {
exceptionState.throwDOMException(InvalidStateError, IDBDatabase::isKeyCursorErrorMessage);
- return 0;
+ return nullptr;
}
if (isDeleted()) {
exceptionState.throwDOMException(InvalidStateError, IDBDatabase::sourceDeletedErrorMessage);
- return 0;
+ return nullptr;
}
if (!m_transaction->backendDB()) {
exceptionState.throwDOMException(InvalidStateError, IDBDatabase::databaseClosedErrorMessage);
- return 0;
+ return nullptr;
}
IDBKeyRange* keyRange = IDBKeyRange::only(m_primaryKey, exceptionState);
« no previous file with comments | « Source/modules/indexeddb/DOMWindowIndexedDatabase.cpp ('k') | Source/modules/indexeddb/IDBDatabase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698