summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore/dom/DynamicNodeList.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebCore/dom/DynamicNodeList.h')
-rw-r--r--src/3rdparty/webkit/WebCore/dom/DynamicNodeList.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/3rdparty/webkit/WebCore/dom/DynamicNodeList.h b/src/3rdparty/webkit/WebCore/dom/DynamicNodeList.h
index ee9832d726..f97c38f03e 100644
--- a/src/3rdparty/webkit/WebCore/dom/DynamicNodeList.h
+++ b/src/3rdparty/webkit/WebCore/dom/DynamicNodeList.h
@@ -37,8 +37,8 @@ namespace WebCore {
class DynamicNodeList : public NodeList {
public:
- struct Caches {
- Caches();
+ struct Caches : RefCounted<Caches> {
+ static PassRefPtr<Caches> create();
void reset();
unsigned cachedLength;
@@ -46,7 +46,8 @@ namespace WebCore {
unsigned lastItemOffset;
bool isLengthCacheValid : 1;
bool isItemCacheValid : 1;
- unsigned refCount;
+ protected:
+ Caches();
};
virtual ~DynamicNodeList();
@@ -68,7 +69,7 @@ namespace WebCore {
virtual bool nodeMatches(Element*) const = 0;
RefPtr<Node> m_rootNode;
- mutable Caches* m_caches;
+ mutable RefPtr<Caches> m_caches;
bool m_ownsCaches;
private: