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

Unified Diff: Source/platform/graphics/GraphicsContext.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/platform/graphics/GraphicsContext.cpp
diff --git a/Source/platform/graphics/GraphicsContext.cpp b/Source/platform/graphics/GraphicsContext.cpp
index d9e0b831e230952e687e3fb150246833f868a342..0d60ab5ea5016517e80d54591797bf3c2151678e 100644
--- a/Source/platform/graphics/GraphicsContext.cpp
+++ b/Source/platform/graphics/GraphicsContext.cpp
@@ -117,7 +117,7 @@ GraphicsContext::GraphicsContext(SkCanvas* canvas, DisabledMode disableContextOr
, m_paintStateIndex(0)
, m_pendingCanvasSave(false)
, m_annotationMode(0)
-#if ASSERT_ENABLED
+#if ENABLE(ASSERT)
, m_annotationCount(0)
, m_layerCount(0)
, m_disableDestructionChecks(false)
@@ -143,7 +143,7 @@ GraphicsContext::GraphicsContext(SkCanvas* canvas, DisabledMode disableContextOr
GraphicsContext::~GraphicsContext()
{
-#if ASSERT_ENABLED
+#if ENABLE(ASSERT)
if (!m_disableDestructionChecks) {
ASSERT(!m_paintStateIndex);
ASSERT(!m_paintState->saveCount());
@@ -222,7 +222,7 @@ void GraphicsContext::beginAnnotation(const AnnotationList& annotations)
for (AnnotationList::const_iterator it = annotations.begin(); it != end; ++it)
canvas()->addComment(it->first, it->second.ascii().data());
-#if ASSERT_ENABLED
+#if ENABLE(ASSERT)
++m_annotationCount;
#endif
}
@@ -235,7 +235,7 @@ void GraphicsContext::endAnnotation()
ASSERT(m_annotationCount > 0);
canvas()->endCommentGroup();
-#if ASSERT_ENABLED
+#if ENABLE(ASSERT)
--m_annotationCount;
#endif
}
@@ -459,7 +459,7 @@ void GraphicsContext::beginLayer(float opacity, CompositeOperator op, const Floa
saveLayer(0, &layerPaint);
}
-#if ASSERT_ENABLED
+#if ENABLE(ASSERT)
++m_layerCount;
#endif
}
@@ -472,7 +472,7 @@ void GraphicsContext::endLayer()
restoreLayer();
ASSERT(m_layerCount > 0);
-#if ASSERT_ENABLED
+#if ENABLE(ASSERT)
--m_layerCount;
#endif
}

Powered by Google App Engine
This is Rietveld 408576698