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

Unified Diff: Source/core/dom/Node.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/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index fb5eadd99b448911fc563fc7c7ea9f5d7452607a..3b0871b38dd3e7f2440f54852f029a2021801feb 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -998,7 +998,7 @@ void Node::attach(const AttachContext&)
cache->updateCacheAfterNodeIsAttached(this);
}
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
static Node* detachingNode;
bool Node::inDetach() const
@@ -1012,7 +1012,7 @@ void Node::detach(const AttachContext& context)
ASSERT(document().lifecycle().stateAllowsDetach());
DocumentLifecycle::DetachScope willDetach(document().lifecycle());
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
ASSERT(!detachingNode);
detachingNode = this;
#endif
@@ -1042,7 +1042,7 @@ void Node::detach(const AttachContext& context)
clearChildNeedsStyleInvalidation();
clearNeedsStyleInvalidation();
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
detachingNode = 0;
#endif
}
@@ -2370,16 +2370,16 @@ inline void TreeScope::removedLastRefToScope()
// extra self-only ref.
guardRef();
dispose();
-#if ASSERT_ENABLED
+#if ENABLE(ASSERT)
// We need to do this right now since guardDeref() can delete this.
rootNode().m_inRemovedLastRefFunction = false;
#endif
guardDeref();
} else {
-#if ASSERT_ENABLED
+#if ENABLE(ASSERT)
rootNode().m_inRemovedLastRefFunction = false;
#endif
-#if SECURITY_ASSERT_ENABLED
+#if ENABLE(SECURITY_ASSERT)
beginDeletion();
#endif
delete this;
@@ -2398,7 +2398,7 @@ void Node::removedLastRef()
return;
}
-#if SECURITY_ASSERT_ENABLED
+#if ENABLE(SECURITY_ASSERT)
m_deletionHasBegun = true;
#endif
delete this;

Powered by Google App Engine
This is Rietveld 408576698