Fix release builds with security assertion after r190007.
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Sep 2015 01:27:54 +0000 (01:27 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Sep 2015 01:27:54 +0000 (01:27 +0000)
* dom/DocumentOrderedMap.cpp:
* dom/DocumentOrderedMap.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@190097 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/dom/DocumentOrderedMap.cpp
Source/WebCore/dom/DocumentOrderedMap.h

index 0d96ab7..69e217d 100644 (file)
@@ -1,3 +1,10 @@
+2015-09-21  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Fix release builds with security assertion after r190007.
+
+        * dom/DocumentOrderedMap.cpp:
+        * dom/DocumentOrderedMap.h:
+
 2015-09-21  Gwang Yoon Hwang  <yoon@igalia.com>
 
         [Threaded Compositor] Modified to use reference of GraphicsContext instead of pointer
index 6ceb576..3e34b4e 100644 (file)
@@ -57,7 +57,7 @@ void DocumentOrderedMap::add(const AtomicStringImpl& key, Element& element, cons
     Map::AddResult addResult = m_map.add(&key, MapEntry(&element));
     MapEntry& entry = addResult.iterator->value;
 
-#ifndef NDEBUG
+#if !ASSERT_DISABLED || ENABLE(SECURITY_ASSERTIONS)
     ASSERT_WITH_SECURITY_IMPLICATION(!entry.registeredElements.contains(&element));
     entry.registeredElements.add(&element);
 #endif
index 5a70f22..c39d06f 100644 (file)
@@ -85,7 +85,7 @@ private:
         Element* element;
         unsigned count;
         Vector<Element*> orderedList;
-#ifndef NDEBUG
+#if !ASSERT_DISABLED || ENABLE(SECURITY_ASSERTIONS)
         HashSet<Element*> registeredElements;
 #endif
     };