Chromium Code Reviews| Index: Source/core/dom/TreeScope.cpp |
| diff --git a/Source/core/dom/TreeScope.cpp b/Source/core/dom/TreeScope.cpp |
| index f77d2fc50efc2ce5104b3acb611c25d02086e1ee..352ee94f9d370aef3a4bcb0e31d22324d9eadf13 100644 |
| --- a/Source/core/dom/TreeScope.cpp |
| +++ b/Source/core/dom/TreeScope.cpp |
| @@ -87,10 +87,8 @@ TreeScope::~TreeScope() |
| { |
| #if !ENABLE(OILPAN) |
| ASSERT(!m_guardRefCount); |
| -#endif |
| m_rootNode.setTreeScope(0); |
|
haraken
2014/05/06 04:20:16
You can remove this code because the root Node is
Mads Ager (chromium)
2014/05/06 08:26:00
Yes, it would. m_rootNode is a reference at this p
|
| -#if !ENABLE(OILPAN) |
| if (m_selection) { |
| m_selection->clearTreeScope(); |
| m_selection = nullptr; |
| @@ -338,7 +336,9 @@ void TreeScope::adoptIfNeeded(Node& node) |
| { |
| ASSERT(this); |
| ASSERT(!node.isDocumentNode()); |
| +#if !ENABLE(OILPAN) |
| ASSERT_WITH_SECURITY_IMPLICATION(!node.m_deletionHasBegun); |
| +#endif |
| TreeScopeAdopter adopter(node, *this); |
| if (adopter.needsScopeChange()) |
| adopter.execute(); |
| @@ -479,7 +479,7 @@ TreeScope* commonTreeScope(Node* nodeA, Node* nodeB) |
| return treeScopesA[indexA] == treeScopesB[indexB] ? treeScopesA[indexA] : 0; |
| } |
| -#if SECURITY_ASSERT_ENABLED |
| +#if SECURITY_ASSERT_ENABLED && !ENABLE(OILPAN) |
| bool TreeScope::deletionHasBegun() |
| { |
| return rootNode().m_deletionHasBegun; |
| @@ -491,10 +491,12 @@ void TreeScope::beginDeletion() |
| } |
| #endif |
| +#if !ENABLE(OILPAN) |
| int TreeScope::refCount() const |
| { |
| return rootNode().refCount(); |
| } |
| +#endif |
| bool TreeScope::isInclusiveAncestorOf(const TreeScope& scope) const |
| { |
| @@ -535,6 +537,8 @@ void TreeScope::setNeedsStyleRecalcForViewportUnits() |
| void TreeScope::trace(Visitor* visitor) |
| { |
| + visitor->trace(&m_rootNode); |
|
haraken
2014/05/06 04:20:16
This looks weird. Shall we change the reference ba
Mads Ager (chromium)
2014/05/06 08:26:00
Yes, done.
|
| + visitor->trace(m_document); |
| visitor->trace(m_parentTreeScope); |
| visitor->trace(m_selection); |
| } |