| Index: Source/WebCore/dom/TreeScopeAdopter.cpp
|
| ===================================================================
|
| --- Source/WebCore/dom/TreeScopeAdopter.cpp (revision 109989)
|
| +++ Source/WebCore/dom/TreeScopeAdopter.cpp (working copy)
|
| @@ -96,10 +96,8 @@
|
| ASSERT(!node->inDocument() || oldDocument != newDocument);
|
|
|
| newDocument->guardRef();
|
| - if (oldDocument) {
|
| + if (oldDocument)
|
| oldDocument->moveNodeIteratorsToNewDocument(node, newDocument);
|
| - oldDocument->guardDeref();
|
| - }
|
|
|
| node->setDocument(newDocument);
|
|
|
| @@ -110,6 +108,9 @@
|
|
|
| node->didMoveToNewDocument(oldDocument);
|
| ASSERT(didMoveToNewDocumentWasCalled);
|
| +
|
| + if (oldDocument)
|
| + oldDocument->guardDeref();
|
| }
|
|
|
| }
|
|
|