Diff
Modified: trunk/Source/WebCore/ChangeLog (89707 => 89708)
--- trunk/Source/WebCore/ChangeLog 2011-06-24 22:05:16 UTC (rev 89707)
+++ trunk/Source/WebCore/ChangeLog 2011-06-24 22:07:10 UTC (rev 89708)
@@ -1,3 +1,27 @@
+2011-06-24 Lukasz Slachciak <[email protected]>
+
+ Reviewed by Darin Adler.
+
+ Change NDEBUG to !LOG_DISABLED macro in databases for logging.
+ https://bugs.webkit.org/show_bug.cgi?id=63346
+
+ Changed NDEBUG to !LOG_DISABLED in databases code which involves logging.
+ This change resolves also build break in Release build when logging enabled.
+
+ No new tests because there is no new behavior or feature exposed.
+
+ * loader/icon/IconDatabase.cpp: Macro fixes.
+ (WebCore::IconDatabase::iconDatabaseSyncThread):
+ (WebCore::IconDatabase::syncThreadMainLoop):
+ (WebCore::IconDatabase::readFromDatabase):
+ (WebCore::IconDatabase::writeToDatabase):
+ (WebCore::IconDatabase::cleanupSyncThread):
+ * storage/AbstractDatabase.h: Macro fixes.
+ * storage/DatabaseTask.cpp: Macro fixes.
+ * storage/DatabaseTask.h: Macro fixes.
+ * storage/SQLTransaction.cpp: Macro fixes.
+ * storage/SQLTransaction.h: Macro fixes.
+
2011-06-24 Tony Chang <[email protected]>
Reviewed by Adam Barth.
Modified: trunk/Source/WebCore/loader/icon/IconDatabase.cpp (89707 => 89708)
--- trunk/Source/WebCore/loader/icon/IconDatabase.cpp 2011-06-24 22:05:16 UTC (rev 89707)
+++ trunk/Source/WebCore/loader/icon/IconDatabase.cpp 2011-06-24 22:07:10 UTC (rev 89708)
@@ -72,7 +72,7 @@
static bool checkIntegrityOnOpen = false;
-#ifndef NDEBUG
+#if !LOG_DISABLED
static String urlForLogging(const String& url)
{
static unsigned urlTruncationLength = 120;
@@ -968,7 +968,7 @@
LOG(IconDatabase, "(THREAD) IconDatabase sync thread started");
-#ifndef NDEBUG
+#if !LOG_DISABLED
double startTime = currentTime();
#endif
@@ -994,7 +994,7 @@
if (shouldStopThreadActivity())
return syncThreadMainLoop();
-#ifndef NDEBUG
+#if !LOG_DISABLED
double timeStamp = currentTime();
LOG(IconDatabase, "(THREAD) Open took %.4f seconds", timeStamp - startTime);
#endif
@@ -1003,7 +1003,7 @@
if (shouldStopThreadActivity())
return syncThreadMainLoop();
-#ifndef NDEBUG
+#if !LOG_DISABLED
double newStamp = currentTime();
LOG(IconDatabase, "(THREAD) performOpenInitialization() took %.4f seconds, now %.4f seconds from thread start", newStamp - timeStamp, newStamp - startTime);
timeStamp = newStamp;
@@ -1026,7 +1026,7 @@
if (shouldStopThreadActivity())
return syncThreadMainLoop();
-#ifndef NDEBUG
+#if !LOG_DISABLED
newStamp = currentTime();
LOG(IconDatabase, "(THREAD) performImport() took %.4f seconds, now %.4f seconds from thread start", newStamp - timeStamp, newStamp - startTime);
timeStamp = newStamp;
@@ -1043,7 +1043,7 @@
if (shouldStopThreadActivity())
return syncThreadMainLoop();
-#ifndef NDEBUG
+#if !LOG_DISABLED
newStamp = currentTime();
LOG(IconDatabase, "(THREAD) performURLImport() took %.4f seconds. Entering main loop %.4f seconds from thread start", newStamp - timeStamp, newStamp - startTime);
#endif
@@ -1359,7 +1359,7 @@
while (!m_threadTerminationRequested) {
m_syncLock.unlock();
-#ifndef NDEBUG
+#if !LOG_DISABLED
double timeStamp = currentTime();
#endif
LOG(IconDatabase, "(THREAD) Main work loop starting");
@@ -1392,7 +1392,7 @@
// has asked to delay pruning
static bool prunedUnretainedIcons = false;
if (didWrite && !m_privateBrowsingEnabled && !prunedUnretainedIcons && !databaseCleanupCounter) {
-#ifndef NDEBUG
+#if !LOG_DISABLED
double time = currentTime();
#endif
LOG(IconDatabase, "(THREAD) Starting pruneUnretainedIcons()");
@@ -1411,7 +1411,7 @@
break;
}
-#ifndef NDEBUG
+#if !LOG_DISABLED
double newstamp = currentTime();
LOG(IconDatabase, "(THREAD) Main work loop ran for %.4f seconds, %s requested to terminate", newstamp - timeStamp, shouldStopThreadActivity() ? "was" : "was not");
#endif
@@ -1459,7 +1459,7 @@
{
ASSERT_ICON_SYNC_THREAD();
-#ifndef NDEBUG
+#if !LOG_DISABLED
double timeStamp = currentTime();
#endif
@@ -1568,7 +1568,7 @@
{
ASSERT_ICON_SYNC_THREAD();
-#ifndef NDEBUG
+#if !LOG_DISABLED
double timeStamp = currentTime();
#endif
@@ -1773,7 +1773,7 @@
{
ASSERT_ICON_SYNC_THREAD();
-#ifndef NDEBUG
+#if !LOG_DISABLED
double timeStamp = currentTime();
#endif
@@ -1793,7 +1793,7 @@
deleteAllPreparedStatements();
m_syncDB.close();
-#ifndef NDEBUG
+#if !LOG_DISABLED
LOG(IconDatabase, "(THREAD) Final closure took %.4f seconds", currentTime() - timeStamp);
#endif
Modified: trunk/Source/WebCore/storage/AbstractDatabase.h (89707 => 89708)
--- trunk/Source/WebCore/storage/AbstractDatabase.h 2011-06-24 22:05:16 UTC (rev 89707)
+++ trunk/Source/WebCore/storage/AbstractDatabase.h 2011-06-24 22:07:10 UTC (rev 89708)
@@ -36,7 +36,7 @@
#include "SQLiteDatabase.h"
#include <wtf/Forward.h>
#include <wtf/ThreadSafeRefCounted.h>
-#ifndef NDEBUG
+#if !LOG_DISABLED
#include "SecurityOrigin.h"
#endif
@@ -109,7 +109,7 @@
unsigned long m_estimatedSize;
String m_filename;
-#ifndef NDEBUG
+#if !LOG_DISABLED
String databaseDebugName() const { return m_contextThreadSecurityOrigin->toString() + "::" + m_name; }
#endif
Modified: trunk/Source/WebCore/storage/DatabaseTask.cpp (89707 => 89708)
--- trunk/Source/WebCore/storage/DatabaseTask.cpp 2011-06-24 22:05:16 UTC (rev 89707)
+++ trunk/Source/WebCore/storage/DatabaseTask.cpp 2011-06-24 22:07:10 UTC (rev 89708)
@@ -108,7 +108,7 @@
m_success = database()->performOpenAndVerify(m_setVersionInNewDatabase, m_code);
}
-#ifndef NDEBUG
+#if !LOG_DISABLED
const char* Database::DatabaseOpenTask::debugTaskName() const
{
return "DatabaseOpenTask";
@@ -128,7 +128,7 @@
database()->close();
}
-#ifndef NDEBUG
+#if !LOG_DISABLED
const char* Database::DatabaseCloseTask::debugTaskName() const
{
return "DatabaseCloseTask";
@@ -150,7 +150,7 @@
m_transaction->database()->inProgressTransactionCompleted();
}
-#ifndef NDEBUG
+#if !LOG_DISABLED
const char* Database::DatabaseTransactionTask::debugTaskName() const
{
return "DatabaseTransactionTask";
@@ -172,7 +172,7 @@
m_tableNames = database()->performGetTableNames();
}
-#ifndef NDEBUG
+#if !LOG_DISABLED
const char* Database::DatabaseTableNamesTask::debugTaskName() const
{
return "DatabaseTableNamesTask";
Modified: trunk/Source/WebCore/storage/DatabaseTask.h (89707 => 89708)
--- trunk/Source/WebCore/storage/DatabaseTask.h 2011-06-24 22:05:16 UTC (rev 89707)
+++ trunk/Source/WebCore/storage/DatabaseTask.h 2011-06-24 22:07:10 UTC (rev 89708)
@@ -90,7 +90,7 @@
Database* m_database;
DatabaseTaskSynchronizer* m_synchronizer;
-#ifndef NDEBUG
+#if !LOG_DISABLED
virtual const char* debugTaskName() const = 0;
bool m_complete;
#endif
@@ -107,7 +107,7 @@
DatabaseOpenTask(Database*, bool setVersionInNewDatabase, DatabaseTaskSynchronizer*, ExceptionCode&, bool& success);
virtual void doPerformTask();
-#ifndef NDEBUG
+#if !LOG_DISABLED
virtual const char* debugTaskName() const;
#endif
@@ -127,7 +127,7 @@
DatabaseCloseTask(Database*, DatabaseTaskSynchronizer*);
virtual void doPerformTask();
-#ifndef NDEBUG
+#if !LOG_DISABLED
virtual const char* debugTaskName() const;
#endif
};
@@ -146,7 +146,7 @@
DatabaseTransactionTask(PassRefPtr<SQLTransaction>);
virtual void doPerformTask();
-#ifndef NDEBUG
+#if !LOG_DISABLED
virtual const char* debugTaskName() const;
#endif
@@ -164,7 +164,7 @@
DatabaseTableNamesTask(Database*, DatabaseTaskSynchronizer*, Vector<String>& names);
virtual void doPerformTask();
-#ifndef NDEBUG
+#if !LOG_DISABLED
virtual const char* debugTaskName() const;
#endif
Modified: trunk/Source/WebCore/storage/SQLTransaction.cpp (89707 => 89708)
--- trunk/Source/WebCore/storage/SQLTransaction.cpp 2011-06-24 22:05:16 UTC (rev 89707)
+++ trunk/Source/WebCore/storage/SQLTransaction.cpp 2011-06-24 22:07:10 UTC (rev 89708)
@@ -117,7 +117,7 @@
m_statementQueue.append(statement);
}
-#ifndef NDEBUG
+#if !LOG_DISABLED
const char* SQLTransaction::debugStepName(SQLTransaction::TransactionStepMethod step)
{
if (step == &SQLTransaction::acquireLock)
Modified: trunk/Source/WebCore/storage/SQLTransaction.h (89707 => 89708)
--- trunk/Source/WebCore/storage/SQLTransaction.h 2011-06-24 22:05:16 UTC (rev 89707)
+++ trunk/Source/WebCore/storage/SQLTransaction.h 2011-06-24 22:07:10 UTC (rev 89708)
@@ -105,7 +105,7 @@
void deliverTransactionErrorCallback();
void cleanupAfterTransactionErrorCallback();
-#ifndef NDEBUG
+#if !LOG_DISABLED
static const char* debugStepName(TransactionStepMethod);
#endif