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

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

Issue 180143003: Have LiveNodeListBase::ownerNode() return a reference (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/ClassCollection.cpp ('k') | Source/core/dom/EmptyNodeList.cpp » ('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 06f895fac86e0471a8aa0f83a1590c90d28ce8af..f2760f1052bdfd74940c1badcd9399ff1f87fdff 100644
--- a/Source/core/dom/EmptyNodeList.h
+++ b/Source/core/dom/EmptyNodeList.h
@@ -40,11 +40,12 @@ class EmptyNodeList FINAL : public NodeList {
public:
static PassRefPtr<EmptyNodeList> create(Node* rootNode)
{
+ ASSERT(rootNode);
return adoptRef(new EmptyNodeList(rootNode));
}
virtual ~EmptyNodeList();
- Node* ownerNode() const { return m_owner.get(); }
+ Node& ownerNode() const { return *m_owner; }
private:
explicit EmptyNodeList(Node* rootNode) : m_owner(rootNode) { }
« no previous file with comments | « Source/core/dom/ClassCollection.cpp ('k') | Source/core/dom/EmptyNodeList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698