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

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

Issue 2245103004: Use DCHECK_IS_ON consistently in DatabaseTask. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « third_party/WebKit/Source/modules/webdatabase/DatabaseTask.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/webdatabase/DatabaseTask.cpp
diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseTask.cpp b/third_party/WebKit/Source/modules/webdatabase/DatabaseTask.cpp
index 553fc52367add832ee23038a9d0d06f2a6246172..a0b9fba853dc304bfceaa9ba84bb887f70a66955 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DatabaseTask.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseTask.cpp
@@ -38,7 +38,7 @@ namespace blink {
DatabaseTask::DatabaseTask(Database* database, TaskSynchronizer* synchronizer)
: m_database(database)
, m_synchronizer(synchronizer)
-#if !LOG_DISABLED
+#if DCHECK_IS_ON()
, m_complete(false)
#endif
{
@@ -46,7 +46,7 @@ DatabaseTask::DatabaseTask(Database* database, TaskSynchronizer* synchronizer)
DatabaseTask::~DatabaseTask()
{
-#if !LOG_DISABLED
+#if DCHECK_IS_ON()
ASSERT(m_complete || !m_synchronizer);
#endif
}
@@ -54,13 +54,13 @@ DatabaseTask::~DatabaseTask()
void DatabaseTask::run()
{
// Database tasks are meant to be used only once, so make sure this one hasn't been performed before.
-#if !LOG_DISABLED
+#if DCHECK_IS_ON()
ASSERT(!m_complete);
#endif
if (!m_synchronizer && !m_database->getDatabaseContext()->databaseThread()->isDatabaseOpen(m_database.get())) {
taskCancelled();
-#if !LOG_DISABLED
+#if DCHECK_IS_ON()
m_complete = true;
#endif
return;
@@ -74,7 +74,7 @@ void DatabaseTask::run()
if (m_synchronizer)
m_synchronizer->taskCompleted();
-#if !LOG_DISABLED
+#if DCHECK_IS_ON()
m_complete = true;
#endif
}
« no previous file with comments | « third_party/WebKit/Source/modules/webdatabase/DatabaseTask.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698