Chromium Code Reviews| Index: Source/core/dom/TreeScopeAdopter.cpp |
| diff --git a/Source/core/dom/TreeScopeAdopter.cpp b/Source/core/dom/TreeScopeAdopter.cpp |
| index 109d47ce4c123db51d7e1eae8fc208f3e5e68afc..cd369be6ee5816d9861a79c2670b4d67c43f3e26 100644 |
| --- a/Source/core/dom/TreeScopeAdopter.cpp |
| +++ b/Source/core/dom/TreeScopeAdopter.cpp |
| @@ -38,7 +38,9 @@ void TreeScopeAdopter::moveTreeToNewScope(Node& root) const |
| { |
| ASSERT(needsScopeChange()); |
| +#if !ENABLE(OILPAN) |
| m_oldScope.guardRef(); |
|
haraken
2014/04/24 04:18:43
In a follow-up, you might want to move TreeScopeAd
Mads Ager (chromium)
2014/04/24 10:57:36
Agreed.
|
| +#endif |
| // If an element is moved from a document and then eventually back again the collection cache for |
| // that element may contain stale data as changes made to it will have updated the DOMTreeVersion |
| @@ -77,7 +79,9 @@ void TreeScopeAdopter::moveTreeToNewScope(Node& root) const |
| } |
| } |
| +#if !ENABLE(OILPAN) |
| m_oldScope.guardDeref(); |
| +#endif |
| } |
| void TreeScopeAdopter::moveTreeToNewDocument(Node& root, Document& oldDocument, Document& newDocument) const |
| @@ -106,8 +110,10 @@ inline void TreeScopeAdopter::updateTreeScope(Node& node) const |
| { |
| ASSERT(!node.isTreeScope()); |
| ASSERT(node.treeScope() == m_oldScope); |
| +#if !ENABLE(OILPAN) |
| m_newScope.guardRef(); |
| m_oldScope.guardDeref(); |
| +#endif |
| node.setTreeScope(&m_newScope); |
| } |