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

Unified Diff: Source/core/dom/TreeWalker.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/NodeIteratorBase.cpp ('k') | Source/core/dom/TreeWalker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/TreeWalker.h
diff --git a/Source/core/dom/TreeWalker.h b/Source/core/dom/TreeWalker.h
index a48e011b31d1ef4851648b9696c43e4a0c220502..2980a0fce2dd4ee8b2f89e0e29cf690340b23dad 100644
--- a/Source/core/dom/TreeWalker.h
+++ b/Source/core/dom/TreeWalker.h
@@ -28,6 +28,7 @@
#include "bindings/v8/ScriptWrappable.h"
#include "core/dom/NodeFilter.h"
#include "core/dom/NodeIteratorBase.h"
+#include "platform/heap/Handle.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
@@ -35,15 +36,16 @@ namespace WebCore {
class ExceptionState;
-class TreeWalker : public ScriptWrappable, public RefCounted<TreeWalker>, public NodeIteratorBase {
+class TreeWalker FINAL : public RefCountedWillBeGarbageCollectedFinalized<TreeWalker>, public ScriptWrappable, public NodeIteratorBase {
+ WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(TreeWalker);
public:
- static PassRefPtr<TreeWalker> create(PassRefPtr<Node> rootNode, unsigned whatToShow, PassRefPtr<NodeFilter> filter)
+ static PassRefPtrWillBeRawPtr<TreeWalker> create(PassRefPtrWillBeRawPtr<Node> rootNode, unsigned whatToShow, PassRefPtrWillBeRawPtr<NodeFilter> filter)
{
- return adoptRef(new TreeWalker(rootNode, whatToShow, filter));
+ return adoptRefWillBeNoop(new TreeWalker(rootNode, whatToShow, filter));
}
Node* currentNode() const { return m_current.get(); }
- void setCurrentNode(PassRefPtr<Node>, ExceptionState&);
+ void setCurrentNode(PassRefPtrWillBeRawPtr<Node>, ExceptionState&);
Node* parentNode(ExceptionState&);
Node* firstChild(ExceptionState&);
@@ -53,12 +55,14 @@ public:
Node* previousNode(ExceptionState&);
Node* nextNode(ExceptionState&);
+ void trace(Visitor*);
+
private:
- TreeWalker(PassRefPtr<Node>, unsigned whatToShow, PassRefPtr<NodeFilter>);
+ TreeWalker(PassRefPtrWillBeRawPtr<Node>, unsigned whatToShow, PassRefPtrWillBeRawPtr<NodeFilter>);
- Node* setCurrent(PassRefPtr<Node>);
+ Node* setCurrent(PassRefPtrWillBeRawPtr<Node>);
- RefPtr<Node> m_current;
+ RefPtrWillBeMember<Node> m_current;
};
} // namespace WebCore
« no previous file with comments | « Source/core/dom/NodeIteratorBase.cpp ('k') | Source/core/dom/TreeWalker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698