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

Unified Diff: Source/core/editing/TextIterator.cpp

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/core/editing/EditCommand.h ('k') | Source/core/editing/VisiblePosition.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/TextIterator.cpp
diff --git a/Source/core/editing/TextIterator.cpp b/Source/core/editing/TextIterator.cpp
index 94267b6d72ac27fcc1a1e57bd541faa5dd40027e..5276370daaa1e6714608e797aa9bb02047ec257f 100644
--- a/Source/core/editing/TextIterator.cpp
+++ b/Source/core/editing/TextIterator.cpp
@@ -1282,7 +1282,7 @@ SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator(const Range* r,
m_endNode = endNode;
m_endOffset = endOffset;
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
// Need this just because of the assert.
m_positionNode = endNode;
#endif
@@ -1756,7 +1756,7 @@ UChar WordAwareIterator::characterAt(unsigned index) const
static const size_t minimumSearchBufferSize = 8192;
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
static bool searcherInUse;
#endif
@@ -1780,7 +1780,7 @@ static UStringSearch* searcher()
static inline void lockSearcher()
{
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
ASSERT(!searcherInUse);
searcherInUse = true;
#endif
@@ -1788,7 +1788,7 @@ static inline void lockSearcher()
static inline void unlockSearcher()
{
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
ASSERT(searcherInUse);
searcherInUse = false;
#endif
« no previous file with comments | « Source/core/editing/EditCommand.h ('k') | Source/core/editing/VisiblePosition.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698