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

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

Issue 209433004: Do not zero-initialize RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix uses of RefPtrWillBeRawPtr Created 6 years, 9 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: Source/modules/webdatabase/DatabaseBackend.cpp
diff --git a/Source/modules/webdatabase/DatabaseBackend.cpp b/Source/modules/webdatabase/DatabaseBackend.cpp
index e587c829951fbebaeb9ac755dac12afebf0016d9..556aa5b594a2260591dab16b7082b2f2a54eaa89 100644
--- a/Source/modules/webdatabase/DatabaseBackend.cpp
+++ b/Source/modules/webdatabase/DatabaseBackend.cpp
@@ -91,7 +91,7 @@ void DatabaseBackend::close()
// Clean up transactions that have not been scheduled yet:
// Transaction phase 1 cleanup. See comment on "What happens if a
// transaction is interrupted?" at the top of SQLTransactionBackend.cpp.
- RefPtrWillBeRawPtr<SQLTransactionBackend> transaction;
+ RefPtrWillBeRawPtr<SQLTransactionBackend> transaction = nullptr;
while (!m_transactionQueue.isEmpty()) {
transaction = m_transactionQueue.takeFirst();
transaction->notifyDatabaseThreadIsShuttingDown();
@@ -134,7 +134,7 @@ void DatabaseBackend::inProgressTransactionCompleted()
void DatabaseBackend::scheduleTransaction()
{
ASSERT(!m_transactionInProgressMutex.tryLock()); // Locked by caller.
- RefPtrWillBeRawPtr<SQLTransactionBackend> transaction;
+ RefPtrWillBeRawPtr<SQLTransactionBackend> transaction = nullptr;
if (m_isTransactionQueueEnabled && !m_transactionQueue.isEmpty())
transaction = m_transactionQueue.takeFirst();

Powered by Google App Engine
This is Rietveld 408576698