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

Unified Diff: Source/core/dom/Document.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, 5 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') | Source/core/loader/FrameLoader.cpp » ('J')
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 f7cd33e9b9619657a9c69428bcb4a76b93a17300..574f3fcb380a9bf6e3fb7c851a73c1cdf88f9e67 100644
--- a/Source/core/dom/Document.h
+++ b/Source/core/dom/Document.h
@@ -1037,6 +1037,13 @@ public:
CanvasFontCache* canvasFontCache();
+ void incrementNodeCount() { m_nodeCount++; }
+ void decrementNodeCount() { m_nodeCount--; }
haraken 2015/08/03 01:03:59 I'd use 'signed int' for m_nodeCount and add ASSER
keishi 2015/08/06 06:59:14 Done.
+ unsigned nodeCount() { return m_nodeCount; }
+
+ using WeakDocumentSet = WillBeHeapHashSet<RawPtrWillBeWeakMember<Document>>;
+ static WeakDocumentSet& liveDocumentSet();
+
protected:
Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass);
@@ -1383,6 +1390,8 @@ private:
ClientHintsPreferences m_clientHintsPreferences;
PersistentWillBeMember<CanvasFontCache> m_canvasFontCache;
+
+ unsigned m_nodeCount;
};
extern template class CORE_EXTERN_TEMPLATE_EXPORT WillBeHeapSupplement<Document>;
« no previous file with comments | « no previous file | Source/core/dom/Document.cpp » ('j') | Source/core/loader/FrameLoader.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698