Enable Vector bounds checking for ElementDescendantIterator.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Jan 2015 04:33:38 +0000 (04:33 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Jan 2015 04:33:38 +0000 (04:33 +0000)
<https://webkit.org/b/140346>

Reviewed by Sam Weinig.

I had originally disabled Vector bounds checking for
ElementDescendantIterator's internal ancestor stack, but upon
re-running performance benchmarks, it appears to have little-to-no
measurable benefit.

This change adds back the bounds checking.

* dom/ElementDescendantIterator.h:

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

Source/WebCore/ChangeLog
Source/WebCore/dom/ElementDescendantIterator.h

index 4109a99..18cae71 100644 (file)
@@ -1,3 +1,19 @@
+2015-01-11  Andreas Kling  <akling@apple.com>
+
+        Enable Vector bounds checking for ElementDescendantIterator.
+        <https://webkit.org/b/140346>
+
+        Reviewed by Sam Weinig.
+
+        I had originally disabled Vector bounds checking for
+        ElementDescendantIterator's internal ancestor stack, but upon
+        re-running performance benchmarks, it appears to have little-to-no
+        measurable benefit.
+
+        This change adds back the bounds checking.
+
+        * dom/ElementDescendantIterator.h:
+
 2015-01-11  Chris Dumez  <cdumez@apple.com>
 
         Drop legacy SVGCSSStyleSelector.cpp
index bd703ca..758e427 100644 (file)
@@ -49,7 +49,7 @@ public:
 
 private:
     Element* m_current;
-    Vector<Element*, 16, UnsafeVectorOverflow> m_ancestorSiblingStack;
+    Vector<Element*, 16> m_ancestorSiblingStack;
 
 #if !ASSERT_DISABLED
     ElementIteratorAssertions m_assertions;