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

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: Fixed config.gni. Minor cleanups. 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
Index: Source/core/editing/TextIterator.cpp
diff --git a/Source/core/editing/TextIterator.cpp b/Source/core/editing/TextIterator.cpp
index 0898f2bae71f4423ccfdf505046a2429e77cd8fb..9ab164b2fa8bb1a449b2c8a479e50312380bef79 100644
--- a/Source/core/editing/TextIterator.cpp
+++ b/Source/core/editing/TextIterator.cpp
@@ -158,7 +158,7 @@ unsigned BitStack::size() const
// --------
-#if ASSERT_ENABLED
+#if ENABLE(ASSERT)
static unsigned depthCrossingShadowBoundaries(Node* node)
{
@@ -1276,7 +1276,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
@@ -1750,7 +1750,7 @@ UChar WordAwareIterator::characterAt(unsigned index) const
static const size_t minimumSearchBufferSize = 8192;
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
static bool searcherInUse;
#endif
@@ -1774,7 +1774,7 @@ static UStringSearch* searcher()
static inline void lockSearcher()
{
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
ASSERT(!searcherInUse);
searcherInUse = true;
#endif
@@ -1782,7 +1782,7 @@ static inline void lockSearcher()
static inline void unlockSearcher()
{
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
ASSERT(searcherInUse);
searcherInUse = false;
#endif

Powered by Google App Engine
This is Rietveld 408576698