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

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

Issue 285213003: Oilpan: move Node traversal objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Drop nullptr type conversions Created 6 years, 7 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/NodeIterator.idl ('k') | Source/core/dom/NodeIteratorBase.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/NodeIteratorBase.h
diff --git a/Source/core/dom/NodeIteratorBase.h b/Source/core/dom/NodeIteratorBase.h
index cc240f1bd1695614761f091764760d0761380dbc..18cc6aeb98ff15aa6d8a1524b9c1748f72458bc6 100644
--- a/Source/core/dom/NodeIteratorBase.h
+++ b/Source/core/dom/NodeIteratorBase.h
@@ -25,6 +25,7 @@
#ifndef NodeIteratorBase_h
#define NodeIteratorBase_h
+#include "platform/heap/Handle.h"
#include "wtf/RefPtr.h"
namespace WebCore {
@@ -33,8 +34,10 @@ class ExceptionState;
class Node;
class NodeFilter;
-class NodeIteratorBase {
+class NodeIteratorBase : public WillBeGarbageCollectedMixin {
public:
+ virtual ~NodeIteratorBase() { }
+
Node* root() const { return m_root.get(); }
unsigned whatToShow() const { return m_whatToShow; }
NodeFilter* filter() const { return m_filter.get(); }
@@ -43,14 +46,16 @@ public:
// Document.createNodeIterator() and Document.createTreeWalker().
bool expandEntityReferences() const { return false; }
+ virtual void trace(Visitor*);
+
protected:
- NodeIteratorBase(PassRefPtr<Node>, unsigned whatToShow, PassRefPtr<NodeFilter>);
+ NodeIteratorBase(PassRefPtrWillBeRawPtr<Node>, unsigned whatToShow, PassRefPtrWillBeRawPtr<NodeFilter>);
short acceptNode(Node*, ExceptionState&) const;
private:
- RefPtr<Node> m_root;
+ RefPtrWillBeMember<Node> m_root;
unsigned m_whatToShow;
- RefPtr<NodeFilter> m_filter;
+ RefPtrWillBeMember<NodeFilter> m_filter;
};
} // namespace WebCore
« no previous file with comments | « Source/core/dom/NodeIterator.idl ('k') | Source/core/dom/NodeIteratorBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698