Index: Source/core/dom/TreeScopeAdopter.cpp |
diff --git a/Source/core/dom/TreeScopeAdopter.cpp b/Source/core/dom/TreeScopeAdopter.cpp |
index 4fe3ed178129bfddf7f3ff023c5f95b4eac84c1a..109d47ce4c123db51d7e1eae8fc208f3e5e68afc 100644 |
--- a/Source/core/dom/TreeScopeAdopter.cpp |
+++ b/Source/core/dom/TreeScopeAdopter.cpp |
@@ -82,6 +82,7 @@ void TreeScopeAdopter::moveTreeToNewScope(Node& root) const |
void TreeScopeAdopter::moveTreeToNewDocument(Node& root, Document& oldDocument, Document& newDocument) const |
{ |
+ ASSERT(oldDocument != newDocument); |
for (Node* node = &root; node; node = NodeTraversal::next(*node, &root)) { |
moveNodeToNewDocument(*node, oldDocument, newDocument); |
for (ShadowRoot* shadow = node->youngestShadowRoot(); shadow; shadow = shadow->olderShadowRoot()) |
@@ -112,7 +113,7 @@ inline void TreeScopeAdopter::updateTreeScope(Node& node) const |
inline void TreeScopeAdopter::moveNodeToNewDocument(Node& node, Document& oldDocument, Document& newDocument) const |
{ |
- ASSERT(!node.inDocument() || oldDocument != newDocument); |
+ ASSERT(oldDocument != newDocument); |
if (node.hasRareData()) { |
NodeRareData* rareData = node.rareData(); |