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

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

Issue 54273007: Use more references in ContainerNode code (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix crashes Created 7 years, 1 month 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 | « no previous file | Source/core/dom/ContainerNode.cpp » ('j') | Source/core/dom/Node.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ContainerNode.h
diff --git a/Source/core/dom/ContainerNode.h b/Source/core/dom/ContainerNode.h
index 16d09422fd7a8b138f534050a1570ca351ef3ff1..e7d067c65a0c214418e89b3cc08ecc581b487653 100644
--- a/Source/core/dom/ContainerNode.h
+++ b/Source/core/dom/ContainerNode.h
@@ -106,8 +106,8 @@ public:
// However, arbitrary code may be run by beforeload handlers.
void parserAppendChild(PassRefPtr<Node>);
void parserRemoveChild(Node&);
- void parserInsertBefore(PassRefPtr<Node> newChild, Node* refChild);
- void parserTakeAllChildrenFrom(ContainerNode*);
+ void parserInsertBefore(PassRefPtr<Node> newChild, Node& refChild);
+ void parserTakeAllChildrenFrom(ContainerNode&);
void removeChildren();
@@ -235,10 +235,10 @@ inline Node* Node::highestAncestor() const
const int initialNodeVectorSize = 11;
typedef Vector<RefPtr<Node>, initialNodeVectorSize> NodeVector;
-inline void getChildNodes(Node* node, NodeVector& nodes)
+inline void getChildNodes(Node& node, NodeVector& nodes)
{
ASSERT(!nodes.size());
- for (Node* child = node->firstChild(); child; child = child->nextSibling())
+ for (Node* child = node.firstChild(); child; child = child->nextSibling())
nodes.append(child);
}
« no previous file with comments | « no previous file | Source/core/dom/ContainerNode.cpp » ('j') | Source/core/dom/Node.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698