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

Unified Diff: Source/core/dom/Document.h

Issue 1309083002: Accurately update Document node counts on disposing shadow roots. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: disable counting when in a disposed state 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.h
diff --git a/Source/core/dom/Document.h b/Source/core/dom/Document.h
index 06d11412b547afa6c44ebf02e7659dca081286f8..579a74e377e5b352008454f5ddb2e11de5791dd3 100644
--- a/Source/core/dom/Document.h
+++ b/Source/core/dom/Document.h
@@ -1033,9 +1033,16 @@ public:
CanvasFontCache* canvasFontCache();
- void incrementNodeCount() { m_nodeCount++; }
+ void incrementNodeCount()
+ {
+ if (isDisposed())
haraken 2015/08/23 01:49:44 I'm just curious but is it possible that insertedI
sof 2015/08/23 05:36:54 We wouldn't be here if removedFrom() couldn't be c
+ return;
+ m_nodeCount++;
+ }
void decrementNodeCount()
{
+ if (isDisposed())
+ return;
ASSERT(m_nodeCount > 0);
m_nodeCount--;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698