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

Unified Diff: Source/core/dom/TreeShared.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/core/dom/TreeShared.h
diff --git a/Source/core/dom/TreeShared.h b/Source/core/dom/TreeShared.h
index fd1bbca24632c31cc7e13685acdc5f0efcc87b72..009a946d6087ea3c560acfcce9993526b2595bab 100644
--- a/Source/core/dom/TreeShared.h
+++ b/Source/core/dom/TreeShared.h
@@ -28,7 +28,7 @@
namespace WebCore {
-#if SECURITY_ASSERT_ENABLED
+#if ENABLE(SECURITY_ASSERT)
template<typename NodeType> class TreeShared;
template<typename NodeType> void adopted(TreeShared<NodeType>*);
#endif
@@ -38,9 +38,9 @@ template<typename NodeType> class TreeShared : public NoBaseWillBeGarbageCollect
protected:
TreeShared()
: m_refCount(1)
-#if SECURITY_ASSERT_ENABLED
+#if ENABLE(SECURITY_ASSERT)
, m_deletionHasBegun(false)
-#if ASSERT_ENABLED
+#if ENABLE(ASSERT)
, m_inRemovedLastRefFunction(false)
, m_adoptionIsRequired(true)
#endif
@@ -76,7 +76,7 @@ public:
ASSERT(!m_adoptionIsRequired);
NodeType* thisNode = static_cast<NodeType*>(this);
if (!--m_refCount && !thisNode->hasTreeSharedParent()) {
-#if ASSERT_ENABLED
+#if ENABLE(ASSERT)
m_inRemovedLastRefFunction = true;
#endif
thisNode->removedLastRef();
@@ -88,10 +88,10 @@ public:
private:
int m_refCount;
-#if SECURITY_ASSERT_ENABLED
+#if ENABLE(SECURITY_ASSERT)
public:
bool m_deletionHasBegun;
-#if ASSERT_ENABLED
+#if ENABLE(ASSERT)
bool m_inRemovedLastRefFunction;
private:
@@ -101,14 +101,14 @@ private:
#endif
};
-#if SECURITY_ASSERT_ENABLED
+#if ENABLE(SECURITY_ASSERT)
template<typename NodeType> void adopted(TreeShared<NodeType>* object)
{
if (!object)
return;
ASSERT_WITH_SECURITY_IMPLICATION(!object->m_deletionHasBegun);
-#if ASSERT_ENABLED
+#if ENABLE(ASSERT)
ASSERT(!object->m_inRemovedLastRefFunction);
object->m_adoptionIsRequired = false;
#endif

Powered by Google App Engine
This is Rietveld 408576698