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

Unified Diff: Source/modules/webdatabase/SQLTransactionStateMachine.h

Issue 397733004: Allow assertions to be enabled in Blink Release builds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years, 5 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/webdatabase/DatabaseThread.cpp ('k') | Source/modules/webdatabase/sqlite/SQLiteStatement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webdatabase/SQLTransactionStateMachine.h
diff --git a/Source/modules/webdatabase/SQLTransactionStateMachine.h b/Source/modules/webdatabase/SQLTransactionStateMachine.h
index d14238e18f3d54eead8b6196045c0b5b1e86fb26..249970e244ad752b4d368eff34af4d670309b61a 100644
--- a/Source/modules/webdatabase/SQLTransactionStateMachine.h
+++ b/Source/modules/webdatabase/SQLTransactionStateMachine.h
@@ -48,7 +48,7 @@ protected:
SQLTransactionState m_nextState;
SQLTransactionState m_requestedState;
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
// The state audit trail (i.e. bread crumbs) keeps track of up to the last
// s_sizeOfStateAuditTrail states that the state machine enters. The audit
// trail is updated before entering each state. This is for debugging use
@@ -67,11 +67,11 @@ template<typename T>
SQLTransactionStateMachine<T>::SQLTransactionStateMachine()
: m_nextState(SQLTransactionState::Idle)
, m_requestedState(SQLTransactionState::Idle)
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
, m_nextStateAuditEntry(0)
#endif
{
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
for (int i = 0; i < s_sizeOfStateAuditTrail; i++)
m_stateAuditTrail[i] = SQLTransactionState::NumberOfStates;
#endif
@@ -95,7 +95,7 @@ void SQLTransactionStateMachine<T>::runStateMachine()
StateFunction stateFunction = stateFunctionFor(m_nextState);
ASSERT(stateFunction);
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
m_stateAuditTrail[m_nextStateAuditEntry] = m_nextState;
m_nextStateAuditEntry = (m_nextStateAuditEntry + 1) % s_sizeOfStateAuditTrail;
#endif
« no previous file with comments | « Source/modules/webdatabase/DatabaseThread.cpp ('k') | Source/modules/webdatabase/sqlite/SQLiteStatement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698