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

Unified Diff: Source/platform/heap/Visitor.h

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/heap/Visitor.h
diff --git a/Source/platform/heap/Visitor.h b/Source/platform/heap/Visitor.h
index ffadc80fe99aa42561c757d29f9432d498d39a52..b405d08c8ca4824d51c6826ae10d9621f7b3d882 100644
--- a/Source/platform/heap/Visitor.h
+++ b/Source/platform/heap/Visitor.h
@@ -51,7 +51,7 @@
#include "wtf/text/WTFString.h"
#endif
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
#define DEBUG_ONLY(x) x
#else
#define DEBUG_ONLY(x)
@@ -177,7 +177,7 @@ public:
DefaultTraceTrait<T>::mark(visitor, t);
}
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
static void checkGCInfo(Visitor* visitor, const T* t)
{
DefaultTraceTrait<T>::checkGCInfo(visitor, t);
@@ -217,7 +217,7 @@ public:
{
if (!t)
return;
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
TraceTrait<T>::checkGCInfo(this, t);
#endif
TraceTrait<T>::mark(this, t);
@@ -392,7 +392,7 @@ public:
}
virtual void registerWeakTable(const void*, EphemeronCallback, EphemeronCallback) = 0;
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
virtual bool weakTableRegistered(const void*) = 0;
#endif
@@ -413,7 +413,7 @@ public:
return isAlive(ptr.get());
}
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
void checkGCInfo(const void*, const GCInfo*);
#endif
@@ -581,7 +581,7 @@ public:
visitor->mark(const_cast<T*>(t), &TraceTrait<T>::trace);
}
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
static void checkGCInfo(Visitor* visitor, const T* t)
{
visitor->checkGCInfo(const_cast<T*>(t), GCInfoTrait<T>::get());
@@ -598,7 +598,7 @@ public:
self->adjustAndMark(visitor);
}
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
static void checkGCInfo(Visitor*, const T*) { }
#endif
};

Powered by Google App Engine
This is Rietveld 408576698