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

Unified Diff: Source/core/events/EventListenerMap.cpp

Issue 397733004: Allow assertions to be enabled in Blink Release builds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. 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
« no previous file with comments | « Source/core/events/EventListenerMap.h ('k') | Source/core/events/EventPath.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/EventListenerMap.cpp
diff --git a/Source/core/events/EventListenerMap.cpp b/Source/core/events/EventListenerMap.cpp
index 901f06314acff1a6e15d17a66244d96a73f0b3df..437fbb9e42d696b3d963ab9c32de1b966856a574 100644
--- a/Source/core/events/EventListenerMap.cpp
+++ b/Source/core/events/EventListenerMap.cpp
@@ -37,7 +37,7 @@
#include "wtf/StdLibExtras.h"
#include "wtf/Vector.h"
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
#include "wtf/ThreadingPrimitives.h"
#endif
@@ -45,7 +45,7 @@ using namespace WTF;
namespace WebCore {
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
static Mutex& activeIteratorCountMutex()
{
DEFINE_STATIC_LOCAL(Mutex, mutex, ());
@@ -60,7 +60,7 @@ void EventListenerMap::assertNoActiveIterators()
#endif
EventListenerMap::EventListenerMap()
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
: m_activeIteratorCount(0)
#endif
{
@@ -236,7 +236,7 @@ EventListenerIterator::EventListenerIterator(EventTarget* target)
m_map = &data->eventListenerMap;
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
{
MutexLocker locker(activeIteratorCountMutex());
m_map->m_activeIteratorCount++;
@@ -244,7 +244,7 @@ EventListenerIterator::EventListenerIterator(EventTarget* target)
#endif
}
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
EventListenerIterator::~EventListenerIterator()
{
if (m_map) {
« no previous file with comments | « Source/core/events/EventListenerMap.h ('k') | Source/core/events/EventPath.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698