Reduce ref churn in ChildNodesLazySnapshot iteration.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 9 Feb 2014 21:32:34 +0000 (21:32 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 9 Feb 2014 21:32:34 +0000 (21:32 +0000)
<https://webkit.org/b/128492>

Add a missing release() in ChildNodesLazySnapshot::nextNode()
so we don't have to churn the ref count.

Reviewed by Sam Weinig.

* dom/ContainerNode.h:
(WebCore::ChildNodesLazySnapshot::nextNode):

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

Source/WebCore/ChangeLog
Source/WebCore/dom/ContainerNode.h

index 4543d85dd2b5b4b6257ebecfc8106bc80c469493..d138c71c47989a9aec2adad867ac1f53d1cc9338 100644 (file)
@@ -1,3 +1,16 @@
+2014-02-09  Andreas Kling  <akling@apple.com>
+
+        Reduce ref churn in ChildNodesLazySnapshot iteration.
+        <https://webkit.org/b/128492>
+
+        Add a missing release() in ChildNodesLazySnapshot::nextNode()
+        so we don't have to churn the ref count.
+
+        Reviewed by Sam Weinig.
+
+        * dom/ContainerNode.h:
+        (WebCore::ChildNodesLazySnapshot::nextNode):
+
 2014-02-09  Andreas Kling  <akling@apple.com>
 
         Reduce ref churn in ChildInsertionNotifier.
index 163753026746f5dae02ecc4df1afcd6596839c9b..f6a3e2b4e9f160a07ca6f0808e29734c858bf091 100644 (file)
@@ -273,7 +273,7 @@ public:
     PassRefPtr<Node> nextNode()
     {
         if (LIKELY(!hasSnapshot())) {
-            RefPtr<Node> node = m_currentNode;
+            RefPtr<Node> node = m_currentNode.release();
             if (node)
                 m_currentNode = node->nextSibling();
             return node.release();