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

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

Issue 176933013: Pass rootNode by reference when constructing node lists / collections (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 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/Element.cpp ('k') | Source/core/dom/LiveNodeList.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/EmptyNodeList.h
diff --git a/Source/core/dom/EmptyNodeList.h b/Source/core/dom/EmptyNodeList.h
index 16552647ea7a56d8191354e54bcaeed1985681db..fd7c5a60b6c6cd217ebe88662cf78a4ef6d56e60 100644
--- a/Source/core/dom/EmptyNodeList.h
+++ b/Source/core/dom/EmptyNodeList.h
@@ -39,9 +39,8 @@ namespace WebCore {
class EmptyNodeList FINAL : public NodeList {
public:
- static PassRefPtr<EmptyNodeList> create(Node* rootNode)
+ static PassRefPtr<EmptyNodeList> create(Node& rootNode)
{
- ASSERT(rootNode);
return adoptRef(new EmptyNodeList(rootNode));
}
virtual ~EmptyNodeList();
@@ -49,7 +48,7 @@ public:
Node& ownerNode() const { return *m_owner; }
private:
- explicit EmptyNodeList(Node* rootNode) : m_owner(rootNode) { }
+ explicit EmptyNodeList(Node& rootNode) : m_owner(rootNode) { }
virtual unsigned length() const OVERRIDE { return 0; }
virtual Node* item(unsigned) const OVERRIDE { return 0; }
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | Source/core/dom/LiveNodeList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698