Index: Source/core/dom/ContainerNode.cpp |
diff --git a/Source/core/dom/ContainerNode.cpp b/Source/core/dom/ContainerNode.cpp |
index c7b3f026638e3416f0c4566c7d9d5fe9a4ba12ab..68f8f110313c672c6a6106f51801f27176e9add4 100644 |
--- a/Source/core/dom/ContainerNode.cpp |
+++ b/Source/core/dom/ContainerNode.cpp |
@@ -339,7 +339,7 @@ void ContainerNode::parserInsertBefore(PassRefPtr<Node> newChild, Node* nextChil |
ChildListMutationScope(this).childAdded(newChild.get()); |
- childrenChanged(true, newChild->previousSibling(), nextChild, 1); |
+ childrenChanged(true, adoptRawResult(newChild->previousSibling()), adoptRawResult(nextChild), 1); |
ChildNodeInsertionNotifier(selfHandle()).notify(newChild.get()); |
} |
@@ -514,7 +514,7 @@ bool ContainerNode::removeChild(Node* oldChild, ExceptionCode& ec) |
Node* prev = child->previousSibling(); |
Node* next = child->nextSibling(); |
removeBetween(prev, next, child.get()); |
- childrenChanged(false, prev, next, -1); |
+ childrenChanged(false, adoptRawResult(prev), adoptRawResult(next), -1); |
ChildNodeRemovalNotifier(selfHandle()).notify(child.get()); |
} |
dispatchSubtreeModifiedEvent(); |
@@ -567,7 +567,7 @@ void ContainerNode::parserRemoveChild(Node* oldChild) |
removeBetween(prev, next, oldChild); |
- childrenChanged(true, prev, next, -1); |
+ childrenChanged(true, adoptRawResult(prev), adoptRawResult(next), -1); |
ChildNodeRemovalNotifier(selfHandle()).notify(oldChild); |
} |
@@ -605,7 +605,7 @@ void ContainerNode::removeChildren() |
} |
} |
- childrenChanged(false, 0, 0, -static_cast<int>(removedChildren.size())); |
+ childrenChanged(false, nullptr, nullptr, -static_cast<int>(removedChildren.size())); |
for (size_t i = 0; i < removedChildren.size(); ++i) { |
HandleScope scope; |
@@ -699,7 +699,7 @@ void ContainerNode::parserAppendChild(PassRefPtr<Node> newChild) |
ChildListMutationScope(this).childAdded(newChild.get()); |
- childrenChanged(true, last, 0, 1); |
+ childrenChanged(true, adoptRawResult(last), nullptr, 1); |
ChildNodeInsertionNotifier(selfHandle()).notify(newChild.get()); |
} |
@@ -789,7 +789,7 @@ void ContainerNode::detach() |
Node::detach(); |
} |
-void ContainerNode::childrenChanged(bool changedByParser, Node*, Node*, int childCountDelta) |
+void ContainerNode::childrenChanged(bool changedByParser, const Handle<Node>&, const Handle<Node>&, int childCountDelta) |
{ |
document()->incDOMTreeVersion(); |
if (!changedByParser && childCountDelta) |
@@ -933,7 +933,7 @@ static void updateTreeAfterInsertion(const Handle<ContainerNode>& parent, Node* |
ChildListMutationScope(parent.raw()).childAdded(child); |
- parent->childrenChanged(false, child->previousSibling(), child->nextSibling(), 1); |
+ parent->childrenChanged(false, adoptRawResult(child->previousSibling()), adoptRawResult(child->nextSibling()), 1); |
ChildNodeInsertionNotifier(parent).notify(child); |