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

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

Issue 26852004: Have NodeRareData's ensureNodeLists() / ensureMutationObserverData() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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/Node.cpp ('k') | Source/core/html/LabelableElement.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 120a15b6a02d422d7fbce41fcf833e9e2cf789eb..8d310c37033087e112a5adbef70253d456dfe6c6 100644
--- a/Source/core/dom/NodeRareData.h
+++ b/Source/core/dom/NodeRareData.h
@@ -249,19 +249,19 @@ public:
void clearNodeLists() { m_nodeLists.clear(); }
NodeListsNodeData* nodeLists() const { return m_nodeLists.get(); }
- NodeListsNodeData* ensureNodeLists()
+ NodeListsNodeData& ensureNodeLists()
{
if (!m_nodeLists)
m_nodeLists = NodeListsNodeData::create();
- return m_nodeLists.get();
+ return *m_nodeLists;
}
NodeMutationObserverData* mutationObserverData() { return m_mutationObserverData.get(); }
- NodeMutationObserverData* ensureMutationObserverData()
+ NodeMutationObserverData& ensureMutationObserverData()
{
if (!m_mutationObserverData)
m_mutationObserverData = NodeMutationObserverData::create();
- return m_mutationObserverData.get();
+ return *m_mutationObserverData;
}
unsigned connectedSubframeCount() const { return m_connectedFrameCount; }
« no previous file with comments | « Source/core/dom/Node.cpp ('k') | Source/core/html/LabelableElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698