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

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

Issue 1252683003: Oilpan: Schedule a precise GC when a page navigates (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | « Source/core/dom/Document.cpp ('k') | Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.h
diff --git a/Source/core/dom/Element.h b/Source/core/dom/Element.h
index 4c1dfb9c982316e552c490dd13247286aaa8e48a..ec7bb9edccb5beabb6e527e4b4b8528c252621b7 100644
--- a/Source/core/dom/Element.h
+++ b/Source/core/dom/Element.h
@@ -798,8 +798,10 @@ inline Node::InsertionNotificationRequest Node::insertedInto(ContainerNode* inse
ASSERT(!childNeedsStyleInvalidation());
ASSERT(!needsStyleInvalidation());
ASSERT(insertionPoint->inDocument() || isContainerNode());
- if (insertionPoint->inDocument())
+ if (insertionPoint->inDocument()) {
setFlag(InDocumentFlag);
+ insertionPoint->document().incrementNodeCount();
+ }
if (parentOrShadowHostNode()->isInShadowTree())
setFlag(IsInShadowTreeFlag);
if (childNeedsDistributionRecalc() && !insertionPoint->childNeedsDistributionRecalc())
@@ -810,8 +812,10 @@ inline Node::InsertionNotificationRequest Node::insertedInto(ContainerNode* inse
inline void Node::removedFrom(ContainerNode* insertionPoint)
{
ASSERT(insertionPoint->inDocument() || isContainerNode() || isInShadowTree());
- if (insertionPoint->inDocument())
+ if (insertionPoint->inDocument()) {
clearFlag(InDocumentFlag);
+ insertionPoint->document().decrementNodeCount();
+ }
if (isInShadowTree() && !treeScope().rootNode().isShadowRoot())
clearFlag(IsInShadowTreeFlag);
if (AXObjectCache* cache = document().existingAXObjectCache())
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698