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

Unified Diff: Source/core/dom/NodeRareData.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/NameNodeList.cpp ('k') | Source/core/dom/TagCollection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/NodeRareData.h
diff --git a/Source/core/dom/NodeRareData.h b/Source/core/dom/NodeRareData.h
index 3572d141549c5367f7c0f0895db8ec6e5b22b927..bb1e55f563009da7b59a0cd4eff8a3422ccae689 100644
--- a/Source/core/dom/NodeRareData.h
+++ b/Source/core/dom/NodeRareData.h
@@ -201,7 +201,7 @@ private:
return std::pair<unsigned char, StringImpl*>(type, name.impl());
}
- bool deleteThisAndUpdateNodeRareDataIfAboutToRemoveLastList(Node*);
+ bool deleteThisAndUpdateNodeRareDataIfAboutToRemoveLastList(Node&);
// Can be a ChildNodeList or an EmptyNodeList.
NodeList* m_childNodeList;
@@ -268,13 +268,12 @@ private:
OwnPtr<NodeMutationObserverData> m_mutationObserverData;
};
-inline bool NodeListsNodeData::deleteThisAndUpdateNodeRareDataIfAboutToRemoveLastList(Node* ownerNode)
+inline bool NodeListsNodeData::deleteThisAndUpdateNodeRareDataIfAboutToRemoveLastList(Node& ownerNode)
{
- ASSERT(ownerNode);
- ASSERT(ownerNode->nodeLists() == this);
+ ASSERT(ownerNode.nodeLists() == this);
if ((m_childNodeList ? 1 : 0) + m_atomicNameCaches.size() + m_tagCollectionCacheNS.size() != 1)
return false;
- ownerNode->clearNodeLists();
+ ownerNode.clearNodeLists();
return true;
}
« no previous file with comments | « Source/core/dom/NameNodeList.cpp ('k') | Source/core/dom/TagCollection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698