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

Unified Diff: Source/WebCore/dom/TreeScopeAdopter.cpp

Issue 9617035: Merge 107519 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 9 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
« no previous file with comments | « LayoutTests/fast/dom/resources/node-move-to-new-document-crash.svg ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
}
« no previous file with comments | « LayoutTests/fast/dom/resources/node-move-to-new-document-crash.svg ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698