Index: Source/core/dom/Document.h |
diff --git a/Source/core/dom/Document.h b/Source/core/dom/Document.h |
index c832a24fbfaaf5621989d0c0e69e24480a4b721c..89d1fb7a6d7b1a704eb21bf0c220d6c2c00fc292 100644 |
--- a/Source/core/dom/Document.h |
+++ b/Source/core/dom/Document.h |
@@ -129,6 +129,7 @@ class MediaQueryListListener; |
class MediaQueryMatcher; |
class NodeFilter; |
class NodeIterator; |
+class NthIndexCache; |
class Page; |
class PlatformMouseEvent; |
class ProcessingInstruction; |
@@ -1061,6 +1062,8 @@ public: |
OriginsUsingFeatures::Value& originsUsingFeaturesValue() { return m_originsUsingFeaturesValue; } |
+ NthIndexCache* nthIndexCache() const { return m_nthIndexCache; } |
+ |
protected: |
Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass); |
@@ -1080,6 +1083,7 @@ protected: |
private: |
friend class IgnoreDestructiveWriteCountIncrementer; |
+ friend class NthIndexCache; |
bool isDocumentFragment() const = delete; // This will catch anyone doing an unnecessary check. |
bool isDocumentNode() const = delete; // This will catch anyone doing an unnecessary check. |
@@ -1172,6 +1176,8 @@ private: |
void updateElementOpacity(const AtomicString& cssSelector, double opacity); |
+ void setNthIndexCache(NthIndexCache* nthIndexCache) { ASSERT(!m_nthIndexCache || !nthIndexCache); m_nthIndexCache = nthIndexCache; } |
+ |
DocumentLifecycle m_lifecycle; |
bool m_hasNodesWithPlaceholderStyle; |
@@ -1318,6 +1324,14 @@ private: |
OwnPtr<SelectorQueryCache> m_selectorQueryCache; |
+ // It is safe to keep a raw, untraced pointer to this stack-allocated |
+ // cache object: it is set upon the cache object being allocated on |
+ // the stack and cleared upon leaving its allocated scope. Hence it |
+ // is acceptable not to trace it -- should a conservative GC occur, |
+ // the cache object's references will be traced by a stack walk. |
+ GC_PLUGIN_IGNORE("461878") |
+ NthIndexCache* m_nthIndexCache = nullptr; |
+ |
bool m_useSecureKeyboardEntryWhenActive; |
DocumentClassFlags m_documentClasses; |