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

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

Issue 53373002: Have NodeChildRemovalTracker constructor take a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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/ContainerNode.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/NodeChildRemovalTracker.h
diff --git a/Source/core/dom/NodeChildRemovalTracker.h b/Source/core/dom/NodeChildRemovalTracker.h
index b4faa116e4aaef4d336d7fccb72533f5ab1f7f1f..09fa82933ee6846acde6c5579190796fa368bcf6 100644
--- a/Source/core/dom/NodeChildRemovalTracker.h
+++ b/Source/core/dom/NodeChildRemovalTracker.h
@@ -33,21 +33,21 @@ namespace WebCore {
class NodeChildRemovalTracker {
public:
- explicit NodeChildRemovalTracker(Node*);
+ explicit NodeChildRemovalTracker(Node&);
~NodeChildRemovalTracker();
static bool isBeingRemoved(Node*);
private:
- Node* node() const { return m_node; }
+ Node& node() const { return m_node; }
NodeChildRemovalTracker* previous() { return m_previous; }
- Node* m_node;
+ Node& m_node;
NodeChildRemovalTracker* m_previous;
static NodeChildRemovalTracker* s_last;
};
-inline NodeChildRemovalTracker::NodeChildRemovalTracker(Node* node)
+inline NodeChildRemovalTracker::NodeChildRemovalTracker(Node& node)
: m_node(node)
, m_previous(s_last)
{
@@ -62,7 +62,7 @@ inline NodeChildRemovalTracker::~NodeChildRemovalTracker()
inline bool NodeChildRemovalTracker::isBeingRemoved(Node* node)
{
for (NodeChildRemovalTracker* removal = s_last; removal; removal = removal->previous()) {
- if (removal->node()->containsIncludingShadowDOM(node))
+ if (removal->node().containsIncludingShadowDOM(node))
return true;
}
« no previous file with comments | « Source/core/dom/ContainerNode.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698