diff options
-rw-r--r-- | Source/WebCore/loader/icon/IconDatabase.cpp | 2 | ||||
-rw-r--r-- | Source/WebCore/storage/AbstractDatabase.h | 4 | ||||
-rw-r--r-- | Source/WebCore/storage/DatabaseTask.cpp | 8 |
3 files changed, 9 insertions, 5 deletions
diff --git a/Source/WebCore/loader/icon/IconDatabase.cpp b/Source/WebCore/loader/icon/IconDatabase.cpp index 428ae16..2bb22ec 100644 --- a/Source/WebCore/loader/icon/IconDatabase.cpp +++ b/Source/WebCore/loader/icon/IconDatabase.cpp @@ -73,7 +73,7 @@ static const int updateTimerDelay = 5; static bool checkIntegrityOnOpen = false; -#if !LOG_DISABLED +#if !LOG_DISABLED || !ERROR_DISABLED static String urlForLogging(const String& url) { static unsigned urlTruncationLength = 120; diff --git a/Source/WebCore/storage/AbstractDatabase.h b/Source/WebCore/storage/AbstractDatabase.h index d62481b..e0a277f 100644 --- a/Source/WebCore/storage/AbstractDatabase.h +++ b/Source/WebCore/storage/AbstractDatabase.h @@ -36,7 +36,7 @@ #include "SQLiteDatabase.h" #include <wtf/Forward.h> #include <wtf/ThreadSafeRefCounted.h> -#if !LOG_DISABLED +#if !LOG_DISABLED || !ERROR_DISABLED #include "SecurityOrigin.h" #endif @@ -109,7 +109,7 @@ protected: unsigned long m_estimatedSize; String m_filename; -#if !LOG_DISABLED +#if !LOG_DISABLED || !ERROR_DISABLED String databaseDebugName() const { return m_contextThreadSecurityOrigin->toString() + "::" + m_name; } #endif diff --git a/Source/WebCore/storage/DatabaseTask.cpp b/Source/WebCore/storage/DatabaseTask.cpp index dce791c..ad744e5 100644 --- a/Source/WebCore/storage/DatabaseTask.cpp +++ b/Source/WebCore/storage/DatabaseTask.cpp @@ -62,7 +62,7 @@ void DatabaseTaskSynchronizer::taskCompleted() DatabaseTask::DatabaseTask(Database* database, DatabaseTaskSynchronizer* synchronizer) : m_database(database) , m_synchronizer(synchronizer) -#ifndef NDEBUG +#if !LOG_DISABLED , m_complete(false) #endif { @@ -70,13 +70,17 @@ DatabaseTask::DatabaseTask(Database* database, DatabaseTaskSynchronizer* synchro DatabaseTask::~DatabaseTask() { +#if !LOG_DISABLED ASSERT(m_complete || !m_synchronizer); +#endif } void DatabaseTask::performTask() { // Database tasks are meant to be used only once, so make sure this one hasn't been performed before. +#if !LOG_DISABLED ASSERT(!m_complete); +#endif LOG(StorageAPI, "Performing %s %p\n", debugTaskName(), this); @@ -86,7 +90,7 @@ void DatabaseTask::performTask() if (m_synchronizer) m_synchronizer->taskCompleted(); -#ifndef NDEBUG +#if !LOG_DISABLED m_complete = true; #endif } |