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

Unified Diff: Source/core/dom/Node.cpp

Issue 262093006: Oilpan: Make the Node hierarchy RefCountedGarbageCollected instead of TreeShared. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Another build fix. Created 6 years, 7 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
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index 0798dda6c5b079fdd35680c844fb3a3dd533d867..842b160729c370a2f0f5deef97474bab4ab56312 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -274,14 +274,12 @@ Node::~Node()
#if !ENABLE(OILPAN)
if (!isContainerNode())
willBeDeletedFromDocument();
-#endif
if (m_previous)
m_previous->setNextSibling(0);
if (m_next)
m_next->setPreviousSibling(0);
-#if !ENABLE(OILPAN)
if (m_treeScope)
m_treeScope->guardDeref();
#endif
@@ -2375,13 +2373,8 @@ bool Node::willRespondToTouchEvents()
return hasEventListeners(EventTypeNames::touchstart) || hasEventListeners(EventTypeNames::touchmove) || hasEventListeners(EventTypeNames::touchcancel) || hasEventListeners(EventTypeNames::touchend);
}
+#if !ENABLE(OILPAN)
// This is here for inlining
-#if ENABLE(OILPAN)
-inline void TreeScope::removedLastRefToScope()
-{
- dispose();
haraken 2014/05/06 15:59:42 I agree that we're going toward a right direction,
Mads Ager (chromium) 2014/05/07 12:13:16 Yes, I completely agree and I did think about that
-}
-#else
inline void TreeScope::removedLastRefToScope()
{
ASSERT_WITH_SECURITY_IMPLICATION(!deletionHasBegun());
@@ -2407,7 +2400,6 @@ inline void TreeScope::removedLastRefToScope()
delete this;
}
}
-#endif
// It's important not to inline removedLastRef, because we don't want to inline the code to
// delete a Node at each deref call site.
@@ -2421,13 +2413,12 @@ void Node::removedLastRef()
return;
}
-#if !ENABLE(OILPAN)
#if SECURITY_ASSERT_ENABLED
m_deletionHasBegun = true;
#endif
delete this;
-#endif
}
+#endif
unsigned Node::connectedSubframeCount() const
{
@@ -2571,6 +2562,9 @@ void Node::setCustomElementState(CustomElementState newState)
void Node::trace(Visitor* visitor)
{
+ visitor->trace(m_parentOrShadowHostNode);
+ visitor->trace(m_previous);
+ visitor->trace(m_next);
visitor->trace(m_treeScope);
}

Powered by Google App Engine
This is Rietveld 408576698