Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(714)

Unified Diff: Source/core/dom/ContainerNode.cpp

Issue 49613005: Have TreeScrope::adoptIfNeeded() take a reference instead of a pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/Attr.cpp ('k') | Source/core/dom/ContainerNodeAlgorithms.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ContainerNode.cpp
diff --git a/Source/core/dom/ContainerNode.cpp b/Source/core/dom/ContainerNode.cpp
index 145bcf55199cec0e7ada11ad1a65d3eab55c10af..797d326bbd1f5c88d70bbfe9033e401866876409 100644
--- a/Source/core/dom/ContainerNode.cpp
+++ b/Source/core/dom/ContainerNode.cpp
@@ -89,7 +89,7 @@ void ContainerNode::parserTakeAllChildrenFrom(ContainerNode* oldParent)
{
while (RefPtr<Node> child = oldParent->firstChild()) {
oldParent->parserRemoveChild(*child);
- treeScope().adoptIfNeeded(child.get());
+ treeScope().adoptIfNeeded(*child);
parserAppendChild(child.get());
}
}
@@ -248,7 +248,7 @@ void ContainerNode::insertBefore(PassRefPtr<Node> newChild, Node* refChild, Exce
if (child.parentNode())
break;
- treeScope().adoptIfNeeded(&child);
+ treeScope().adoptIfNeeded(child);
insertBeforeCommon(*next, child);
@@ -376,7 +376,7 @@ void ContainerNode::replaceChild(PassRefPtr<Node> newChild, Node* oldChild, Exce
if (child.parentNode())
break;
- treeScope().adoptIfNeeded(&child);
+ treeScope().adoptIfNeeded(child);
// Add child before "next".
{
@@ -497,7 +497,7 @@ void ContainerNode::removeBetween(Node* previousChild, Node* nextChild, Node& ol
oldChild.setNextSibling(0);
oldChild.setParentOrShadowHostNode(0);
- document().adoptIfNeeded(&oldChild);
+ document().adoptIfNeeded(oldChild);
}
void ContainerNode::parserRemoveChild(Node& oldChild)
@@ -612,7 +612,7 @@ void ContainerNode::appendChild(PassRefPtr<Node> newChild, ExceptionState& es)
if (child.parentNode())
break;
- treeScope().adoptIfNeeded(&child);
+ treeScope().adoptIfNeeded(child);
// Append child to the end of the list
{
@@ -641,7 +641,7 @@ void ContainerNode::parserAppendChild(PassRefPtr<Node> newChild)
NoEventDispatchAssertion assertNoEventDispatch;
// FIXME: This method should take a PassRefPtr.
appendChildToContainer(*newChild, *this);
- treeScope().adoptIfNeeded(newChild.get());
+ treeScope().adoptIfNeeded(*newChild);
}
newChild->updateAncestorConnectedSubframeCountForInsertion();
« no previous file with comments | « Source/core/dom/Attr.cpp ('k') | Source/core/dom/ContainerNodeAlgorithms.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698