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

Unified Diff: Source/core/dom/ContainerNode.cpp

Issue 1309083002: Accurately update Document node counts on disposing shadow roots. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Adjust document node count in addChildNodesToDeletionQueue() Created 5 years, 4 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 | « no previous file | Source/core/dom/Document.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ContainerNode.cpp
diff --git a/Source/core/dom/ContainerNode.cpp b/Source/core/dom/ContainerNode.cpp
index 90fb8b95765b2b14cd01fa75d3bc6bcc2658450c..5a44e55d67cbe96d456b2c3e4279929563e6b35a 100644
--- a/Source/core/dom/ContainerNode.cpp
+++ b/Source/core/dom/ContainerNode.cpp
@@ -513,6 +513,9 @@ void ContainerNode::addChildNodesToDeletionQueue(Node*& head, Node*& tail, Conta
next->setPreviousSibling(nullptr);
if (!n->refCount()) {
+ if (n->inDocument())
+ container.document().decrementNodeCount();
+
#if ENABLE(SECURITY_ASSERT)
n->m_deletionHasBegun = true;
#endif
« no previous file with comments | « no previous file | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698