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

All callers of notifyNodeInsertedIntoDocument() already hold a strong
reference on the Node, so there's no need to ref it again inside.

Reviewed by Anders Carlsson.

* dom/ContainerNodeAlgorithms.h:
(WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument):

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

Source/WebCore/ChangeLog
Source/WebCore/dom/ContainerNodeAlgorithms.h

index 979d03362da1978370e0da7b02a45bb44f8a091f..4543d85dd2b5b4b6257ebecfc8106bc80c469493 100644 (file)
@@ -1,3 +1,16 @@
+2014-02-09  Andreas Kling  <akling@apple.com>
+
+        Reduce ref churn in ChildInsertionNotifier.
+        <https://webkit.org/b/128494>
+
+        All callers of notifyNodeInsertedIntoDocument() already hold a strong
+        reference on the Node, so there's no need to ref it again inside.
+
+        Reviewed by Anders Carlsson.
+
+        * dom/ContainerNodeAlgorithms.h:
+        (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument):
+
 2014-02-09  Zan Dobersek  <zdobersek@igalia.com>
 
         Manage ShadowData through std::unique_ptr
index cea04980a7c3a6debaeb03aaa6f2b9689a3f4455..b4299b01a91fe13f053cfdf4c8ee068edb4388d3 100644 (file)
@@ -197,7 +197,6 @@ namespace Private {
 inline void ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument(Node& node)
 {
     ASSERT(m_insertionPoint.inDocument());
-    Ref<Node> protect(node);
     if (Node::InsertionShouldCallDidNotifySubtreeInsertions == node.insertedInto(m_insertionPoint))
         m_postInsertionNotificationTargets.append(node);
     if (node.isContainerNode())